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
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to