Need to find where Fusion sets api_hanguphook in freeswitch

Status
Not open for further replies.

Zebedee

New Member
Dec 10, 2019
8
1
3
28
Hi all, title says it all really. I'm trying to write a Lua script that looks for the session recording file after the session has hung up.
My problem - according to some lovely people on the Freeswitch slack channels - is that FusionPBX sets the api_hangup_hook at the end of the dial plan but I can't find it.
Sorry if this question doesn't go here, I'm not sure where else to place it.
Many thanks in advance,
-F
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Have a look in /etc/freeswitch/autoload_configs/lua.conf.xml

You can hook events there to trigger .lua scripts. There is an example towards the bottom of the file for hooking the PHONE_FEATURE_SUBSCRIBE event, I'm sure you could adapt this for maybe the CHANNEL_HANGUP or CHANNEL_HANGUP_COMPLETE events.
 
Status
Not open for further replies.