[Users] SRV Lookups

Mikael Magnusson mikaelmagnusson at glocalnet.net
Wed Nov 23 20:57:27 CET 2005

Douglas Garstang wrote:
> All,
> I'm trying to get SRV lookups to work with OpenSER 1.0.0. I've exhausted every avenue of documentation including newsgroups, various forums etc.
> Using t_relay, OpenSER seems to be performing the correct DNS SRV queries and obtaining a list of hosts to try. Below are the relevant sections of my DNS zone file. We're  talking UDP, and based on the priority and weights below, OpenSER should be basically doing a round-robin approach, and it seems to be.
> The problem occurs when one of the hosts is not contactable. OpenSER simply stops and does not try the next host in it's list. I would have thought that for OpenSER to fully support SRV lookups, it should try each until it is successful. After all, that's a large part of the whole point of SRV records.
> Does the t_relay() function have logic within itself to keep trying hosts until it gets a connection? What would be the definition a failure that would make it move onto the next host be anyway? Network failure certainly, but would a 'Not found' be considered a failure that would cause it to move on? Would anything other than an ACK be a failure?

It's defined in RFC3263 section 4.3 "Details of RFC 2782 Process":

    For SIP requests, failure occurs if the transaction layer reports a
    503 error response or a transport failure of some sort (generally,
    due to fatal ICMP errors in UDP or connection failures in TCP).
    Failure also occurs if the transaction layer times out without ever
    having received any response, provisional or final (i.e., timer B or
    timer F in RFC 3261 [1] fires).  If a failure occurs, the client
    SHOULD create a new request, which is identical to the previous, but
    has a different value of the Via branch ID than the previous (and
    therefore constitutes a new SIP transaction).  That request is sent
    to the next element in the list as specified by RFC 2782.


> Is there some variable I can set or some function I can call that causes t_relay() to retry all hosts in it's SRV list? 
> Without this feature, OpenSER's usefulness is very limited.
> Help very much appreciated.
> Doug

More information about the Users mailing list