Web Callback FreePBX 13. $50 ( 23 2 900 ). . , . ? : .


Applications. HTML -. -. , , , . , , . , HTML- .

, -:

  • + Add Web Callback
 Web Callback Asterisk
  • :
  Web Callback FreePBX 13

:

  • Name
  • CID Prepend , CALLBACK
  • Number Prepend
  • Dial Matches , ,
  • Icon
  • Valid Message ,
  • Invalid Message ,
  • Error Message , , -
  • Destination , - web callback
  • HTML Code ,
HTML  Web Callback   FreePBX 13
  • Submit

. : Shmooze / .


, , . /etc/schmooze/wcb.html :

<style type="text/css">
#frame {
    background-image: url('/admin/images/webcallback.png');
    background-repeat: no-repeat;
    background-size: 200px;
    height: 65px;
    cursor: pointer;
    cursor: hand;
}
#webcallbackinput {
    position: relative;
    left: 66px;
    top: 30px;
    width: 125px;
}
</style>
<div id="frame">
    <input type="text" name="num" placeholder="  " id="webcallbackinput" value="">
    <input type="hidden" id="dest" value="http://1.2.3.4:12345/wcb.php">
    <input type="hidden" id="i" value="1">
</div>
<div id="link"></div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('#frame').click(function(){
        if ($('#webcallbackinput').val()) {
            var valid_msg = '.    !';
            var invalid_msg = '. ,      ';
            var but = $(this);
            $.ajax({
                url: $('#dest').val(),
                type: 'post',
                data: {p: $('#webcallbackinput').val(), i: $('#i').val()},
                cache: false,
                success: function(data, b, c) {
                    data = $.parseJSON(data);
                     
                    switch (data.Response) {
                        case 'Error':
                            switch (data.Message) {
                                case 'Originate failed':
                                    alert(invalid_msg);
                                    break;
                                default:
                                    alert(data.Message);
                                    break;
                            }
                            break;
                        case 'Success':
                            alert(valid_msg);
                            break;
                        default:
                            break;
                    }
                },
                error: function(a, b, c) {
                    alert(invalid_msg);
                }
            })
        }
    })
});
</script>

, , value input ( ) id , . , id=2:

<input type="hidden" id="dest" value="http://1.2.3.4:12345/wcb.php">
<input type="hidden" id="i" value="1">
http://1.2.3.4:12345/wcb.php , 1.2.3.4 IP , 12345 Asterisk. (source address), . , Web , ,

,

var valid_msg = '.    !';
var invalid_msg = '. ,       ';

?

 .

P.S. , :)

"",