0

Tracking when call ends

Working on a UI  in which wants to show  the status on the call like answer/busy/timeout /end

 

My the virtue of my past discussion on the forum got the idea that we have we can send a API request from tropo script to pass this information  to a web server

however I am still not able to find how to know when the call is ended by the called party

my script calls and then conference a person and my requirement is  how can I know when the  called party has ended the call and I can update the status on the UI.

Any help on this will be highly appreciated.

 


call('+' + numberToDials, {

       timeout:30,

       callerID:'140X55X0100',

          onAnswer: function() {


conference("467", {

    terminator: "*",

    mute: false,

    playTones: true,
    
    allowsignals:"exit"

    });


       },

       onTimeout: function() {

          call('+14085XXXX19');
          
       },
       
       onBusy: function() {
        
        wait(3000);
       call('+1408XXXXX19');
       
       },

       onCallFailure: function() {

           log("Call could not be completed as dialed");

       }

    });
   

3 comments

Please sign in to leave a comment.