<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">How does the API Hangup hook work?<br>Also in mod managed a Hangup hook crashes, not sure if its the hook you are suggesting.<br><br>void MangedSession::check_hangup_hok() <br> { <br> ATTACH_THREADS <br> if(!hangupDelegate){ <br> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hangupDelegate is null."); <br> return; <br> } <br> hangupDelegate(); // crashes here for null object <br><br><br><br>https://jira.freeswitch.org/browse/FS-6484<br>Thanks<br>Andre <br></div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">From: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:msc@freeswitch.org">Michael Collins</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Sent: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">7/28/2014 12:46 PM</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">To: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:freeswitch-users@lists.freeswitch.org">FreeSWITCH Users Help</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Subject: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">Re: [Freeswitch-users] FreeSWITCH SLEEP</span><br><br></div><div dir="ltr"><div>Do you necessarily need the channel to be active while "doing stuff" or would an <a href="https://wiki.freeswitch.org/wiki/Variable_api_hangup_hook">api_hangup_hook</a> be sufficient? <br></div>
-MC<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 11:40 AM, Andre <span dir="ltr"><<a href="mailto:andretodd@verizon.net" target="_blank">andretodd@verizon.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div lang="EN-US" link="blue" vlink="purple"><div><div><div><p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'>After a call I have transfer after bridge on. When the call goes back to the dial plan I want to sleep the call do some stuff and hang-up. <u></u><u></u></span></p>
<p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'><u></u> <u></u></span></p><p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'>On the original bridge I do have hangup after bridge on.<u></u><u></u></span></p>
<p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'><u></u> <u></u></span></p><p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'>What is the correct syntax for me to sleep then hangup? <u></u><u></u></span></p>
<p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'>Do I have to Answer the call for sleep to work?<u></u><u></u></span></p><p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'>Example: After transfer go to :<u></u><u></u></span></p>
<p><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'>//do I need to Answer again for sleep to work?<u></u><u></u></span></p><p><span lang="EN"><action application="sleep" data="5000"/><u></u><u></u></span></p>
<p><span lang="EN">// run some scripts not related to freeswitch<u></u><u></u></span></p><p><span lang="EN"><action application="hangup"/></span><span style='color: rgb(31, 73, 125); font-family: "Calibri","sans-serif"; font-size: 11pt;'><u></u><u></u></span></p>
</div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</body></html>