I just noticed that if I have 4 servers set like this<br><br># group  sip addresses of your * units<br>1 sip:XXX.XXX.XXX.XXX:5060<br>1 sip:XXX.XXX.XXX.XXX:5060<br>1 sip:XXX.XXX.XXX.XXX:5060<br>1 sip:XXX.XXX.XXX.XXX:5060<br>
<br>the registration does not work and I get 401 unauthorized.<br><br><br>My setup is like this<br><br>Openser as proxy sends all SIP messages to load balanced asterisk servers<br>So sip phones should be able to register to the asterisk server <br>
<br>The routing part in kamailio.cfg looks like this<br><br>if ( method==&quot;REGISTER&quot; || method==&quot;NOTIFY&quot; || method==&quot;OPTIONS&quot; || method==&quot;ACK&quot; || method==&quot;MESSAGE&quot;) {<br>        fix_nated_contact();<br>
        fix_nated_register();<br>        ds_select_dst(&quot;1&quot;,&quot;4&quot;);<br>        forward();#uri:host, uri:port);<br>        exit();<br><br>}<br><br>if (method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {<br>
        unforce_rtp_proxy();<br>} else if (method==&quot;INVITE&quot;){<br>        log(&quot;VCTOR: Got an invite\n&quot;);<br>        fix_nated_contact();<br>        force_rtp_proxy();<br>        ds_select_dst(&quot;1&quot;,&quot;4&quot;);<br>
        forward();#uri:host, uri:port);<br>        t_on_failure(&quot;1&quot;);<br>};<br><br>        search_append(&#39;Contact:.*sip:[^&gt;[:cntrl:]]*&#39;, &#39;;nat=yes&#39;);<br><br>t_on_reply(&quot;1&quot;);<br><br><br>
if (!is_method(&quot;INVITE|REGISTER|MESSAGE|BYE|NOTIFY|ACK|CANCEL|REFER|SUBSCRIBE|OPTIONS|INFO&quot;)) {<br>xlog(&quot;L_INFO&quot;, &quot;=== [$rm] Method Not Implement ===========\n&quot;);<br><br>sl_send_reply(&quot;501&quot;, &quot;Not implemented here&quot;);<br>
return;<br>};<br><br><br>any thoughts?<br>