<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
I found it hard to follow what is wrong here, can you get the SIP
traffic on kamailio server and post it here? You can use:<br>
<br>
ngrep -d any -qt -W byline port 5060<br>
<br>
on your kamailio server.<br>
<br>
Then we can see if it something wrong there and who is responsible for
it.<br>
<br>
Kamailio is hardly changing anything in the sip messages, unless you
instruct it to do so via config. Changing the Contact is for sure a
matter of config file.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 4/29/10 12:16 PM, Konstantin Shpinev wrote:
<blockquote
 cite="mid:p2w76fe30891004290316ydd07360ai62c4d1c08bb4faa4@mail.gmail.com"
 type="cite">
  <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: 

<blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">Apr 28 12:59:20 sipproxy /ks/sbin/kamailio[18294]: [INFO] new branch at <a class="moz-txt-link-abbreviated" href="mailto:sip:XXX@172.19.32.33:5060;user=phone">sip:XXX@172.19.32.33:5060;user=phone</a></font></blockquote></span><span
 title="=========">

</span><span title="Далее в логе модуль acc пишет:"
 style="background-color: rgb(255, 255, 255);">Then in the log module acc wrote: 
</span><span title="========="><span class="Apple-style-span"
 style="font-family: arial; line-height: normal; font-size: small;"><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', 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="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace"><a
 moz-do-not-send="true" href="mailto:955646162422000234627@172.19.32.2">955646162422000234627@172.19.32.2</a>;code=481;reason=Call/Transaction Does Not Exist;from_uri=<a
 moz-do-not-send="true" 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="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">172.19.32.3;to_uri=<a
 moz-do-not-send="true" 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
 moz-do-not-send="true" 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's the log of the mediant: 

</span><span title="1:">1: 
</span><span title="========="><span class="Apple-style-span"
 style="font-family: arial; line-height: normal; font-size: small;"><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">Apr 28 12:52:31 172.19.32.2 (      lgr_flow)(44244101  )  ---- Outgoing SIP Message to <a
 moz-do-not-send="true" href="http://172.19.32.3:5060">172.19.32.3:5060</a> ----</font></blockquote>
<blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">Apr 28 12:52:31 172.19.32.2 ACK <a class="moz-txt-link-abbreviated" href="mailto:sip:XXX@172.19.32.33:5060;user=phone">sip:XXX@172.19.32.33:5060;user=phone</a> SIP/2.0^M Via: SIP/2.0/UDP 172.19.32.2;branch=z9hG4bKac1897823584^M Max-Forwards: 70^M From: &lt;<a
 moz-do-not-send="true" href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>&gt;;tag=1c1795565414^M To: &lt;<a
 moz-do-not-send="true" href="mailto:sip%3AXXX@172.19.32.3">sip:XXX@172.19.32.3</a>&gt;;tag=1e76ae41^M Call-ID: <a
 moz-do-not-send="true"
 href="mailto:17955646162422000234627@172.19.32.2">17955646162422000234627@172.19.32.2</a>^M CSeq: 1 ACK Contact: &lt;<a
 moz-do-not-send="true" 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: 

<blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">.....  ---- Incoming SIP Message from <a
 moz-do-not-send="true" 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="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace"><span
 class="Apple-style-span" style="line-height: normal; font-size: small;">....From: &lt;<a
 moz-do-not-send="true" href="mailto:sip%3AAAA@172.19.32.2">sip:AAA@172.19.32.2</a>&gt;;tag=1c1795565414^M Call-ID: <a
 moz-do-not-send="true"
 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 'Contact' 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 'Contact' field is replaced by 'Contact' of another (!) user-agent (YYY).</b></span></span></div>
</span></span><span
 title="Именно на него в конечном итоге и приходит вызов.">
</span><span title="Есть подозрения, что ошибка происходит в блоке:">There is a suspicion that an error occurs in a block: 
</span><span title="========"><span class="Apple-style-span"
 style="font-family: arial; line-height: normal; font-size: small;"><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">if (!lookup("location")) {</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">            switch ($retcode) {</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">                case -3:</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">...</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">                case -1:</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">...</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">                case -2:</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">...</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">            }</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">        }</font></blockquote><blockquote
 class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<font class="Apple-style-span" face="'courier new', monospace">    }</font></blockquote></span>
<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 'Contact' 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>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
* <a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
* <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a>
* <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/danielconstantinmierla">http://www.linkedin.com/in/danielconstantinmierla</a> 
</pre>
</body>
</html>