Open twosouth opened 9 years ago
I forgot to include the entire method:
agiHandler.command('Set Extension 1000', function (code, result, data) {
console.log("Set Extension")
console.log('///////////////////////// - code');
console.log(JSON.stringify(code));
console.log('///////////////////////// - result');
console.log(JSON.stringify(result));
console.log('///////////////////////// - data');
console.log(JSON.stringify(data));
});
agiHandler.command('Say Time "1414330073" ""', function(){
agiHandler.command('HangUp', function(){
// hangup the channel, this will raise hangup and close event
});
});
Sorry for the late response. Your code should be
agiHandler.command('Set Extension 1000', function (code, result, data) {
console.log("Set Extension")
console.log('///////////////////////// - code');
console.log(JSON.stringify(code));
console.log('///////////////////////// - result');
console.log(JSON.stringify(result));
console.log('///////////////////////// - data');
console.log(JSON.stringify(data));
// now you have the 'Set Extension 1000' command finished
// do other commands like this one
agiHandler.command('Say Time "1414330073" ""', function(){
// here you get the point, hangup after 'Say Time'
agiHandler.command('HangUp', function(){
// hangup the channel, this will raise hangup and close event
});
});
});
Hi I am trying to execute the following code which should transfer the call to the target extension.
agiHandler.command('Set Extension 1000', function (code, result, data) { });
The java equivelant of this code works fine so I'm not sure if I have a syntax error. Here is what I have in the onsole:
Console verbose was 12 and is now 25. == Using SIP RTP CoS mark 5 -- Executing [1300@default:1] AGI("SIP/2000-0000004b", "agi://10.0.1.106/hello.agi") in new stack
Am I just missing something?