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=="REGISTER" || method=="NOTIFY" || method=="OPTIONS" || method=="ACK" || method=="MESSAGE") {<br> fix_nated_contact();<br>
fix_nated_register();<br> ds_select_dst("1","4");<br> forward();#uri:host, uri:port);<br> exit();<br><br>}<br><br>if (method=="BYE" || method=="CANCEL") {<br>
unforce_rtp_proxy();<br>} else if (method=="INVITE"){<br> log("VCTOR: Got an invite\n");<br> fix_nated_contact();<br> force_rtp_proxy();<br> ds_select_dst("1","4");<br>
forward();#uri:host, uri:port);<br> t_on_failure("1");<br>};<br><br> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');<br><br>t_on_reply("1");<br><br><br>
if (!is_method("INVITE|REGISTER|MESSAGE|BYE|NOTIFY|ACK|CANCEL|REFER|SUBSCRIBE|OPTIONS|INFO")) {<br>xlog("L_INFO", "=== [$rm] Method Not Implement ===========\n");<br><br>sl_send_reply("501", "Not implemented here");<br>
return;<br>};<br><br><br>any thoughts?<br>