[Freeswitch-users] Hangup() doesn't destroy the channel

Akshaya j akshaya18j at gmail.com
Wed Nov 29 09:25:10 UTC 2017


Hi,
It would be great to know if some got a solution for termination of python
script in hangup_hook().
I used session.destroy() at the end of the script which clears the channel,
but when i use the same in Hangup_hook(), it restarts the FS server.
def hangup_hook(session, what):
   session.consoleLog("info","hangup hook for %s!!\n\n" % what)
   session.unsetInputCallback()
   session.hangup("NORMAL_CLEARING")
   #session.destroy()
logs :
[INFO] switch_cpp.cpp:1293 file
location..../usr/local/freeswitch/storage/voicemail/78.wav
[NOTICE] sofia.c:1012 Hangup sofia/external/14005 at x.x.x [CS_EXECUTE]
[NORMAL_CLEARING]
[INFO] switch_cpp.cpp:1293 session:recordFile() = 0
freeswitch at fscli> show channels
--shows the channel is active with CS_EXECUTE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20171129/b6c766a2/attachment-0001.html>


More information about the FreeSWITCH-users mailing list