In article <[EMAIL PROTECTED]>, Kevin P. Fleming <[EMAIL PROTECTED]> wrote: > ----- Tony Mountifield <[EMAIL PROTECTED]> wrote: > > What part of the code should be responsible for issuing ast_hangup() > > on the > > original channel B (seq .3)? > > This should be handled by ast_do_masquerade(). However, if nothing is reading > from that > channel, then the pending hangup will never get processed. It's not clear > exactly why this > isn't working in your application, though.
Thanks. Nothing was reading from that channel, which is probably why it stayed around. However, what I discovered is that I could call ast_hangup() immediately after the ast_async_goto(), like this: ast_async_goto(chanb, context, exten, pri); ast_hangup(chanb); (error checking omitted for clarity). Then the zombie channel was tidied up. The only niggling doubt I had was whether there was any race condition that would make this unsafe, i.e. hanging up the original channel before the async goto had finished getting everything it needed from it. So long as everything was done in the thread calling ast_async_goto(), before it returns, then I guess it should be fine. Just for interest sake, what I'm actually working on is dialling out from Meetme to invite new participants. I started with the patch on bug 3405, but it doesn't create a proper call sequence, nor generate sensible Manager API events. It just creates its own local thread in which to run conf_run() for the invited participant. Instead, I've decided to do it by using ast_async_goto() to send the invited participant into the dialplan on its own pbx thread (after consultation with the call initiator), so that they can be tracked by my AGI accounting and go into Meetme properly via the front door. They will then also execute the h extension on the way out, which I also need. Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
