[Freeswitch-users] Scheduled hangup from javascript

vidhya sagar dixit vids.cs at gmail.com
Fri Sep 5 23:42:37 PDT 2008


Hi All,

How to use scheduled hangup from within a java script.

Here is the flow.

User dials 1212 from softphone  call goes to default dialplan and calls
test.js

in test.js  i am doing like this

====================

session.answer();

//.......
//Do some stuff like ivr play etc .......

//......

var dialstr = "sofia/external/911234567890 at 11.22.33.44";

// now originate a new session

new_session = new Session();
new_session.setCallerData("caller_id_name", "Vidhya");
new_session.setCallerData("caller_id_number", "911140500000");
new_session.originate(session, dialstr,60);
bridge(session, new_session);

new_session.hangup();


session.hangup();

===================

Now i want to hangup new_session after lets say 2 minutes.
I can not use  scheduled  hangup in dialplan as this  hangup time may vary
and will come from database.

Any help will be appreciated.


-- 
Thanks and Regards

Vidhya Sagar Dixit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080906/3bb69f7d/attachment-0002.html 


More information about the FreeSWITCH-users mailing list