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