Olivier
2013-Mar-25 22:17 UTC
[asterisk-users] Asterisk 11, hangup-handlers, Local channels and channel originate
Hello, I'm giving hangup-handlers a try on a new Asterisk 11.2.1 setup. My plan is to use this handler to update my CDRs with values such as Asterish and Tech cause (see function HANGUP_CAUSE). I want to have my custom hangup-handler be run only once and when "the second channel" hangs up. At the moment, I'm issuing a couple of "channel originate Local/1 at mycontext1 extension 123456789 at mycontext2" commands. I'm observing that as I'm using expressions such as Local/1 at mycontext1, a Local <ZOMBIE> channel is hanged before the second channel stops ringing. When the second channel itself ends, my handler is not run anymore. What would you suggest me to do ? Should I delay my Set(CHANNEL(hangup_handler_wipe)= ...) statement till both channels are bridged together ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130325/ecf79d30/attachment.htm>
Matthew Jordan
2013-Mar-25 22:20 UTC
[asterisk-users] Asterisk 11, hangup-handlers, Local channels and channel originate
On 03/25/2013 05:17 PM, Olivier wrote:> Hello, > > I'm giving hangup-handlers a try on a new Asterisk 11.2.1 setup. > My plan is to use this handler to update my CDRs with values such as > Asterish and Tech cause (see function HANGUP_CAUSE). > I want to have my custom hangup-handler be run only once and when "the > second channel" hangs up. > > At the moment, I'm issuing a couple of "channel originate > Local/1 at mycontext1 extension 123456789 at mycontext2" commands. > > I'm observing that as I'm using expressions such as Local/1 at mycontext1, > a Local <ZOMBIE> channel is hanged before the second channel stops ringing. > When the second channel itself ends, my handler is not run anymore. > > > What would you suggest me to do ? > Should I delay my Set(CHANNEL(hangup_handler_wipe)= ...) statement till > both channels are bridged together ? >It is hard to say without seeing the dialplan that you're using. Most likely, the hangup handler has been attached to one half of the Local channel as opposed to the channel you want it attached to. Can you include the full dialplan that you're using? Matt -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org