[Home]

Summary:ASTERISK-11896: [patch] Channelredirect hangs until hangup
Reporter:Alan McMillan (alanmcmillan)Labels:
Date Opened:2008-04-22 20:45:51Date Closed:2011-06-07 14:02:59
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_channelredirect
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20080527__bug12499__trunk.diff.txt
( 1) 20080527__bug12499.diff.txt
Description:Channelredirect is not executing the context on the redirected channel when callee activates a feature via features.conf --

The caller only continues through to the Meetme only after the CALLEE hangsup . The callee is activating the feature by dialing the *6 once legs are talking.

features.conf --

conference => *6,self/callee,Macro,nway-start

extension.conf ----

exten => _X.,1,Set(_DYNAMIC_FEATURES=conference)
exten => _X.,n,Dial(ZAP/r1/2064792279)

[dynamic-nway]
exten => _XXX,1,Answer
exten => _XXX,n,Set(CONFNO=${EXTEN})
exten => _XXX,n,Set(MEETME_EXIT_CONTEXT=dynamic-nway-invite)
exten => _XXX,n,Set(DYNAMIC_FEATURES=)
exten => _XXX,n,MeetMe(${CONFNO},pdMX)
exten => _XXX,n,Hangup

[dynamic-invite]
exten => 0,1,Read(DEST,dial,,i)
exten => 0,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)
exten => 0,n,Dial(ZAP/r1/${DEST}@dynamic-nway-dest,,g)
exten => 0,n,Set(DYNAMIC_FEATURES=)
exten => 0,n,Goto(dynamic-nway,${CONFNO},1)
exten => i,1,Goto(dynamic-nway,${CONFNO},1)


[dynamic-nway-dest]
exten => _XXX,1,Dial(ZAP/r1/${EXTEN})

[macro-nway-start]
exten => s,1,Set(CONFNO=300)
exten => s,n,ChannelRedirect(${BRIDGEPEER},dynamic-nway,${CONFNO},1)
exten => s,n,Read(DEST,dial,,i)
exten => s,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)
exten => s,n,Dial(ZAP/r1/${DEST},,g)
exten => s,n,Set(DYNAMIC_FEATURES=)
exten => s,n,Goto(dynamic-nway,${CONFNO},1)

The caller only continues through to the Meetme only after the CALLEE hangus up.

Comments:By: Tilghman Lesher (tilghman) 2008-05-27 15:54:28

Candidate patch uploaded.

By: Tilghman Lesher (tilghman) 2008-05-30 13:29:27

alanmcmillan:  does this patch work for you?

By: Alan McMillan (alanmcmillan) 2008-05-30 13:53:32

I tried the patch on trunk and it still hangs until the called person hangs up. The call flow is - Aleg (caller) calls a number thru zap then asterisk calls out to the Bleg via zap.  The Bleg decides he want to have a three way call and dials *6. feature activation code for the conference. This should send the ALeg to an empty conference. But it hangs until the Bleg hangs up and then it goes into  the conference.

Thanks for helping out!

By: Tilghman Lesher (tilghman) 2008-05-30 14:56:33

Okay, so the word is that you can't do a Dial within a feature code, or else the feature code will not exit, and the other channel can't continue until that feature code has exited.

I suspect you can rewrite your dialplan logic such that the Dial doesn't occur within the featurecode.

By: Alan McMillan (alanmcmillan) 2008-05-30 15:38:15

But it does work when the role is reversed and the Aleg activates the feature code and sends the bleg into conference ... The feature code calls on the macro-nway-start which sends the bleg into the conference.

By: Joshua C. Colp (jcolp) 2008-06-02 08:01:02

Here is the reason why:

Aleg is executing dialplan logic already
Bleg is not

When Aleg activates the feature and does the ChannelRedirect on Bleg a new PBX instance is created and starts executing. A "zombie" channel then takes the place of Bleg in relation to Aleg.

When Bleg activates the feature and does the ChannelRedirect it simply modifies the extension/context/priority on Aleg as it is already running a PBX instance. Since a new one was not created it can not move on to the new extension/context/priority until what is executing now (Dial) is finished.

By: Tilghman Lesher (tilghman) 2008-06-17 17:56:08

I think file explained this sufficiently.