[Kamailio-Users] dispatcher has problems

Vic Jolin victor.jolin at gmail.com
Fri Apr 9 16:40:38 CEST 2010


I just noticed that if I have 4 servers set like this

# group  sip addresses of your * units
1 sip:XXX.XXX.XXX.XXX:5060
1 sip:XXX.XXX.XXX.XXX:5060
1 sip:XXX.XXX.XXX.XXX:5060
1 sip:XXX.XXX.XXX.XXX:5060

the registration does not work and I get 401 unauthorized.


My setup is like this

Openser as proxy sends all SIP messages to load balanced asterisk servers
So sip phones should be able to register to the asterisk server

The routing part in kamailio.cfg looks like this

if ( method=="REGISTER" || method=="NOTIFY" || method=="OPTIONS" ||
method=="ACK" || method=="MESSAGE") {
        fix_nated_contact();
        fix_nated_register();
        ds_select_dst("1","4");
        forward();#uri:host, uri:port);
        exit();

}

if (method=="BYE" || method=="CANCEL") {
        unforce_rtp_proxy();
} else if (method=="INVITE"){
        log("VCTOR: Got an invite\n");
        fix_nated_contact();
        force_rtp_proxy();
        ds_select_dst("1","4");
        forward();#uri:host, uri:port);
        t_on_failure("1");
};

        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

t_on_reply("1");


if
(!is_method("INVITE|REGISTER|MESSAGE|BYE|NOTIFY|ACK|CANCEL|REFER|SUBSCRIBE|OPTIONS|INFO"))
{
xlog("L_INFO", "=== [$rm] Method Not Implement ===========\n");

sl_send_reply("501", "Not implemented here");
return;
};


any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100409/b5efa0ae/attachment.htm>


More information about the sr-users mailing list