[asterisk-users] Handoff dial control to dialplan after AMI Originate

Mordechay Kaganer mkaganer at gmail.com
Sun Jun 30 09:38:02 CDT 2013


B.H.


On Wed, Jun 19, 2013 at 10:20 AM, Grant Bagdasarian <GB at cm.nl> 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 at originateDialContext****
>
> CallerID: 00311234567****
>
> Context: originateDialContext****
>
> Exten: outbound1****
>
> Priority: 1****
>
> Variable: recipient=0031612345678****
>
> Timeout: 10000****
>
> ** **
>
> [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!
יחי אדוננו מורינו ורבינו מלך המשיח לעולם ועד!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130630/8dc6d40a/attachment.htm>


More information about the asterisk-users mailing list