Session setHangupHook
From FreeSWITCH Wiki
Sets the hangup callback handler function that will get called when the call terminates.
Remember to call exit() if you want to terminate the javascript session in your hangup callback handler.
[edit]
Usage
result = session.setHangupHook(hangup_function_name);
[edit]
Example
[edit]
