Hi All,

I'm looking for a clean way to de-register a WS location when I
receive a REGISTER with expires set as a contact param:

<sip:[email protected];transport=ws>;expires=0

The issue is that a ul record is stored with the following contact and
the parameters are included in the matching process for registrar
module remove() method:

                    "AOR": "[email protected]",
                    "Contacts": [
                        {
                            "Contact":
"sip:[email protected];transport=ws",
                            "ContactID": "3803995821952764351",
                            "Expires": 92,
                            "Q": "0.8",
                            "Callid": "6ndu8fnhpm267tnfpj36",
                            "Cseq": 3,
                            "User-agent": "SoftPhone Linux Chrome
112.0.0.0 (315e66c2)",
                            "Received": "sip:1.2.3.4:43010;transport=wss",
                            "State": "CS_NEW",
                            "Flags": 0,
                            "Cflags": "DST_WS SIP_PING_ENABLE TCP_NO_CONN",
                            "Socket": "wss:172.16.113.200:4433",
                            "Methods": 5439
                        }
                    ]
                }


To make this work I have demonstrated a method using regex to remove
the expires param and <> brackets, this is acceptable but I wanted to
reach out in case there was a cleaner way!

I only want to remove this individual contact address so a broader
match won't work in this situation.

Thanks,

Callum

-- 






*0333 332 0000  |  x-on.co.uk <https://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> **  |  **Practice Index Reviews 
<https://practiceindex.co.uk/gp/x-on>*

*Our new office address: 22 Riduna 
Park, Melton IP12 1QT.*

X-on
is a trading name of Storacall Technology Ltd 
a limited company registered in
England and Wales.

Registered Office : 
Glebe Farm, Down Street, Dummer, Basingstoke, Hampshire, England RG25 2AD. 
Company Registration No. 2578478.

The information in this e-mail is 
confidential and for use by the addressee(s)
only. If you are not the 
intended recipient, please notify X-on immediately on +44(0)333 332 0000 
and delete the
message from your computer. If you are not a named addressee 
you must not use,
disclose, disseminate, distribute, copy, print or reply 
to this email. Views
or opinions expressed by an individual
within this 
email may not necessarily
reflect the views of X-on or its associated 
companies. Although X-on routinely
screens for viruses, addressees should 
scan this email and any attachments
for
viruses. X-on makes no 
representation or warranty as to the absence of viruses
in this email or 
any attachments.









_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to