[Freeswitch-users] javascript hanguphook

Erik Dekkers erik.dekkers at wvds.nl
Wed Feb 16 13:41:35 MSK 2011


Hi Christian,

The hangup hook api should be set in the dialplan:
<action application="set" data="api_hangup_hook=jsrun cleanup.js ${uuid}"/>

This will trigger the hangup api once the session is destroyed.

Regards,

Erik

-----Oorspronkelijk bericht-----
Van: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] Namens Christian Hiller
Verzonden: dinsdag 15 februari 2011 16:48
Aan: freeswitch-users at lists.freeswitch.org
Onderwerp: [Freeswitch-users] javascript hanguphook

Hello,

i have a javscript that is called from xml-dialplan ...
function on_hangup(hup_session, how)
{
     console_log("info","got hungup");
     exit();
}

session.execute('bridge','sofia/internal....');
session.setHangupHook(on_hangup);
...

Now i experience, that this function is only called if the session is not answered yet.
Once its answered and then got hung up, the function on_hangup is not called anymore.
Any ideas ?

Kind regards

Christian Hiller

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



More information about the FreeSWITCH-users mailing list