Hi, I have implemented a functionality where when a person with his mobile phone number calls a specific number (that of SIM inserted in our GOIP hardware), the incoming is hanged and that person is called back. After the IVR menu starts playing and if in between caller hangs up, hangup_event is not detected and the registered hangup_hook does not get called. Code is as follows; *XML file that starts python script when the person answers the cal*l: <extension name="record_topic"> <condition field="destination_number" expression="^4449"> <action application="set" data="execute_on_answer=python *python.sangoshthi_IVR_handler*"/> <action application="sleep" data="30000"/> </condition> </extension> *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) -- Regards, Deepika https://deepikay.wixsite.com/deepika