[Kamailio-Users] Failover from SRV lookups?

G.O. Jensen geir.o.jensen at uninett.no
Wed Dec 3 16:07:05 CET 2008

Hi, running old OpenSER 1.3 branch here.

Problem is as follows and I hope somebody can shed some light on it.

Our GW supplier has two SBC's that they switch between... to find these I
do a DNS lookup at their domain which gives me;

$ dig sipsbc.domain.com NAPTR
; <<>> DiG 9.3.2-P2.1 <<>>
sipsbc.domain.com.          600     IN      NAPTR   1 0 "s" "SIP+D2U" ""

... and a SRV lookup
$ dig _sip._udp.sipsbc.domain.com SRV
; <<>> DiG 9.3.2-P2.1
_sip._udp.sipsbc.domain.com. 372    IN      SRV     1 1 5060
_sip._udp.sipsbc.domain.com. 372    IN      SRV     1 1 5060

The "problem" is... OpenSER tries the first server (sbc2) first everytime.
Natural since it's listed first. However, this one doesn't answer most of
the time, and OpenSER then has to timeout before trying the next (with
frequent resends from my UAs overloading the servers more in the

With fr_timer out of the tm module I can set this timeout to 2 seconds,
but it still takes nearly 10 seconds before I get a ringing signal (183)
from the GW SBC.

Is it possible to somehow get OpenSER to "cache" the active server? Or
query it "beforehand" with an OPTIONS message or something to see which
one is alive (that is quicker than waiting for timeouts and retries?)

Thanks in advance for your prompt help since our GW changed this overnight
on our production system and my users are not too happy about it :D

- Geir

More information about the Users mailing list