Python Script handler:
def handler(session, args):
session.setHangupHook(hangup_hook)
session.setInputCallback(input_callback)
print('session object value is ', str(session))
callerid = session.getVariable('caller_id_number')
call_uuid = session.getVariable('uuid')
phone_number = callerid[len(callerid)-10:]
initial_greeting(session, phone_number, call_uuid)
def hangup_hook(session, what, args=''):
"""
Must be explicitly set up with session.setHangupHook(hangup_hook).
`session` is a session object.
`what` is "hangup" or "transfer".
`args` is populated if you pass extra args to session.setInputCallback().
"""
print('PERSON HANGED UPPPPP...........')
freeswitch.consoleLog("INFO", "hangup hook for '%s'\n" % what)
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org