In wireshark, there are 2 fields - Source and Destination. I am curious if there are variables in Kamailio which can show me those values.<div>System:</div><div>MYIP - IP of kamailio</div><div><a href="http://sip.mydomain.com">sip.mydomain.com</a> - address of kamailio</div>
<div><br></div><div>User (Imsdroid for Android) -&gt;Kamailio-&gt;Asterisk-&gt;Kamailio (same) -&gt;Other user.</div><div>Problem - register, voice, video, and ring are OK, but ACK and BYE are going in dead loop - and this happens may be around in 50% of cases - not in all cases.</div>
<div>If I am using other client (like hardware SIP phones), then I have no problems, but it is really hard to find some client for Android which supports video with Kamailio.</div><div>To solve problem, I made one function in Kamailio.cfg - ACKBYE, which is called only within dialog. And within dialog is called in main route.</div>
<div><div>route[ACKBYE] {</div><div>#!ifdef WITH_MYFORWARD</div><div>xlog(&quot;SCRIPT: AckBye $td;$si;$du;$dd\n&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if((($td==&quot;<a href="http://sip.mydomain.com">sip.mydomain.com</a>&quot;)||($td==&quot;MYIP&quot;))&amp;&amp;($si==&quot;MYIP&quot;)){</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>$du=$sht(forw=&gt;$ft);</div><div>xlog(&quot;SCRIPT: AckBye2 $td;$si;$du\n&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>return;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>#!endif</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>return;</div><div>}</div></div><div>Of cource I have</div><div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>if(is_method(&quot;INVITE&quot;)){</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>ds_select_dst(&quot;1&quot;,&quot;4&quot;);</div><div>
<span class="Apple-tab-span" style="white-space:pre">                </span>$sht(forw=&gt;$ft)=$du;</div></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>This worked for long time. But then we updated client (libraries etc), and problem appeared again - from time to time. Calls between 2 same clients can pass 2 or 5 times, and then problem appear.</div>
<div>Before - $td and $si showed destination and source but now there is difference:</div><div><div>ERROR: &lt;script&gt;: SCRIPT: AckBye 192.168.2.251;MYIP;&lt;null&gt;;&lt;null&gt;</div><div>$td in this case show destination, which is correct, but in wireshark, destination and source = MYIP. </div>
</div><div><br></div><div><br></div><div><div>ACK sip:MYIP;lr=on;nat=yes SIP/2.0</div><div>Via: SIP/2.0/UDP MYIP;branch=z9hG4bKcydzigwkX</div><div>Via: SIP/2.0/UDP MYIP;rport=5060;branch=z9hG4bKcydzigwkX</div><div>............................................</div>
<div>Via: SIP/2.0/UDP MYIP;rport=5060;branch=z9hG4bKcydzigwkX</div><div>Via: SIP/2.0/UDP 192.168.2.105:44794;branch=z9hG4bK338581244;rport=44794</div><div>From: &lt;<a href="mailto:sip%3A11171@sip.MYDOMAIN.com">sip:11171@sip.MYDOMAIN.com</a>&gt;;tag=1687441663</div>
<div>To: &lt;<a href="mailto:sip%3A11175@192.168.2.251">sip:11175@192.168.2.251</a>&gt;;tag=as13c57096</div><div>Contact: &lt;sip:11171@MYIP:5060;transport=udp&gt;;+g.oma.sip-im;language=&quot;en,fr&quot;;+g.3gpp.icsi-ref=&quot;urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel&quot;</div>
<div>Call-ID: 4026cd88-aab9-19db-dfbe-1510baafdbb3</div><div>CSeq: 473985105 ACK</div><div>Content-Length: 0</div><div>Max-Forwards:  0</div><div>Proxy-Authorization: Digest username=&quot;11171&quot;,realm=&quot;<a href="http://sip.stribogkonsult.com">sip.stribogkonsult.com</a>&quot;,nonce=&quot;T2NZUU9jWCWxMUHSQweHXVQppHS8iFhd&quot;,uri=&quot;sip:11175@MYIP:5060&quot;,response=&quot;c5a95942af1502c208fa05d34c405907&quot;,algorithm=MD5</div>
<div>Accept-Contact: *;+g.3gpp.icsi-ref=&quot;urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel&quot;</div><div>P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel</div><div>Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER</div>
<div>Privacy: none</div><div>P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000</div><div>User-Agent: IM-client/OMA1.0 android-ngn-stack/v2.0.453 (doubango r653)</div><div><br></div></div>