[Freeswitch-users] warn and hangup after xx seconds

Francesco Facco de Lagarda francesco at delagarda.com
Wed Jun 6 18:05:51 UTC 2018


I am scripting in js

I have both analogue and digital trunks out (analogue trunks out don't give
me the "answer" event)

Lets say we have a "totTime" variable for max length of call

I need to play a warning at totTime - 30

And hangup at totTime..

I have tried using:

 

 

sessOut.execute("set", "execute_on_answer_1=sched_hangup +" + totTime + "
alloted_timeout");

sessOut.execute("set", "execute_on_answer_2=sched_broadcast +" + (totTime -
30) + "layback::" + soundDir + "time_off.wav both");

 

But I can only get one or the other to work.. never both!

 

Also, how would I schedule there two events for analogue lines (where I
don't have "on_answer")

 

Thanks all

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180606/dc0c6a72/attachment.html>


More information about the FreeSWITCH-users mailing list