0

conference terminate not working through allow signal

I have a node script (using it through web API)  which works fine except not able to end conference , I  am sending a signal by  sending this signal (https://api.tropo.com/1.0/sessions/id/signals?action=signal&value=endconf)

 

Can anyone help whats wrong in script 

 

var http = require('http');
var tropo_webapi = require('tropo-webapi');

var server = http.createServer(function (request, response) {

request.addListener('data', function(data){
json = data.toString();
});

request.addListener('end', function() {

var session = JSON.parse(json);
var tropo = new TropoWebAPI();

var to = session.session.parameters.numbertodial;
var name = session.session.parameters.customername;
var msg = session.session.parameters.msg;
var confid = session.session.parameters.confid;

tropo.call("+" + to, {
timeout:30,
callerID:'408XXXXXXX',
});
tropo.say("OMG " + name + ", " + msg + "!");
tropo.conference(confid, "endconf", true, "conference", null, null, "*");
tropo.say("We hope you had a great conference experience!!");
response.end(TropoJSON(tropo));
});

}).listen(8000);
~
~
~
~

7 comments

Please sign in to leave a comment.