<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>That’s what I do, it works without fail<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> asterisk-app-dev <asterisk-app-dev-bounces@lists.digium.com> <b>On Behalf Of </b>Iván Aponte<br><b>Sent:</b> Wednesday, December 23, 2020 12:59 PM<br><b>To:</b> Asterisk Application Development discussion <asterisk-app-dev@lists.digium.com><br><b>Subject:</b> Re: [asterisk-app-dev] Handling transfers with ARI<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>Hello, <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I usually create a context in the dialplan to transfer the calls then in the code I use <span style='font-family:"Courier New"'>:</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>channel.continueInDialplan({<br> context: 'transfer_ctx',<br> extension: extensionToCall<br> })<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Hope this helps<o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Dec 23, 2020 at 2:46 PM Phil Mickelson <<a href="mailto:phil@cbasoftware.com">phil@cbasoftware.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=MsoNormal>Unfortunately, I suspect my situation is different from yours in that I control everything. And, when Bob wants to transfer the call he clicks a button on the screen, not a button on the phone. I don't use any part of the dialplan except to start ARI.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Sorry.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Phil<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Dec 23, 2020 at 2:56 AM Jean Aunis <<a href="mailto:jean.aunis@prescom.fr" target="_blank">jean.aunis@prescom.fr</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p>Thanks for the answer.<o:p></o:p></p><p>Not sure I get the idea : when a SIP phone performs a blind-transfer, I have no control over what Asterisk does with the channels. During my tests, Bob's channel was automatically pulled out of the bridge, and replaced with a Local channel whose peer goes through the dialplan to the transfer destination.<o:p></o:p></p><p>How can you link the newly created Local channel with Alice's one ?<o:p></o:p></p><p>For the moment, I have a piece of solution with the BridgeBlindTransfer event, but I still have troubles with these Local channel issues.<o:p></o:p></p><div><p class=MsoNormal>Le 22/12/2020 à 20:13, Phil Mickelson a écrit :<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Not sure if this will help but what I do is fairly simple. A couple of things: <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>1. This is all written in JS using Node.js.<o:p></o:p></p></div><div><p class=MsoNormal>2. I use ari-client from npm.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>To me this is very simple. You already have the bridge and channel setup for Alice. I create another channel that dials Charlie. And, as soon as the create channel call comes back I just set the channel id (was Bob) in the bridge to the new channel for Charlie. That's it. If it doesn't get answered I hope it goes to VM. However, that's the downside of a blind transfer. I have some code in there for what happens if Alice hangs up before Charlie answers, etc but that's because I keep track of every call in my system.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>And I wrote all of this before there were Promises and Async/Await. Hopefully next year I'll have the time to rewrite the whole thing.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>And, for the people at Asterisk who came up with the idea of ARI. Thank you soooo much. Hope everyone has a wonderful holiday and that 2021 is much better than 2020!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Phil<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Tue, Dec 22, 2020 at 5:38 AM Jean Aunis <<a href="mailto:jean.aunis@prescom.fr" target="_blank">jean.aunis@prescom.fr</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Hello,<br><br>I'm struggling to find a way to properly handle blind transfers with ARI.<br><br>This is my use case :<br><br>- Alice calls Bob through Asterisk<br><br>- dialing and bridging is done with ARI<br><br>- when Bob blind-transfers to Charlie, I would like to use the <br>"redirect" ARI operation, or the Transfer application<br><br>But here is the issue : since the channels are stasis-managed, <br>transferring is done with Local channels which remain in the path, so <br>Transfer and redirect have no effect on them. And Alice's channel is not <br>aware that it is being transferred.<br><br>Has somebody already dealt with this ?<br><br>Regards,<br><br>Jean<br><br><br>_______________________________________________<br>asterisk-app-dev mailing list<br><a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.com</a><br><a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>asterisk-app-dev mailing list<o:p></o:p></pre><pre><a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.com</a><o:p></o:p></pre><pre><a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev</a><o:p></o:p></pre></blockquote></div><p class=MsoNormal>_______________________________________________<br>asterisk-app-dev mailing list<br><a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.com</a><br><a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev</a><o:p></o:p></p></blockquote></div><p class=MsoNormal>_______________________________________________<br>asterisk-app-dev mailing list<br><a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.com</a><br><a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><p class=MsoNormal>Iván Aponte<br>Office: +58(212)9923193<br>Mobile: +58(412)2774713<o:p></o:p></p></div></div></body></html>