Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] javascript to get the status


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
saigop at gmail.com
Guest





PostPosted: Tue Feb 10, 2009 3:31 am    Post subject: [Freeswitch-users] javascript to get the status Reply with quote

Hi,

I am trying to execute the following script, its working fine for call origination, but cant able to get the status for dialed numbers, able to get only the last dialed number not for both the numbers. The script as follows,


Javascript

var array = [2];
array[0]="39841799874";
array[1]="39894929942";
for(var i=0;i<array.length;i++)
{
session = new Session();
session.originate(session, "{ignore_early_media=true}sofia/default/"+array[i]+"@172.20.191.228");
if (session.ready())
{
//session.setVariable("session.uuid", "Session OUTPUT: " + session.uuid);
//session.setVariable("notice", "Disconnect cause: " + session.cause);
//session.setVariable("info", "Disconnect cause: " + session.causecode);
console_log("notice", "Session UUID: " + session.uuid + "\n");
console_log("info", "Disconnect cause: " + session.cause + "\n");
console_log("notice", "Disconnect Code: " + session.causecode + "\n");
}
}
if (session.answer())
{
session.execute("sleep","5000000");
console_log("notice", "Session UUID: " + session.uuid + "\n");
console_log("info", "Disconnect cause: " + session.cause + "\n");
console_log("notice", "Disconnect Code: " + session.causecode + "\n");
}

The steps as follows,

1. enter into the array - working fine
2. take each number to the originate session via for loop - working fine
3. the call has to be answered by the session - working fine
4. the call status need to be printed in console for each call - printing only for the last dialed call


Any suggestion would help us. --
Thank you with regards,
Gopal,
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services