[Freeswitch-users] Scheduled hangup from javascript

vidhya sagar dixit vids.cs at gmail.com
Mon Sep 8 01:59:47 PDT 2008


can any one please answer my question ...?


-- 
Thanks and Regards

Vidhya Sagar Dixit

On Sat, Sep 6, 2008 at 12:12 PM, vidhya sagar dixit <vids.cs at gmail.com>wrote:

> 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/20080908/e20ae67d/attachment-0002.html 


More information about the FreeSWITCH-users mailing list