[asterisk-users] dial and bridge

Dan Cropp dan at amtelco.com
Wed May 15 08:34:33 CDT 2013


You could use AsyncAGI to achieve this.

 

Originate the first call (passing in some unique identifier as a variable), then using AMI you will see the channel data.  When you see an Event: AysncAGI for that channel (with that id, you have control of the call).  Send a Dial Action telling it to dial the call and bridge them together if the person answers.  If they don’t answer, you will be notified and can do something with the original call (play a message, hangup, etc).  If they are bridged, you can see how long, etc.

 

Setup an extension, naming it something like patching

 

exten => patching,1,AGI(agi:async)

 

Action: Originate
Channel: Local/300 at from-internal

Async: 1 
Exten: 1

Context: patching
Data: 1973

Variable: YourUniquePatchID=1234

 

 

Using AsyncAGI and AMI, you can have full control of the call.  You do have to setup a very simple dial plan so Asterisk knows you are using AsyncAGI to control the call.

 

Have a great day!

Dan

 

 

 

From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Lenz Emilitri
Sent: Tuesday, May 14, 2013 11:16 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] dial and bridge

 




Hi all,

I need some advice - I have been working on originating multiple calls using AMI and then joining them. 

What I want to do is:

- dial call 1 (where the caller is in a "channel" format, like SIp/1234 or Local/1234 at ext) and "park" it somehow

- dial call 2 (where again the caller is in channel format) and join it to the previous call.

 

As a requirement, I cannot use the dialplan as an end-point (as I cannot change it) but need to use the AMI only.

 

I tried doing something like:

 

Action: Originate
Channel: Local/300 at from-internal

Async: 1 
Application: Wait
Data: 1973

 

So that the call goes to 300 and then basically stays there forever, and then I dial again:

 

Action: Originate
Channel: Local/500 at from-internal

Async: 1 
Application: Wait
Data: 1973

  

And then try to bridge the results, but it does not seem to work.

What I would like to do would be more on the lines of:

 

Originate call 1 and park it (using a park or waiting)

Originate call 2 and bridge it immediately to call1 (using the Application part)

 

But maybe I am missing something? is there anybody who has better suggestions?

 

Thanks

l.

 

 

 

 

 

 

-- 

Loway - home of QueueMetrics - http://queuemetrics.com

Test-drive WombatDialer beta @ http://wombatdialer.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130515/86284f47/attachment.htm>


More information about the asterisk-users mailing list