<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:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@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: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;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{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: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"> Code snippet<o:p></o:p></p>
<p class="MsoNormal">#!ifdef WITH_TCP<o:p></o:p></p>
<p class="MsoNormal"> #$ru = $ru + ";transport=tcp";<o:p></o:p></p>
<p class="MsoNormal"> #force_send_socket(xx.xx.xx.xx:5060); where xx.xx.xx.xx is Kamailio IP-Address<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO","=>Transport TCP");<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO"," =>du:$du");<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO"," =>ru:$ru");<o:p></o:p></p>
<p class="MsoNormal"> if (!t_relay_to_tcp()) {<o:p></o:p></p>
<p class="MsoNormal"> sl_reply_error();<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal">#!else<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO","=>Transport UDP");<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO"," =>du:$du");<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO"," =>ru:$ru");<o:p></o:p></p>
<p class="MsoNormal"> if (!t_relay()) {<o:p></o:p></p>
<p class="MsoNormal"> sl_reply_error();<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal">#!endif<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">LOG =><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ERROR: <core> [core/pvapi.c:1377]: pv_printf(): no more space for spec value<o:p></o:p></p>
<p class="MsoNormal">ERROR: <core> [core/pvapi.c:1386]: pv_printf(): buffer overflow -- increase the<o:p></o:p></p>
<p class="MsoNormal"> NOTE: I have both of these set to 8K and still get these errors<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">INFO: <script>: =>Transport TCP<o:p></o:p></p>
<p class="MsoNormal">INFO: <script>: =>du:sip:9NCUg2nceiuKagasFQFsAbtsMGcH1yE=@xx.xx.xx.xx:54080;transport=TCP;lr;r2=on;ftag=suhg8sv2lm;nat=yes<o:p></o:p></p>
<p class="MsoNormal">INFO: <script>: =>ru:sip:9NCUg2nceiuKagasFQFsAbtsMGcH1yE=@xx.xx.xx.xx:54080;transport=TCP;lr;r2=on;ftag=suhg8sv2lm;nat=yes<o:p></o:p></p>
<p class="MsoNormal">WARNING: <core> [core/forward.c:231]: get_send_socket2(): protocol/port mismatch (forced tls:xx.xx.xx.xx:443, to tcp:xx.xx.xx.xx:54080)<o:p></o:p></p>
<p class="MsoNormal">ERROR: <core> [core/tcp_main.c:2660]: tcpconn_1st_send(): connect 172.21.1.108:54080 failed (RST) Connection refused<o:p></o:p></p>
<p class="MsoNormal">ERROR: <core> [core/tcp_main.c:2670]: tcpconn_1st_send(): xx.xx.xx.xx:54080: connect & send for 0x7f1915a61040 failed: Connection refused (111)<o:p></o:p></p>
<p class="MsoNormal"> NOTE: Our tcp ports are controlled, a port number this high would never be opend on our server<o:p></o:p></p>
<p class="MsoNormal"> NOTE: This error occurs on ACK back to the INVITE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a name="_MailEndCompose"><o:p> </o:p></a></p>
<span style="mso-bookmark:_MailEndCompose"></span>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> sr-users [mailto:sr-users-bounces@lists.kamailio.org]
<b>On Behalf Of </b>Mack Hendricks<br>
<b>Sent:</b> Thursday, May 17, 2018 9:43 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> Re: [SR-Users] Further question on transport issue.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hey Steve,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Can provide us a snippet of code on how you are populating the $ru and making invoking the relay?<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black">Mack Hendricks / Head of Support / dOpenSource</span></b><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black">web: <a href="http://dopensource.com">http://dopensource.com</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black">support: +888-907-2085<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black"><a href="http://dsiprouter.org">dSIPRouter</a> - GUI focused on implementing Kamailio to provide SIP Trunking and PBX Hosting Services<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On May 17, 2018, at 3:36 PM, Wilkins, Steve <<a href="mailto:swwilkins@mitre.org">swwilkins@mitre.org</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<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">I am still struggling with getting TCP relay to work. Kamailio is now trying to send TCP but it is using the incorrect port. Kamailio is relaying to Asterisk on xx.xx.xx.xx:<b>some-large-port</b><span class="apple-converted-space"> </span>but
Asterisk is listening on xx.xx.xx.xx:<b>5060</b>. I’m not sure why this is happening. I would appreciate any help.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
</span><a href="mailto:sr-users@lists.kamailio.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:#954F72">sr-users@lists.kamailio.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:#954F72">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>