[asterisk-dev] Question about ast_async_goto()
Tony Mountifield
tony at softins.clara.co.uk
Mon Aug 21 07:54:46 MST 2006
In an application modification I am developing, I have a channel (A) making
a call that creates another channel (B) for the outgoing leg. Channel A is
executing in the pbx, and channel B is not, since it is initially the target
for the call.
At a certain point in the processing, I want to send channel B off into the
dialplan to a certain context, extension and priority, so treating it from
there on as it if were an incoming call. To do this, I am calling the
function ast_async_goto_if_exists(chanb, context, exten, pri).
Functionally, it works fine. However, I have a left over <ZOMBIE> channel,
and I can't work out whose job it is to clear up this channel.
Let's say channel B's name is SIP/2002-xxxx with seq num .3 (last part of UniqueID).
In ast_async_goto(), it creates a new channel called AsyncGoto/SIP/2002-xxxx
with a new seq num (say .6).
Next, .3 is renamed from SIP/2002-xxxx to SIP/2002-xxxx<MASQ>
Then, .6 is renamed from AsyncGoto/SIP/2002-xxxx to SIP/2002-xxxx
Last, .3 is renamed from SIP/2002<MASQ> to AsyncGoto/SIP/2002-xxxx<ZOMBIE>
When I've done dual-channel redirects via the Manager API in the past,
I have seen the ZOMBIE channel then get hung up. However, in my application,
the ZOMBIE channel is staying around.
What part of the code should be responsible for issuing ast_hangup() on the
original channel B (seq .3)?
Any pointers in the right direction would be greatly appreciated!
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-dev
mailing list