3-way calling with ConfBridge initiated by callee

I have 3-way calling working when the caller initiates the conference, but not when the callee does. I believe this is because the caller is already running a PBX instance, so the ChannelRedirect will not execute until the current Dial() is finished (as explained here: issues.asterisk.org/jira/browse … tId=134099).

Is there a solution that would allow both the caller and callee to initiate the 3-way conference? I am running Asterisk 11.14.1 on Fedora 21 (installed via the standard distro RPM).

My features:

[applicationmap] 3way-start => *0,self/caller,Macro,3way-start 3way-conf => **,self/both,Macro,3way-conf 3way-noconf => ##,self/both,Macro,3way-noconf

And dial plan:

[code][test3way]
exten => _XXX,1,NoOp()
same => n,Set(__DYNAMIC_FEATURES=3way-start#3way-start-callee)
same => n,Dial(SIP/${EXTEN},30,m)
same => n,Hangup()

[dynamic-3way]
exten => _XXX.,1,Answer
same => n,Set(CONFNO=3way-bridge)
same => n,ConfBridge(${CONFNO})
same => n,Hangup

[macro-3way-start]
exten => s,1,Set(CONFNO=3way-bridge)
;This doesn’t work for the callee because the caller is already executing a dial-plan (hmmm)
same => n,ChannelRedirect(${BRIDGEPEER},dynamic-3way,${CONFNO},1)
same => n,Read(DEST,dial,24,i,3,5);Assuming Max Digits = 24
same => n,GotoIf($["${DEST}" = “*” ]?cancel)
same => n,GotoIf($["${DEST}" = “” ]?cancel)
same => n,Wait(1)
same => n,Set(__DYNAMIC_FEATURES=3way-conf#3way-noconf)
same => n,Dial(Local/${DEST}@dial-out/n,30,g)
same => n,Set(__DYNAMIC_FEATURES=3way-start#3way-start-callee)
same => n,ConfBridge(${CONFNO})
same => n,Hangup()

same => n(cancel),Verbose(1, Cancel 3-way)

[macro-3way-conf]
exten => s,1,Verbose(1, Redirecting ${BRIDGEPEER} to conference bridge)
same => n,ChannelRedirect(${BRIDGEPEER},dynamic-3way,${CONFNO},1)

[macro-3way-noconf]
exten => s,1,SoftHangup(${BRIDGEPEER})
[/code]

That bug was fixed years ago!

You’ve missed the important note in the documentation (sample configuration):

[quote]; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk
; applications. When applications are used in extensions.conf, they are executed
; by the PBX core. In this case, these applications are executed outside of the
; PBX core, so it does not make sense to use any application which has any
; concept of dialplan flow. Examples of this would be things like Macro, Goto,
; Background, WaitExten, and many more.
[/quote]

My only experience of something like this was with third party control (AMI).

[quote=“david55”]You’ve missed the important note in the documentation (sample configuration):

[quote]; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk
; applications. When applications are used in extensions.conf, they are executed
; by the PBX core. In this case, these applications are executed outside of the
; PBX core, so it does not make sense to use any application which has any
; concept of dialplan flow. Examples of this would be things like Macro, Goto,
; Background, WaitExten, and many more.
[/quote]
[/quote]

You’re right, I did miss that. It’s interesting that every example I’ve found so far does it this way. See for example: voip-info.org/wiki/view/Aste … call+HOWTO.

My google-fu has either failed me or nobody has published an example of this. Does anyone have a sample AMI or AGI script dealing with 3 (or n)-way conferencing that I could build from?