<html 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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-CA link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>The answer is chan_pjsip. You can do this with chan_pjsip. There’s no real support for chan_sip anymore. It’s dead, it’s going away. No fixes or updates will be accepted against it as of this point.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>asterisk-users <asterisk-users-bounces@lists.digium.com> on behalf of Dovid Bender <dovid@telecurve.com><br><b>Reply-To: </b>Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br><b>Date: </b>Thursday, July 21, 2022 at 9:21 AM<br><b>To: </b>Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br><b>Subject: </b>Re: [asterisk-users] TCP dial via proxy<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>David,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>We had this exact "issue" in the past and were not able to figure out how to do it. Where we wanted tcp we prefixed the sip URI with "force_tcp". So:<o:p></o:p></p></div><div><p class=MsoNormal>Dial(SIP/<a href="http://1234@1.1.1.1/2.2.2.2">1234@1.1.1.1//2.2.2.2</a>)<o:p></o:p></p></div><div><p class=MsoNormal>became:<o:p></o:p></p></div><div><div><p class=MsoNormal>Dial(SIP/<a href="http://force_tcp1234@1.1.1.1/2.2.2.2">force_tcp1234@1.1.1.1//2.2.2.2</a>)<o:p></o:p></p></div></div><div><p class=MsoNormal>On Kamailio's side in the FORWARD block we added:<o:p></o:p></p></div><div><p class=MsoNormal># HACK for forcing TCP<br>                if ($oU != $null && $(oU{s.len}) != 0) {<br>                    $var(prefix) = $(oU{s.substr,0,9});<br>                    if ($var(prefix) == "force_tcp") {<br>                        $rU = $(oU{s.substr,9,0});<br>                        add_uri_param( "transport=tcp" );<br>                        $fs = "tcp:" + $Ri + ":5060";<br>                    }<br>                }<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Jul 20, 2022 at 10:47 PM David Cunningham <<a href="mailto:dcunningham@voisonics.com">dcunningham@voisonics.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal>Hello,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>We have an Asterisk dial which sends the call via a proxy using //, for example:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Dial(SIP/${EXTEN}@peer_address//proxy_address)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Does anyone know how we can make the SIP to the proxy use TCP? We tried making proxy_address match a peer in sip.conf with "transport = tcp" but that didn't seem to work. We are using chan_sip.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks very much for any advice.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal>David Cunningham, Voisonics Limited<br><a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>USA: +1 213 221 1092<br>New Zealand: +64 (0)28 2558 3782<o:p></o:p></p></div></div></div></div></div></div></div></div></div></div></div></div><p class=MsoNormal>-- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br><br>Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" target="_blank">https://community.asterisk.org/</a><br><br>New to Asterisk? Start here:<br>      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</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><o:p></o:p></p></blockquote></div><p class=MsoNormal>-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users<o:p></o:p></p></div></body></html>