Hi,
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");
}
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.
--