<div dir="ltr">Hi All,<br><br>How to use scheduled hangup from within a java script.<br clear="all"><br>Here is the flow.<br><br>User dials 1212 from softphone call goes to default dialplan and calls test.js <br><br>in test.js i am doing like this <br>
<br>====================<br><br>session.answer();<br><br>//.......<br>//Do some stuff like ivr play etc .......<br><br>//......<br><br>var dialstr = "sofia/external/<a href="mailto:911234567890@11.22.33.44">911234567890@11.22.33.44</a>";<br>
<br>// now originate a new session <br><br>new_session = new Session();<br>new_session.setCallerData("caller_id_name", "Vidhya");<br>new_session.setCallerData("caller_id_number", "911140500000");<br>
new_session.originate(session, dialstr,60);<br>bridge(session, new_session);<br><br>new_session.hangup();<br><br><br>session.hangup();<br><br>===================<br><br>Now i want to hangup new_session after lets say 2 minutes.<br>
I can not use scheduled hangup in dialplan as this hangup time may vary and will come from database.<br><br>Any help will be appreciated. <br><br><br>-- <br>Thanks and Regards <br><br>Vidhya Sagar Dixit<br>
</div>