[OpenSIPS-Users] Dialog contact not updating until answer

Callum Guy callum.guy at x-on.co.uk
Tue Aug 1 13:23:07 UTC 2023


Hi All,

I've observed a behaviour (OpenSIPs 3.2.4) where the contact stored
against an active dialog is not populated until the call is answered.

Using opensips-cli dlg_list I see the following:

Ringing - https://gist.github.com/spacetourist/2502f6b76a95bb2f500fda5291e1c93b
Answered - https://gist.github.com/spacetourist/81b9e19de14a04aeff7f1f7b8965e2e5

During ringing we have:
- "state": 2
- CALLEES > "callee_contact": "",

Once answered we have:
- "state": 4
- CALLEES > "callee_contact": "sip:b2o80qss at 77.95.114.132:45656;transport=ws",

This is problematic for me as I'm working on a system to prevent
duplicate registrations from an AoR (sip:6190051 at sk-1.rtc.sip.net)
whilst preventing other instances from overruling and taking ownership
of the session by blocking registrations from separate contacts when a
call is ongoing.

The exact scenario where I'm currently seeing errors is when an active
contact (i.e. sip:b2o80qss at 77.95.114.132:45656;transport=ws) issues a
re-REGISTER during call setup. I use get_dialogs_by_profile() in
OpenSIPs to track sessions against the AoR and loop through any active
dialogs associated whenever a call or registration comes in. Using
this approach has allowed me to block other devices from creating a
second registration however the lookup is currently failing during the
ringing part of the session as the contact cannot be checked.

Is there a reason why callee_contact cannot be updated immediately
when the session begins? Is this to accommodate branching or similar?
I'll review alternative approaches whilst awaiting a reply however it
would be great if there was a path for me to solve this issue with my
current approach!

Thanks,

Callum

P.S. if this makes more sense as a Github issue then please let me
know, I'm not sure where is best to ask!

-- 






*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 X-on Health 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.











More information about the Users mailing list