<div dir="ltr"><br><div>Thanks all for your help, in the end I was able to do something like:</div><div><br></div><div>Action: Originate<br></div><div>
Channel: Local/300@from-internal/n
</div><div>Application: MusicOnHold<br>Async: 1<br><br></div><div><br></div><div>As soon as this connects, the callee hears MOH. I get the channel out via AMI events and start another call:<br><br>Action: Originate<br></div>
<div>
Channel: Local/301@from-internal/n
</div><div>Application: Bridge<br>Data: Local/300@from-internal-aa8c;1<br>
Async: 1
<br></div><div><br></div><div>when this connects, it is immediately bridged to the first callee. I just have to keep track of errors and hang up the first call if the seconds does not go through.</div><div><br></div><div>
Thanks a lot!</div><div>l.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/15 Dan Cropp <span dir="ltr"><<a href="mailto:dan@amtelco.com" target="_blank">dan@amtelco.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You could use AsyncAGI to achieve this.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Setup an extension, naming it something like patching<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">exten => patching,1,AGI(agi:async)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal">Action: Originate<br>Channel: Local/300@from-internal<u></u><u></u></p>
<p class="MsoNormal">Async: 1 <br>Exten: 1<u></u><u></u></p><p class="MsoNormal">Context: patching<br>Data: 1973<u></u><u></u></p><p class="MsoNormal">Variable: YourUniquePatchID=1234<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Have a great day!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Dan<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Lenz Emilitri<br>
<b>Sent:</b> Tuesday, May 14, 2013 11:16 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> [asterisk-users] dial and bridge<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal">
<u></u> <u></u></p><div><p class="MsoNormal"><br clear="all"><u></u><u></u></p><div><p class="MsoNormal">Hi all,<u></u><u></u></p></div><div><p class="MsoNormal">I need some advice - I have been working on originating multiple calls using AMI and then joining them. <u></u><u></u></p>
</div><div><p class="MsoNormal">What I want to do is:<u></u><u></u></p></div><div><p class="MsoNormal">- dial call 1 (where the caller is in a "channel" format, like SIp/1234 or Local/1234@ext) and "park" it somehow<u></u><u></u></p>
</div><div><p class="MsoNormal">- dial call 2 (where again the caller is in channel format) and join it to the previous call.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">
As a requirement, I cannot use the dialplan as an end-point (as I cannot change it) but need to use the AMI only.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I tried doing something like:<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Action: Originate<br>Channel: Local/300@from-internal<u></u><u></u></p></div><div><p class="MsoNormal">Async: 1 <br>Application: Wait<br>Data: 1973<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">So that the call goes to 300 and then basically stays there forever, and then I dial again:<u></u><u></u></p></div><div><p class="MsoNormal">
<u></u> <u></u></p></div><div><div><p class="MsoNormal">Action: Originate<br>Channel: Local/500@from-internal<u></u><u></u></p></div><div><p class="MsoNormal">Async: 1 <br>Application: Wait<br>Data: 1973<u></u><u></u></p>
</div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">And then try to bridge the results, but it does not seem to work.<u></u><u></u></p></div><div><p class="MsoNormal">What I would like to do would be more on the lines of:<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Originate call 1 and park it (using a park or waiting)<u></u><u></u></p></div><div><p class="MsoNormal">Originate call 2 and bridge it immediately to call1 (using the Application part)<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">But maybe I am missing something? is there anybody who has better suggestions?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p>
</div><div><p class="MsoNormal">Thanks<u></u><u></u></p></div><div><p class="MsoNormal">l.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div>
<p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p>
<div><p class="MsoNormal">Loway - home of QueueMetrics - <a href="http://queuemetrics.com" target="_blank">http://queuemetrics.com</a><u></u><u></u></p></div><div><p class="MsoNormal">Test-drive WombatDialer beta @ <a href="http://wombatdialer.com" target="_blank">http://wombatdialer.com</a> <u></u><u></u></p>
</div></div></div></div></div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div>Loway - home of QueueMetrics - <a href="http://queuemetrics.com" target="_blank">http://queuemetrics.com</a><br>
</div><div>Test-drive WombatDialer beta @ <a href="http://wombatdialer.com" target="_blank">http://wombatdialer.com</a>
</div>
</div>