sipsorcery
sipsorcery copied to clipboard
SIPRegistrationUserAgent Resolve Issues
I think some basic behavior is missing in the SIPRegistrationUserAgent when it comes to SRV lookups.
- The outbound proxy must be resolved for each registration attempt (just as registrarHost when no outbound proxy is given). The outbound proxy might be a SRV lookup.
- The m_attempts must be passed to the ResolveSIPUriAsync method (ResolveSIPUriDelegateAsync also needs an update). It's needed to select the correct SRV entry when resolving.
- The SRV lookup randomization based on priority and weight for each attempt is also missing.
Will there be other issues, for example when resolving from cache later?
How to proceed? A fix would introduce some breaking changes I think?
The OutboundProxy
can only be set to a SIPEndPoint
which requires an IPAddress
and not a host name. There are no DNS lookups involved if you set the OutboundProxy
.
I suspect what you're after is being able to set the OutboundProxy
to a SIP URI
, which can then be a host or IP Address. That's definitely a valid case. I've never happended to need it so far hence it's not implemented. If you would like to implement it we'd be happy to accept a PR.