[OpenSIPS-Users] Dialog contact not updating until answer

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Aug 7 07:01:48 UTC 2023


Hi Callum,

The callee contact is learned only when the call is established (so , at 
200 OK). During the ringing state, a call may have several 
in-progress/ringing branches to different callee end-points, each with 
its own contact. Only when the call is answered you will get ONE of the 
branches actually established , so you will have the final contact from 
the callee end-point.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 8/1/23 4:23 PM, Callum Guy wrote:
> 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!
>




More information about the Users mailing list