<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello Andrew,</p>
<p>4.1.x is really really old. Please update to a supported version of Kamailio, e.g. from the 5.1 or 5.2 branch. There are many bugs fixed.</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="moz-cite-prefix">Am 11.04.19 um 22:36 schrieb Andrew Chen:<br>
</div>
<blockquote type="cite" cite="mid:CAEytwJ2uyEAt83rerMQa-QexpwJxZR2AbrL3ZQ5rJvd-F9f=-g@mail.gmail.com">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>Got another anomaly in 4.1.5.  I have this block of code which does t_relay_tcp:</div>
<div><br>
</div>
<div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span>if ($var(isTpgw) =</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">= 1)</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">       
</span>{</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span>xlog("L_INFO","</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">[$ci][$mi][CSeq $cs]</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> isTpgw =</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">
 $var(isTpgw)")</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">;</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span>if (!t_relay_to_tcp())</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(0,230,230)">{</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                       
</span>xlog("L_INFO","</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">[$ci][$mi][CSeq $cs] $ua Relaying [$rm]</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> from ($si) to
 ($rd) via tcp....Error...\n")</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                       
</span>t_on_failure("DISPATCHER_FAIL")</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(0,230,230)">}</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span>else</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span>{</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                       
</span>xlog("L_INFO","</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">[$ci][$mi][CSeq $cs] $ua Relaying [$rm]</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> from ($si) to
 ($rd) via tcp\n")</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">               
</span>}</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">       
</span>}</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">But when I looked at my sip capture tool, it showed the Via marked by the Kam to use UDP:</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span></p>
<pre style="box-sizing:border-box;color:rgb(0,0,0);font-size:11px">INVITE sip:######@<some domain>:5060 SIP/2.0
Record-Route: <sip:206.81.191.30;r2=on;lr=on>
Record-Route: <sip:206.81.191.30;transport=tcp;r2=on;lr=on>
Call-ID: <a href="mailto:DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM" moz-do-not-send="true">DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM</a>
To: "<a href="mailto:sip%3A6204857@sjomaintpsg50.fuzemeeting.com" moz-do-not-send="true">sip:6204857@sjomaintpsg50.fuzemeeting.com</a>" <<a href="mailto:sip%3A6204857@sjomaintpsg50.fuzemeeting.com" moz-do-not-send="true">sip:6204857@sjomaintpsg50.fuzemeeting.com</a>>
From: "LifesizeSIP" <<a href="http://sip:LifesizeSIP@gs-3924.GSLAB.COM:5060" moz-do-not-send="true">sip:LifesizeSIP@gs-3924.GSLAB.COM:5060</a>>;tag=DL325a9e10c7;epid=062EE468
CSeq: 1 INVITE
Max-Forwards: 69
Via: SIP/2.0/UDP 206.81.191.30;branch=z9hG4bKb16b.bd6a0791c798e3c859f8608993d584ae.1;i=5611
Via: SIP/2.0/TCP 10.101.199.105:5060;rport=53272;branch=z9hG4bK-fc8090ecf8-DL</pre>
<div>206.81.191.30 is the Kam.</div>
<div><br>
</div>
<div>I also log the activity as seen in the code with those xlog:</div>
<div><br>
</div>
<div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Apr 11 19:38:37 sjomaintpsg50 /usr/local/sbin/kamailio[16348]: INFO: <script>: [<a href="mailto:DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM" moz-do-not-send="true">DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM</a>][42][CSeq
 1] isTpgw = 1</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Apr 11 19:38:37 sjomaintpsg50 /usr/local/sbin/kamailio[16348]: INFO: <script>: [<a href="mailto:DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM" moz-do-not-send="true">DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM</a>][42][CSeq
 1] LifeSize Softphone 8.1.12 (Windows) Relaying [INVITE] from (10.101.19</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">9.105) to (206.81.191.72) via tcp</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">So why did the Kamailio mark the Via header on the outgoing INVITE UDP?</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
</div>
-- <br>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr" style="font-size:12.8px">Andy Chen</div>
<div dir="ltr" style="font-size:12.8px">
<div>Sr. Telephony Lead Engineer</div>
<div><a href="mailto:achen@thinkingphones.com" target="_blank" moz-do-not-send="true">achen@</a><a href="http://fuze.com" target="_blank" moz-do-not-send="true">fuze.com</a><br>
</div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">*Confidentiality Notice: The information contained in this e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments may be confidential. If you are not an intended recipient, you</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">are hereby notified that any dissemination, distribution or copying of this</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">e-mail is strictly prohibited. If you have received this e-mail in error,</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">please notify the sender and permanently delete the e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments immediately. You should not retain, copy or use this e-mail or</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">any attachment for any purpose, nor disclose all or any part of the</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">contents to any other person. Thank you.*</span>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>