Hi Jon,

please, try to set the "weight" for both SRV records in DNS to another (but same) value than "0", e.g. "10"

The weight with "0" value has a special handling in SR, according to the RFC2782:

"Domain administrators SHOULD use Weight 0 when there isn't any server
selection to do, to make the RR easier to read for humans (less
noisy).  In the presence of records containing weights greater
than 0, records with weight 0 should have a very small chance of
being selected."

Hope that helps,
-Vlada B.

On 07/20/2011 09:37 PM, Jon Bonilla (Manwe) wrote:
Hi all

I'm running a kamailio 3.1 based proxy which actually relays REGISTER requests
to a domain "example.com"

I've setup a DNS SRV record for that domain which returns two hosts with same
prio and weight. I want kamailio to balance the requests to both servers 50%.

Taking a look to ./doc/dns.txt I've setup these configuration options:

dns_try_ipv6=no
dns_retr_time=1
dns_retr_no=1
dns_use_search_list=no
use_dns_cache=on
use_dns_failover=on
dns_srv_lb=on

If I understood right the last setting would have to make kamailio work as I
described, balancing the requests between both servers. But my logs say that
kamailio is actually using only one of the ip addresses (host2.example.com) to
send the REGISTER requests.

Here's the output of sercmd dns.view:

sercmd>  dns.view
{

     name: _sip._udp.example.com
     type: SRV
     size (bytes): 232
     reference counter: 1
     permanent: no
     expires in (s): 31364
     last used (s): 446
     negative entry: no
     rr name: host1.example.com
     rr port: 5060
     rr priority: 0
     rr weight: 0
     rr expires in (s): 31364
     rr name: host2.example.com
     rr port: 5060
     rr priority: 0
     rr weight: 0
     rr expires in (s): 31364
}
{

     name: host2.example.com
     type: A
     size (bytes): 128
     reference counter: 1
     permanent: no
     expires in (s): 592964
     last used (s): 446
     negative entry: no
     rr ip: 192.168.0.103
     rr expires in (s): 592964
}
{

     name: host1.example.com
     type: A
     size (bytes): 128
     reference counter: 1
     permanent: no
     expires in (s): 592964
     last used (s): 11835
     negative entry: no
     rr ip: 192.168.0.102
     rr expires in (s): 592964
}


Any suggestions? What am I doing wrong?


Thanks,

Jon

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to