----- Julian Lyndon-Smith <asterisk@dotr.com>
wrote:> If I have in my dialplan
>
> [AgentQ]
> exten => _XX.,1,Dial(Sip/{$exten},120,g)
> exten => _XX.,2,NoOP(here we are)
>
> where [AgentQ] is called by the queue command to a member added by
>
> addqueuemember(Local/99@AgentQ)
>
> why don't I get to the NoOp if the agent hangs up during the
> announcement message (to the agent) ?
Complicated answer, that one.
In this case, when the agent answers the call, app_dial invokes a copy of
ast_bridge_call() to bridge the Local,2 channel with the SIP channel it created.
It then sends 'answer' to the Local,1 channel, which causes app_queue to
invoke a copy of ast_bridge_call() on the original channel and the Local,1
channel. This then causes chan_local to masquerate the SIP channel on top of the
Local,1 channel, and the Local,2 channel is destroyed. When this occurs, the
ast_bridge_call() that app_dial invoked is exited, but the channel no longer
exists, so dialplan execution cannot continue.
If you want this to work, you'll have use the '/n' option for
chan_local, as in:
AddQueueMember(Local/99@AgentQ/n,...)
--
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.