Motiejus Jakštys
2010-May-06 12:47 UTC
[asterisk-users] Make the call finish after executing Dial(G())
Dear List, My Dial command: exten => _X.,n,Dial(SIP/PBX2/1234,60,G(connect-jack^${EXTEN}^1)) exten => h,1,.... [connect-jack] exten => _X.,1,NoOp(${CHANNEL}) ; Leg A exten => _X.,2,NoOp(${CHANNEL}) ; Leg B The problem is: after answering, [connect-jack] both priorities are executed, and right after executing them call drops. Log: -- Executing [123456 at NPDB2:76] Dial("SIP/1001-00000004", "SIP/PBX2/000123456,60,G(connect-jack^123456^1)") in new stack == Using SIP RTP CoS mark 5 -- Called PBX2/000123456 == Begin MixMonitor Recording SIP/1001-00000004 -- SIP/PBX2-00000005 is ringing -- SIP/PBX2-00000005 answered SIP/1001-00000004 -- Executing [123456 at connect-jack:1] NoOp("SIP/1001-00000004", "SIP/1001-00000004") in new stack -- Executing [123456 at connect-jack:2] NoOp("SIP/1001-00000004", "SIP/1001-00000004") in new stack -- Auto fallthrough, channel 'SIP/1001-00000004' status is 'ANSWER' -- Executing [123456 at connect-jack:2] NoOp("SIP/PBX2-00000005", "SIP/PBX2-00000005") in new stack -- Auto fallthrough, channel 'SIP/PBX2-00000005' status is 'UNKNOWN' == End MixMonitor Recording SIP/1001-00000004 The question: how to execute G() right after answering (purpose behind this: I will need to set some leg B variables), and then continue the conversation? Thank you, Motiejus
Philipp von Klitzing
2010-May-06 13:29 UTC
[asterisk-users] Make the call finish after executing Dial(G())
Hi!> [connect-jack] > exten => _X.,1,NoOp(${CHANNEL}) ; Leg A > exten => _X.,2,NoOp(${CHANNEL}) ; Leg B > > The problem is: after answering, [connect-jack] both priorities are > executed, and right after executing them call drops.The call legs drop because you do not do anything with them, since your dialplan is finished at this point. You could put them into a MeetMe conference, for example, or use Transfer() or ChannelRedirect(). [connect-jack] exten => _X.,1,Goto(bridging,meet,1); Leg A exten => _X.,2,NoOp(${CHANNEL}) ; Leg B exten => _X.,n,Goto(bridging,meet,1); Leg B [bridging] exten => meet,1,MeetMe(1234) exten => meet,n,Hangup ; handle a hangup after meetme cleanly Another way to address this: Use Dial option M instead of G Philipp