[OpenSIPS-Devel] [opensips] Allow TCP without transport=tcp header (#420)

Eric Tamme notifications at github.com
Tue Mar 3 21:15:45 CET 2015


I looked into resolve.c sip_resolvehost() https://github.com/OpenSIPS/opensips/blob/master/resolve.c#L1742

Throughout the function the code is consistent about using tls or udp depending on the uri scheme.  If there is no naptr record, then the code makes this assumption again, and calls do_srv_lookup() to get the host entity.

The way the code works, it determines the protocol before doing the SRV lookup entirely - which is exactly why you are getting 476 - b/c its trying to lookup the UDP SRV, which ... doesn’t exist.

I agree that this is frustration, but im not exactly certain how it could be "fixed".  One idea would be to have some modparam "cascade_srv" that would attempt to determine the proto, as the code does now, but on failure of a udp srv lookup, attempt a tcp srv lookup, and potentially lastly a tls srv lookup.  The tls is a little less ... belonging in this type of feature since it has a mechanism of proto detection with a sips uri. 

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/420#issuecomment-77025271
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150303/ee459757/attachment.htm>


More information about the Devel mailing list