[RESOLVED] Dial command macro

I have a solution I’m trying to solve where an original call comes inbound, then I need to call a second party and conference the two together with confirmation from the second party. When the second party connects I am using the macro option with the Dial command to whisper the second party options to press 1 to accept the call, and press 2 to decline the call. When the second party presses 1 to accept the call, I am calling MacroExit and the call is correctly bridged together. However when the second party presses 2, I am attempting to set the MACRO_RESULT=CONTINUE to drop the second party and continue with the original leg. However I am seeing the opposite happen. The original inbound leg is being dropped and the second party continues in the dial plan after the Dial command.

This seems to contradict the documentation for the Dial command on voip-info.org/wiki:

Also, the macro can set the MACRO_RESULT variable to do the following:
ABORT - Hangup both legs of the call
BUSY
CONTINUE - Hangup the called party and continue on in the dialplan from where you called Dial
GOTO:^^ - Transfer the call.

Here is the dial plan below:

[dial-nbp-sp]
exten => s,1,Dial(DAHDI/${EGRESS_RESOURCE}/8011,30,gmF(caller-hangup^s^1)M(sp-call-connect))
exten => s,n,GotoIf($[${DIALSTATUS}=ANSWER]?answered:noAnswer)
exten => s,n(noAnswer),Playback(custom/unavailable)
exten => s,n,Hangup
exten => s,n(answered),NoOp(“End of dial-nbp-sp context. call answered.”)
exten => s,n,Hangup

[macro-sp-call-connect]
exten => s,1,NoOp(“inside sp macro”)
exten => s,n,AMD
exten => s,n,Set(MYSTATUS=${AMDSTATUS})
exten => s,n,GotoIf($[${AMDSTATUS}=HUMAN]?human:mach)
exten => s,n(mach),Playback(en/beep)
exten => s,n,MacroExit
exten => s,n(human),Read(DIGIT_PRESSED,custom/memberSpIntro,1,2,3)
exten => s,n,GotoIf($[${DIGIT_PRESSED} = 1]?press1)
exten => s,n,GotoIf($[${DIGIT_PRESSED} = 2]?press2)
exten => s,n(press1),Playback(en/beep)
exten => s,n,MacroExit
exten => s,n(press2),Set(MACRO_RESULT=CONTINUE)

I tried to explicitly call Hangup in (press2) as well and that doesn’t seem to work either.

Any ideas on how to get that type of functionality using the Dial command or do I have to originate a call and handle the bridging myself?

Thanks in advance for any help or ideas.

Jesse Jones

Ok it is working as it should I was just getting myself confused. DOH!

Because I had the option of F defined in the Dial command the second party was continuing in the caller-hangup context and the original inbound call was going to the next priority after the Dial command which was doing the hangup on the original leg.