[OpenSIPS-Users] can't get is_contact_registered() to return true

Liviu Chircu liviu at opensips.org
Thu Oct 8 07:56:59 EST 2020

On 08.10.2020 00:42, Jeff Pyle wrote:
> The registered contact of a user is 
> "sip:+12162454107 at;rinstance=946433DE".  When I 
> place a call from that user, its INVITE's Contact is 
> "sip:+12162454107 at 
> <http://sip:+12162454107@>". 
> is_contact_registered() fails.  Is that caused by the lack of the 
> rinstance param, or something else?

Indeed, the matching now fails strictly because of that extra chunk: 
";rinstance=946433DE". According to the RFC 3261 URI matching rules, 
they are indeed different contacts.

However, if you really want to go the extra mile and tolerate those 
inconsistent INVITE Contacts (with the missing URI params) by somehow 
still matching them against Contact URIs with the params, I don't see a 
clean solution *)

*) of course, you could use the local cache and store a 
"non-param-Contact: full-Contact" key-value pair on each REGISTER.  
During INVITE processing, you would use the cache to look up and "fix" 
any non-param-Contact with its proper value, buffered in the local 
cache.  However, it's still a hacky solution: what if you restart the 
registrar?  Then, for a while, some INVITEs won't route out because the 
Contact conversion won't work until they re-register and populate the cache.

Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201008/fd8cbf57/attachment-0001.html>

More information about the Users mailing list