Definitely. File this one under &quot;duh&quot;<br>-MC<br><br><div class="gmail_quote">On Mon, Oct 18, 2010 at 2:58 PM, Phillip Jones <span dir="ltr">&lt;<a href="mailto:pjintheusa@gmail.com">pjintheusa@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">A cookbook entry perhaps.....<br><br><div class="gmail_quote">On Mon, Oct 18, 2010 at 5:32 PM, Sergey Okhapkin <span dir="ltr">&lt;<a href="mailto:sos@sokhapkin.dyndns.org" target="_blank">sos@sokhapkin.dyndns.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Thank you for the session_in_hangup_hook hint...<br>
<div><br>
On Monday 18 October 2010, Michael Collins wrote:<br>
</div><div><div></div><div>&gt; On Mon, Oct 18, 2010 at 12:40 PM, Sergey Okhapkin<br>
&gt;<br>
&gt; &lt;<a href="mailto:sos@sokhapkin.dyndns.org" target="_blank">sos@sokhapkin.dyndns.org</a>&gt;wrote:<br>
&gt; &gt; The &quot;h&quot; extension in asterisk is a feature I used extensively. Lack of a<br>
&gt; &gt; hangup dialplan handler makes DP programming in FS harder and less clear.<br>
&gt;<br>
&gt; That&#39;s what api_hangup_hook is for. Call ends, do an API that can do pretty<br>
&gt; much anything you can imagine and you&#39;re done. You can even set<br>
&gt; session_in_hangup_hook to true so that you have the channel&#39;s variables<br>
&gt; available even though the channel has been disconnected.<br>
&gt;<br>
&gt; &gt; Fortunately, CDR handlers allow to do some post call cleanup work, but<br>
&gt; &gt; in- dialplan implementation would be much better and clearer.<br>
&gt;<br>
&gt; Much better? No. Much clearer, possibly. The benefits of not doing cleanup<br>
&gt; work in the dialplan AFTER the channel has gone away far outweigh the<br>
&gt; drawbacks. Use api_hangup_hook and session_in_hangup_hook=true. Doing this<br>
&gt; stuff outside the dialplan is more efficient and less error-prone.<br>
&gt;<br>
&gt; -MC<br>
&gt;<br>
<br>
<br>
</div></div><div><div></div><div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
</div></div></blockquote></div><br>
<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>