[Freeswitch-users] How to track call changes while running javascript?

Thomas lists at virtues.net
Sun Aug 2 00:53:27 MSD 2015


Hello list!

Does anyone know if there is a way to track changes to the call state, most notably a hangup, while executing 
Javascript? We're using JS to set up a call on a device connected to Freeswitch through portaudio. That call is 
initiated with sip/sofia executing the JS in the dialplan. If the SIP leg hangs up while the JS is running, nothing 
happens until the JS terminates.

I wanted to check from the script, but haven't found a way to do that. "session.state" doesn't change, hangup hook 
doesn't fire, and without setTimeout or something similar I didn't find a way to "background" the JS.

Is there any way to detect a hangup during JS execution?

Cheers!

Thomas




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list