Thanks, <div>Just what I need. Now it works.</div><div><br><br><div class="gmail_quote">On Mon, Jan 23, 2012 at 5:20 PM, Reda Aouad <span dir="ltr">&lt;<a href="mailto:reda.aouad@gmail.com">reda.aouad@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font color="#3366ff"><font><font face="tahoma,sans-serif">Hello,<br><br>Add an alias to your config file<br>
alias=<a href="http://domain.com:5060" target="_blank">domain.com:5060</a><br><br><a href="http://kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#alias" target="_blank">http://kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#alias</a><br clear="all">


</font></font></font><div dir="ltr"><font color="#3366ff" face="tahoma, sans-serif"><br></font><div><font color="#3366ff" face="tahoma, sans-serif">RA</font></div></div><br>
<br><br><div class="gmail_quote"><div><div class="h5">On Mon, Jan 23, 2012 at 16:06, Stoyan Mihaylov <span dir="ltr">&lt;<a href="mailto:stoyan.v.mihaylov@gmail.com" target="_blank">stoyan.v.mihaylov@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">

Hi,<div>If I am using IP address, I have no problems. If I use domain name (pointing to same IP address) then phones do not register.</div><div>I have couple of hardware and software SIP phones and when I put name of domain (<a href="http://stribogkonsult.com" target="_blank">stribogkonsult.com</a>) - then no registration, if I put IP - no problems.</div>



<div>I put IP, and names in domain table.</div><div>Effect is - when I use domain name, there are bulk of messages in syslog - like messages reenter kamailio again and again.</div><div>xlog(&quot;Auth attemps $au\n&quot;); - I receive many times if I use domain name, if I use IP - once only.</div>



<div><br></div><div>Problem can be somewhere else of course. But everything else work as I expect.</div><div><br></div><div><br></div><div><div>route[AUTH] {</div><div>#!ifdef WITH_AUTH</div><div><span style="white-space:pre-wrap">        </span>if (is_method(&quot;REGISTER&quot;))</div>



<div><span style="white-space:pre-wrap">        </span>{</div><div><span style="white-space:pre-wrap">                </span>if (!www_authorize(&quot;$td&quot;, &quot;subscriber&quot;))</div><div><span style="white-space:pre-wrap">                </span>{</div>



<div><span style="white-space:pre-wrap">                        </span>xlog(&quot;RegisterChalange $au $td\n&quot;);</div><div><span style="white-space:pre-wrap">                        </span>www_challenge(&quot;$td&quot;, &quot;1&quot;);</div>
<div><span style="white-space:pre-wrap">                        </span>exit;</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">                </span>if ($au!=$tU)</div>
<div><span style="white-space:pre-wrap">                </span>{</div><div><span style="white-space:pre-wrap">                        </span>sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);</div><div><span style="white-space:pre-wrap">                        </span>exit;</div>



<div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">                </span>xlog(&quot;Auth attemps $au\n&quot;);</div><div><span style="white-space:pre-wrap">        </span>} else {</div>
<div><br></div><div>#!ifdef WITH_IPAUTH</div><div><span style="white-space:pre-wrap">                </span>if(allow_source_address())</div><div><span style="white-space:pre-wrap">                </span>{</div><div>
<span style="white-space:pre-wrap">                        </span># source IP allowed</div><div><span style="white-space:pre-wrap">                        </span>return;</div><div><span style="white-space:pre-wrap">                </span>}</div>
<div>#!endif</div><div><br></div><div><span style="white-space:pre-wrap">                </span># authenticate if from local subscriber</div><div><span style="white-space:pre-wrap">                </span>if (from_uri==myself)</div>
<div><span style="white-space:pre-wrap">                </span>{</div><div><span style="white-space:pre-wrap">                </span>xlog(&quot;Register MySelf\n&quot;);</div><div><span style="white-space:pre-wrap">                        </span>if (!proxy_authorize(&quot;$fd&quot;, &quot;subscriber&quot;)) {</div>



<div><span style="white-space:pre-wrap">                                </span>proxy_challenge(&quot;$fd&quot;, &quot;0&quot;);</div><div><span style="white-space:pre-wrap">                                </span>exit;</div><div><span style="white-space:pre-wrap">                        </span>}</div>



<div><span style="white-space:pre-wrap">                        </span>if (is_method(&quot;PUBLISH&quot;))</div><div><span style="white-space:pre-wrap">                        </span>{</div><div><span style="white-space:pre-wrap">                                </span>if ($au!=$fU || $au!=$tU) {</div>



<div><span style="white-space:pre-wrap">                                        </span>sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);</div><div><span style="white-space:pre-wrap">                                        </span>exit;</div><div>
<span style="white-space:pre-wrap">                                </span>}</div><div><span style="white-space:pre-wrap">                                </span>if ($au!=$rU) {</div><div><span style="white-space:pre-wrap">                                        </span>sl_send_reply(&quot;403&quot;,&quot;Forbidden R-URI&quot;);</div>



<div><span style="white-space:pre-wrap">                                        </span>exit;</div><div><span style="white-space:pre-wrap">                                </span>}</div><div><span style="white-space:pre-wrap">                        </span>} else {</div>
<div><span style="white-space:pre-wrap">                                </span>if ($au!=$fU) {</div><div><span style="white-space:pre-wrap">                                        </span>sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);</div>
<div><span style="white-space:pre-wrap">                                        </span>exit;</div><div><span style="white-space:pre-wrap">                                </span>}</div><div><span style="white-space:pre-wrap">                        </span>}</div>
<div><br></div><div><span style="white-space:pre-wrap">                        </span>consume_credentials();</div><div><span style="white-space:pre-wrap">                        </span># caller authenticated</div><div><span style="white-space:pre-wrap">                </span>} else {</div>



<div><span style="white-space:pre-wrap">                        </span># caller is not local subscriber, then check if it calls</div><div><span style="white-space:pre-wrap">                        </span># a local destination, otherwise deny, not an open relay here</div>



<div><span style="white-space:pre-wrap">                        </span>if (!uri==myself)</div><div><span style="white-space:pre-wrap">                        </span>{</div><div><span style="white-space:pre-wrap">                                </span>sl_send_reply(&quot;403&quot;,&quot;Not relaying&quot;);</div>



<div><span style="white-space:pre-wrap">                                </span>exit;</div><div><span style="white-space:pre-wrap">                        </span>}</div><div><span style="white-space:pre-wrap">                </span>}</div>
<div><span style="white-space:pre-wrap">        </span>}</div><div>#!endif</div><div><span style="white-space:pre-wrap">        </span>return;</div><div>}</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>