<span class="Apple-style-span" style>My whole configuration is:</span><div style>[Sip clients] &lt; = &gt; Kamailio 3.2 &lt;=&gt; Asterisk servers (behind Kamailio)</div><div style>Asterisk servers have only local IP addresses, and I use t_relay instead of forward.</div>
<div style>Kamailio runs on same server as rtpproxy.</div><div>Everything is fine if clients connect to Kamailio with its IP address - global, or if they are behind Kamailio with local address.</div><div>When clients connect to Kamailio using <a href="http://sip.ourcompany.com">sip.ourcompany.com</a>, then call (video also) is OK, but ACK and BYE do not work.</div>
<div>BYE receives not here (404), and ACK die somewhere.</div><div>I forward BYE and ACK in case when src_ip==$td to Asterisk server.</div><div><br></div><div>If one of clients use IP - then calls initiated from it are OK (BYE/ACK - are going correctly - to Asterisk and to other client also). But calls from other client have problems with BYE and ACK.</div>
<div><br></div><div>To use <a href="http://sip.ourcompany.com">sip.ourcompany.com</a> - I put:</div><div>alias=<a href="http://sip.ourcompany.com">sip.ourcompany.com</a></div><div><br></div><div><br></div><div><div style>
route[ACKBYE] {</div><div style>#!ifdef WITH_PSTN</div><div style><span style="white-space:pre-wrap">        </span>if (is_method(&quot;BYE|ACK&quot;))</div><div style><span style="white-space:pre-wrap">        </span>{</div><div style>
<span style="white-space:pre-wrap">                </span>xlog(&quot;L_ALERT&quot;,&quot;AB $rm $sht(forw=&gt;$ft) $td&quot;);</div><div style><span style="white-space:pre-wrap">                </span>if(src_ip==$td){</div><div style>#I have to rewrite du - messages loop in Kamailio, I store in $sht(forw=&gt;$ft) $du which I use during INVITE.</div>
<div style><span style="white-space:pre-wrap">                        </span>$du=$sht(forw=&gt;$ft);</div><div style><span style="white-space:pre-wrap">                        </span>route(RELAY);</div><div style><span style="white-space:pre-wrap">                        </span>exit;</div>
<div style><span style="white-space:pre-wrap">                </span>}</div><div style><span style="white-space:pre-wrap">                </span>xlog(&quot;L_ALERT&quot;,&quot;ACK,Bye Not me&quot;);</div><div style><span style="white-space:pre-wrap">        </span>}</div>
<div style>#!endif</div><div style>return;</div><div style>}</div></div><div style><br></div>