<div><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="Возникла проблема." style="background-color: rgb(255, 255, 255); ">Hi!</span></span></span></pre>
<pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="Возникла проблема." style="background-color: rgb(255, 255, 255); "><span title="Возникла проблема." style="background-color: rgb(255, 255, 255); ">I have a problem with Kamailio. </span><span title="Иногда (невозможно уловить момент и условия возникновения) возникают ситуации, когда при звонке на uri XXX вызов приходит на YYY." style="background-color: rgb(255, 255, 255); ">Sometimes (can not catch the moment and conditions of) situations arise when, calling from AAA to uri XXX call comes to uri YYY. </span><span title="Вызов приходит из PSTN на серую подсеть юзерагентов, зарегистрированных на kamailio." style="background-color: rgb(235, 239, 249); ">The call comes from PSTN to the gray subnet of user-agents registered in kamailio. </span><span title="В качестве PSTN используется Audiocodes mediant." style="background-color: rgb(255, 255, 255); ">As the PSTN we using Audiocodes mediant. </span></span></span></span></pre>
<pre><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 22px; white-space: normal;">Kamailio ver. 1.5.3</span></font></pre><pre><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 22px; white-space: normal;">Mediant host: 172.19.32.2, Kamailio host: 172.19.32.3</span></font></pre>
<pre><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 22px; white-space: normal;">XXX host: 172.19.32.33, YYY host: 192.168.1.203</span></font></pre>
<pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="Вывел строчку в логе в секции route_branch:" style="background-color: rgb(255, 255, 255); ">I put a line in the log section route_branch: <br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Apr 28 12:59:20 sipproxy /ks/sbin/kamailio[18294]: [INFO] new branch at sip:XXX@172.19.32.33:5060;user=phone</font></blockquote></span><span title="========="><br>
</span><span title="Далее в логе модуль acc пишет:" style="background-color: rgb(255, 255, 255); ">Then in the log module acc wrote: <br></span><span title="========="><span class="Apple-style-span" style="font-family: arial; line-height: normal; font-size: small; "><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Apr 28 12:59:21 sipproxy /ks/sbin/kamailio[18302]: ACC: transaction answered: timestamp=1272473961;method=BYE;from_tag=1e76ae41;to_tag=1c1795565414;call_id=17</font></blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><a href="mailto:955646162422000234627@172.19.32.2">955646162422000234627@172.19.32.2</a>;code=481;reason=Call/Transaction Does Not Exist;from_uri=<a href="mailto:sip%3AXXX@172.19.32.3">sip:XXX@172.19.32.3</a>;from_username=XXX;from_name=;from_domain=</font></blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">172.19.32.3;to_uri=<a href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>;to_username=AAA;to_name=;to_domain=172.19.32.2;request_uri=<a href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>;request_username=AAA;route_id=;route_name=;route_type_id=;destination=;calllist_id=</font></blockquote>
</span></span></span></span></pre><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="Несмотря на ошибку, вызов проходит, но на другой uri." style="background-color: rgb(255, 255, 255); ">Despite the error, the call passes, but to the another uri.</span></span></span></pre>
<pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="Вот лог из медианта:" style="background-color: rgb(255, 255, 255); ">Here&#39;s the log of the mediant: <br>
</span><span title="1:">1: <br></span><span title="========="><span class="Apple-style-span" style="font-family: arial; line-height: normal; font-size: small; "><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Apr 28 12:52:31 172.19.32.2 (      lgr_flow)(44244101  )  ---- Outgoing SIP Message to <a href="http://172.19.32.3:5060">172.19.32.3:5060</a> ----</font></blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Apr 28 12:52:31 172.19.32.2 ACK sip:XXX@172.19.32.33:5060;user=phone SIP/2.0^M Via: SIP/2.0/UDP 172.19.32.2;branch=z9hG4bKac1897823584^M Max-Forwards: 70^M From: &lt;<a href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>&gt;;tag=1c1795565414^M To: &lt;<a href="mailto:sip%3AXXX@172.19.32.3">sip:XXX@172.19.32.3</a>&gt;;tag=1e76ae41^M Call-ID: <a href="mailto:17955646162422000234627@172.19.32.2">17955646162422000234627@172.19.32.2</a>^M CSeq: 1 ACK Contact: &lt;<a href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>&gt;^M Route: &lt;sip:172.19.32.3;lr;ftag=1c1795565414;vsf=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-&gt;^M Supported: em,timer,replaces,path,early-session,resource-priority^M Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE^M <b><font class="Apple-style-span" color="#FF0000">User-Agent: Audiocodes-Sip-Gateway-Mediant 2000/v.5.00A.045.003</font></b>^M Content-Length: 0</font></blockquote>
</span></span><span title="Как видно, все хорошо"><pre><span class="Apple-style-span" style="font-family: arial, sans-serif; white-space: normal; ">As you can see, in 1. all is well. But then:</span></pre></span><span title="2:">2: <br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">.....  ---- Incoming SIP Message from <a href="http://172.19.32.3:5060">172.19.32.3:5060</a> ----<span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span></font></blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="line-height: normal; font-size: small; ">....From: &lt;<a href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>&gt;;tag=1c1795565414^M Call-ID: <a href="mailto:17955646162422000234627@172.19.32.2">17955646162422000234627@172.19.32.2</a>^M CSeq: 1 INVITE^M Allow: INVITE, ACK, CANCEL,OPTIONS, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO^M Content-Type: application/sdp^M <b><font class="Apple-style-span" color="#FF0000">User-Agent: Zoiper for Windows rev.1105</font></b>^M Content-Length: 232^M ^M v=0^M <b><font class="Apple-style-span" color="#FF0000">o=Zoiper_user 0 0 IN IP4 192.168.1.203^M s=Zoiper_session^M c=IN IP4 192.168.1.203</font>^</b>M t=0 0^M m=audio 8000 RTP/AVP 8 0 101^M a=rtpmap:8 PCMA/8000^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101 telephone-event/8000^M a=fmtp:101 0-15^M a=sendrecv</span></font></blockquote>
</span></span></span></pre><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="========="><span class="Apple-style-span" style="font-family: arial; line-height: normal; font-size: small; "><div>
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; line-height: 22px; "><span title="А вот здесь уже произошла подмена поля Contact на данные совсем другого юзер-агента (uri YYY), который также зарегистрирован на Kamailio." style="background-color: rgb(255, 255, 255); ">And that is where the substitution occurred at the data fields &#39;Contact&#39; an entirely different user-agent (uri YYY), which is also registered on Kamailio. </span><span title="Именно на него в конечном итоге и приходит вызов.">That it eventually comes to call. <b>Repeat: In second SIP message from Kamailio &#39;Contact&#39; field is replaced by &#39;Contact&#39; of another (!) user-agent (YYY).</b></span></span></div>
</span></span><span title="Именно на него в конечном итоге и приходит вызов."><br></span><span title="Есть подозрения, что ошибка происходит в блоке:">There is a suspicion that an error occurs in a block: <br></span><span title="========"><span class="Apple-style-span" style="font-family: arial; line-height: normal; font-size: small; "><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">if (!lookup(&quot;location&quot;)) {</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">            switch ($retcode) {</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                case -3:</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                case -1:</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                case -2:</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">            }</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        }</font></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    }</font></blockquote></span><br><span class="Apple-style-span" style="line-height: normal; font-size: small;"><span class="Apple-style-span" style="line-height: 22px;"></span></span></span><span title="========"></span><span title="Сам же я нигде поле Contact не трогаю, поэтому все подозрения на locate()" style="background-color: rgb(255, 255, 255); ">I myself anywhere &#39;Contact&#39; field are not affected, so all suspected to <b>locate() </b>from module Registrar.</span></span></span></pre>
</div><div><div><div><div><br></div><div><div><br></div></div></div></div></div>