<meta charset="utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Sorry, last mail forgot to attach file, send again.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div>Dear Klaus,<div><br></div><div>Thanks for your help last time. Your response is always so quick.</div>
<div><br></div><div>Following your advice, I&#39;ve attached the log of Kamailio3.1 in this message.(debug=3)</div><div><br></div><div>Something strange can be found in this log as below:</div><div>( 10.150.175.210 is the private ip of the Amazon EC2 server)</div>
<div>--------------------------------------------------------------------------------------------------------------------</div><div><div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us: 17==9 &amp;&amp;  [<a href="http://sip.mydomain.org/" target="_blank" style="color: rgb(0, 0, 204); ">sip.mydomain.org</a>] == [127.0.0.1]</div>
<div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060</div><div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us: 17==14 &amp;&amp;  [<a href="http://sip.mydomain.org/" target="_blank" style="color: rgb(0, 0, 204); ">sip.mydomain.org</a>] == [10.150.175.210]</div>
<div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060</div><div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us: 17==9 &amp;&amp;  [<a href="http://sip.mydomain.org/" target="_blank" style="color: rgb(0, 0, 204); ">sip.mydomain.org</a>] == [127.0.0.1]</div>
<div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060</div><div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us: 17==14 &amp;&amp;  [<a href="http://sip.mydomain.org/" target="_blank" style="color: rgb(0, 0, 204); ">sip.mydomain.org</a>] == [10.150.175.210]</div>
<div>17(1715) DEBUG: &lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060</div></div><div><div>--------------------------------------------------------------------------------------------------------------------</div>
<div></div></div><div><br></div><div>Any kind of hint further??</div><div><br></div><div>Your help will be great appreciated.</div></span><br><div class="gmail_quote">2011/7/29 Klaus Darilion <span dir="ltr">&lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Looping usually means, that Kamailio fails to detect that the message is<br>
target to itself. This is often caused by if the SIP domain in the<br>
request URI is not know to Kamailio&#39;s aliases.<br>
<br>
If you can not fix it, enable debug=3 and watch how the message is<br>
processed through the script to find out where the message is routed<br>
falsely.<br>
<br>
<br>
regards<br>
Klaus<br>
<br>
Am 29.07.2011 11:21, schrieb Coca:<br>
<div class="im">&gt; Dear List,<br>
&gt;<br>
&gt; I have Kamailio 3.1 installed in Amazon EC 2 server.<br>
&gt; Everything is working fine except that every REGISTER / MESSAGE was<br>
&gt; looped for twice or 3 times.<br>
&gt; And I am sure this is not caused by UA.<br>
&gt;<br>
&gt; I have attached the ngrep log in this message.<br>
&gt; And also, my main modification to the kamailio.cfg is like below:<br>
&gt;<br>
&gt; Your help will be great great appreciated.<br>
&gt;<br>
&gt; Thank you!!<br>
&gt;<br>
&gt; Coca<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------<br>
&gt;<br>
&gt; #!define WITH_MYSQL<br>
&gt; #!define WITH_NAT<br>
&gt;<br>
&gt;<br>
</div>&gt; alias=&quot;<a href="http://mydomain.org" target="_blank">mydomain.org</a> &lt;<a href="http://mydomain.org" target="_blank">http://mydomain.org</a>&gt;&quot;<br>
<div><div></div><div class="h5">&gt; alias=&quot;xx.xx.xx.xx&quot;<br>
&gt;<br>
&gt; advertised_address=&quot;xx.xx.xx.xx&quot;<br>
&gt;<br>
&gt; ...<br>
&gt; ...<br>
&gt;<br>
&gt; route {<br>
&gt;<br>
&gt; # per request initial checks<br>
&gt; route(REQINIT);<br>
&gt;<br>
&gt; # NAT detection<br>
&gt; route(NAT);<br>
&gt;<br>
&gt; # handle requests within SIP dialogs<br>
&gt; route(WITHINDLG);<br>
&gt;<br>
&gt; ### only initial requests (no To tag)<br>
&gt;<br>
&gt; # CANCEL processing<br>
&gt; if (is_method(&quot;CANCEL&quot;))<br>
&gt; {<br>
&gt; if (t_check_trans())<br>
&gt; t_relay();<br>
&gt; exit;<br>
&gt; }<br>
&gt;<br>
&gt; t_check_trans();<br>
&gt;<br>
&gt; # authentication<br>
&gt; route(AUTH);<br>
&gt;<br>
&gt; # record routing for dialog forming requests (in case they are routed)<br>
&gt; # - remove preloaded route headers<br>
&gt; remove_hf(&quot;Route&quot;);<br>
&gt; if (is_method(&quot;INVITE|SUBSCRIBE&quot;))<br>
&gt; {<br>
&gt; #record_route();<br>
&gt; /* for NAT support */<br>
&gt; record_route_preset(&quot;xx.xx.xx.xx&quot;);<br>
&gt; }<br>
&gt;<br>
&gt; # account only INVITEs<br>
&gt; if (is_method(&quot;INVITE&quot;))<br>
&gt; {<br>
&gt; setflag(FLT_ACC); # do accounting<br>
&gt; }<br>
&gt;<br>
&gt; # dispatch requests to foreign domains<br>
&gt; route(SIPOUT);<br>
&gt;<br>
&gt; ### requests for my local domains<br>
&gt;<br>
&gt; # handle presence related requests<br>
&gt; route(PRESENCE);<br>
&gt;<br>
&gt; # handle registrations<br>
&gt; route(REGISTRAR);<br>
&gt;<br>
&gt; if ($rU==$null)<br>
&gt; {<br>
&gt; # request with no Username in RURI<br>
&gt; sl_send_reply(&quot;484&quot;,&quot;Address Incomplete&quot;);<br>
&gt; exit;<br>
&gt; }<br>
&gt;<br>
&gt; # dispatch destinations to PSTN<br>
&gt; route(PSTN);<br>
&gt;<br>
&gt; # user location service<br>
&gt; route(LOCATION);<br>
&gt;<br>
&gt; route(RELAY);<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; # Handle SIP registrations<br>
&gt; route[REGISTRAR] {<br>
&gt; if (is_method(&quot;REGISTER&quot;))<br>
&gt; {<br>
&gt; if(isflagset(FLT_NATS))<br>
&gt; {<br>
&gt; setbflag(FLB_NATB);<br>
&gt; # uncomment next line to do SIP NAT pinging<br>
&gt; setbflag(FLB_NATSIPPING);<br>
&gt; }<br>
&gt; if (!save(&quot;location&quot;))<br>
&gt; sl_reply_error();<br>
&gt;<br>
&gt; exit;<br>
&gt; }<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; sr-dev mailing list<br>
&gt; <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div><br>