Slide 23
Slide 23 text
webpage.html
$('.btn').click(function(e){
var obj = {};
if($(this).is('.help')){
obj = {action: 'ListCommands'};
}else if($(this).is('.reload')){
obj = {action: 'reload'};
}else if($(this).is('.login')){
obj = {action: 'QueueAdd', queue: '10', interface: 'sip/2000', penalty: 1, paused:
true};
}else if($(this).is('.unpause')){
obj = {action: 'QueuePause', queue: '10', interface: 'sip/2000', paused: false};
}else if($(this).is('.dial')){
obj = { action: 'originate', channel: 'SIP/1000', exten: 10, context: 'from-internal',
priority : 1, async: true, callerid: '1000 VIA AMI "1000"' };
}else if($(this).is('.logout')){
obj = {action: 'QueueRemove', queue: '10', interface: 'sip/2000'};
}
now.send_data_to_asterisk(obj);
e.preventDefault();
})
github.com/danjenkins/astricon-2012