Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
B.H. On Wed, Jun 19, 2013 at 10:20 AM, Grant Bagdasarian wrote: > Hello, > > ** ** > > I’d like to use the AMI interface to originate a call to a context in a > dialplan, and handoff the dial control to the context. > > ** ** > > Whenever I execute the below action, the recipient does ring, but when I > answer it dials the recipient again. I believe this is because once > answered the system is going to execute the Context/Exten/Prio in the > Originate action? > > ** ** > > Action: Originate > > Channel: Local/outbound1@originateDialContext > > CallerID: 00311234567 > > Context: originateDialContext > > Exten: outbound1 > > Priority: 1 > > Variable: recipient=0031612345678 > > Timeout: 1 > > ** ** > > [originateDialContext] > > exten => outbound1,1,Wait(1) > > exten => outbound1,n,Set(recipient=${recipient}) > > exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) > > ** ** > > Anyone have an idea how to fix this? > You actually try to connect both 2 legs of the new call to the same extension. Channel attribute tells where you want to dial, and Context/Exten/Priority tell where to send the call once it is established. In your situation, you should probably specify in Context attribute the context where your SIP extension would get if he was to place a outgoing call normally (probably, the context value from your sip.conf record) > > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users > -- משיח NOW! Moshiach is coming very soon, prepare yourself! יחי אדוננו מורינו ורבינו מלך המשיח לעולם ועד! -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
Your both channels legs are identical strings. It should be like this. Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialContext2 Exten: outbound1 Priority: 1 Variable: recipient=0031612345678,callerid1=00311234567 Timeout: 1 ** ** [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) [originateDialContext2] exten => outbound1,1,Wait(1) exten => outbound1,n,Dial(SIP/${callerid1}@originateChannel) On Wed, Jun 19, 2013 at 11:20 AM, Grant Bagdasarian wrote: > Hello, > > ** ** > > I’d like to use the AMI interface to originate a call to a context in a > dialplan, and handoff the dial control to the context. > > ** ** > > Whenever I execute the below action, the recipient does ring, but when I > answer it dials the recipient again. I believe this is because once > answered the system is going to execute the Context/Exten/Prio in the > Originate action? > > ** ** > > Action: Originate > > Channel: Local/outbound1@originateDialContext > > CallerID: 00311234567 > > Context: originateDialContext > > Exten: outbound1 > > Priority: 1 > > Variable: recipient=0031612345678 > > Timeout: 1 > > ** ** > > [originateDialContext] > > exten => outbound1,1,Wait(1) > > exten => outbound1,n,Set(recipient=${recipient}) > > exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) > > ** ** > > Anyone have an idea how to fix this? > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users > -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
I used a combination of failed and the h extension to get the dialplan to do what I want. Thanks for the help guys! From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Satish Barot Sent: Wednesday, June 19, 2013 1:25 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate On Wed, Jun 19, 2013 at 4:00 PM, Grant Bagdasarian mailto:g...@cm.nl>> wrote: Why can't I execute any more dialplan after the Dial application? The scenario is when the Dial application dials the recipient but the recipient doesn't answer. The AMI will never go into the originateDialProcessor because the call was never answered. So I expect the Dialplan to continue after the Dial application has reached its timeout. From: asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com> [mailto:asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>] On Behalf Of Grant Bagdasarian Sent: Wednesday, June 19, 2013 11:24 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate I fixed it. The problem is just as I assumed; once the call is answered the dialplan goes into what's defined in Context/Exten/Prio of the Originate action. I changed the Context/Exten/Prio in the action and pointed it to something else. Now it works. Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialProcessor Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) [originateDialProcessor] exten => outbound1,1,Wait(1) exten => outbound1,n,NoOp(${DIALSTATUS}) exten => outbound1,n,Hangup From: asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lenz Emilitri Sent: Wednesday, June 19, 2013 10:10 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate Looks correct to me 2013/6/19 Grant Bagdasarian mailto:g...@cm.nl>> Hello, I'd like to use the AMI interface to originate a call to a context in a dialplan, and handoff the dial control to the context. Whenever I execute the below action, the recipient does ring, but when I answer it dials the recipient again. I believe this is because once answered the system is going to execute the Context/Exten/Prio in the Originate action? Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialContext Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) Anyone have an idea how to fix this? -- You need a special extension 'failed' in a context originateDialProcessor to catch the control when call doesn't get answered in first leg. [originateDialProcessor] exten => outbound1,1,Wait(1) exten => outbound1,n,NoOp(${DIALSTATUS}) exten => outbound1,n,Hangup exten => failed,1,NoOp(- CALL DIDN'T GET ANSWERED IN FIRST LEG -) --Satish Barot -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
On Wed, Jun 19, 2013 at 4:00 PM, Grant Bagdasarian wrote: > Why can’t I execute any more dialplan after the Dial application? The > scenario is when the Dial application dials the recipient but the recipient > doesn’t answer. The AMI will never go into the originateDialProcessor > because the call was never answered. So I expect the Dialplan to continue > after the Dial application has reached its timeout. > > ** ** > > *From:* asterisk-users-boun...@lists.digium.com [mailto: > asterisk-users-boun...@lists.digium.com] *On Behalf Of *Grant Bagdasarian > *Sent:* Wednesday, June 19, 2013 11:24 AM > > *To:* Asterisk Users Mailing List - Non-Commercial Discussion > *Subject:* Re: [asterisk-users] Handoff dial control to dialplan after > AMI Originate > > ** ** > > I fixed it. The problem is just as I assumed; once the call is answered > the dialplan goes into what’s defined in Context/Exten/Prio of the > Originate action. > > ** ** > > I changed the Context/Exten/Prio in the action and pointed it to something > else. Now it works. > > ** ** > > Action: Originate > > Channel: Local/outbound1@originateDialContext > > CallerID: 00311234567 > > Context: originateDialProcessor > > Exten: outbound1 > > Priority: 1 > > Variable: recipient=0031612345678 > > Timeout: 1 > > ** ** > > [originateDialContext] > > exten => outbound1,1,Wait(1) > > exten => outbound1,n,Set(recipient=${recipient}) > > exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) > > ** ** > > [originateDialProcessor] > > exten => outbound1,1,Wait(1) > > exten => outbound1,n,NoOp(${DIALSTATUS}) > > exten => outbound1,n,Hangup > > ** ** > > *From:* asterisk-users-boun...@lists.digium.com [ > mailto:asterisk-users-boun...@lists.digium.com] > *On Behalf Of *Lenz Emilitri > *Sent:* Wednesday, June 19, 2013 10:10 AM > *To:* Asterisk Users Mailing List - Non-Commercial Discussion > *Subject:* Re: [asterisk-users] Handoff dial control to dialplan after > AMI Originate > > ** ** > > Looks correct to me > > ** ** > > 2013/6/19 Grant Bagdasarian > > Hello, > > > > I’d like to use the AMI interface to originate a call to a context in a > dialplan, and handoff the dial control to the context. > > > > Whenever I execute the below action, the recipient does ring, but when I > answer it dials the recipient again. I believe this is because once > answered the system is going to execute the Context/Exten/Prio in the > Originate action? > > > > Action: Originate > > Channel: Local/outbound1@originateDialContext > > CallerID: 00311234567 > > Context: originateDialContext > > Exten: outbound1 > > Priority: 1 > > Variable: recipient=0031612345678 > > Timeout: 1 > > > > [originateDialContext] > > exten => outbound1,1,Wait(1) > > exten => outbound1,n,Set(recipient=${recipient}) > > exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) > > > > Anyone have an idea how to fix this? > > > -- > You need a special extension 'failed' in a context originateDialProcessor to catch the control when call doesn't get answered in first leg. [originateDialProcessor] exten => outbound1,1,Wait(1) exten => outbound1,n,NoOp(${DIALSTATUS}) exten => outbound1,n,Hangup exten => failed,1,NoOp(- CALL DIDN'T GET ANSWERED IN FIRST LEG -) --Satish Barot -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
Did you specify a timeout value? jg -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
Why can’t I execute any more dialplan after the Dial application? The scenario is when the Dial application dials the recipient but the recipient doesn’t answer. The AMI will never go into the originateDialProcessor because the call was never answered. So I expect the Dialplan to continue after the Dial application has reached its timeout. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Grant Bagdasarian Sent: Wednesday, June 19, 2013 11:24 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate I fixed it. The problem is just as I assumed; once the call is answered the dialplan goes into what’s defined in Context/Exten/Prio of the Originate action. I changed the Context/Exten/Prio in the action and pointed it to something else. Now it works. Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialProcessor Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) [originateDialProcessor] exten => outbound1,1,Wait(1) exten => outbound1,n,NoOp(${DIALSTATUS}) exten => outbound1,n,Hangup From: asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lenz Emilitri Sent: Wednesday, June 19, 2013 10:10 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate Looks correct to me 2013/6/19 Grant Bagdasarian mailto:g...@cm.nl>> Hello, I’d like to use the AMI interface to originate a call to a context in a dialplan, and handoff the dial control to the context. Whenever I execute the below action, the recipient does ring, but when I answer it dials the recipient again. I believe this is because once answered the system is going to execute the Context/Exten/Prio in the Originate action? Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialContext Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) Anyone have an idea how to fix this? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Loway - home of QueueMetrics - http://queuemetrics.com Test-drive WombatDialer beta @ http://wombatdialer.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
I fixed it. The problem is just as I assumed; once the call is answered the dialplan goes into what’s defined in Context/Exten/Prio of the Originate action. I changed the Context/Exten/Prio in the action and pointed it to something else. Now it works. Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialProcessor Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) [originateDialProcessor] exten => outbound1,1,Wait(1) exten => outbound1,n,NoOp(${DIALSTATUS}) exten => outbound1,n,Hangup From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lenz Emilitri Sent: Wednesday, June 19, 2013 10:10 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate Looks correct to me 2013/6/19 Grant Bagdasarian mailto:g...@cm.nl>> Hello, I’d like to use the AMI interface to originate a call to a context in a dialplan, and handoff the dial control to the context. Whenever I execute the below action, the recipient does ring, but when I answer it dials the recipient again. I believe this is because once answered the system is going to execute the Context/Exten/Prio in the Originate action? Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialContext Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) Anyone have an idea how to fix this? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Loway - home of QueueMetrics - http://queuemetrics.com Test-drive WombatDialer beta @ http://wombatdialer.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate
Looks correct to me 2013/6/19 Grant Bagdasarian > Hello, > > ** ** > > I’d like to use the AMI interface to originate a call to a context in a > dialplan, and handoff the dial control to the context. > > ** ** > > Whenever I execute the below action, the recipient does ring, but when I > answer it dials the recipient again. I believe this is because once > answered the system is going to execute the Context/Exten/Prio in the > Originate action? > > ** ** > > Action: Originate > > Channel: Local/outbound1@originateDialContext > > CallerID: 00311234567 > > Context: originateDialContext > > Exten: outbound1 > > Priority: 1 > > Variable: recipient=0031612345678 > > Timeout: 1 > > ** ** > > [originateDialContext] > > exten => outbound1,1,Wait(1) > > exten => outbound1,n,Set(recipient=${recipient}) > > exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) > > ** ** > > Anyone have an idea how to fix this? > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users > -- Loway - home of QueueMetrics - http://queuemetrics.com Test-drive WombatDialer beta @ http://wombatdialer.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Handoff dial control to dialplan after AMI Originate
Hello, I'd like to use the AMI interface to originate a call to a context in a dialplan, and handoff the dial control to the context. Whenever I execute the below action, the recipient does ring, but when I answer it dials the recipient again. I believe this is because once answered the system is going to execute the Context/Exten/Prio in the Originate action? Action: Originate Channel: Local/outbound1@originateDialContext CallerID: 00311234567 Context: originateDialContext Exten: outbound1 Priority: 1 Variable: recipient=0031612345678 Timeout: 1 [originateDialContext] exten => outbound1,1,Wait(1) exten => outbound1,n,Set(recipient=${recipient}) exten => outbound1,n,Dial(SIP/${recipient}@originateChannel) Anyone have an idea how to fix this? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users