Skip to content

Conversation

@dsandras
Copy link
Contributor

This improves the way pua dialoginfo and presence dialoginfo work.

If accepted, please credit Damien Sandras from Be IP s.a. @ http://www.beip.be

dsandras added 4 commits July 16, 2013 16:29
Several fixes here:
  - Dialog callbacks are now correctly setup after a restart of
    OpenSIPS. In other words, restarting OpenSIPS will not lead to ghost BLFs
    anymore.
  - Added an option allowing not to publish state change in case of reINVITE.
  - Added an option allowing not to publish state change in trying state.
    In other words, a PUBLISH will be sent only when OpenSIPS has received a
    18x response type and not before.
Without that patch, when OpenSIPS does not find any active dialog
and needs to NOTIFY that state, it correctly sends a full state dialog
information, but the XML document is wrong.

This is the wrong format, the one that was used:
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="0" state="partial" entity="sip:752@ds.local.beip.be"><dialog
id="752"><state>terminated</state></dialog></dialog-info>
(info is not partiali but full, dialog id is wrong).

This is the correct format:
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="6" state="full" entity="sip:753@ds.local.beip.be"/>
Disabling PUBLISH on reINVITEs has some side effects when being used
with session timers. More specifically, the session timer could be
refresh, but the PUA PUBLISH could expire because it is not refreshed
at the same time of the dialog when being setup with the initial dialog
lifetime.
The number of generated PUBLISH requests is no optimal.

Disabled PUBLISHing for in-dialog REQUESTS. PUBLISHing (again) the
"confirmed" state when handling OPTIONS, ACK, BYE, and other dialog related
requests triggers a mess of useless NOTIFY requests. We only keep PUBLISHing
on reINVITE/UPDATEs as that might be required to be compatible with session
timers (they refresh the PUBLISH lifetime).

Also added a flag to allow inhibiting PUBLISHing for INVITE/UPDATE in-dialog
requests. That might be required for "things" like Asterisk reINVITEs for which
we do not want rePUBLISHing again our "confirmed" state. Especially useful when
you know that Asterisk reINVITEs for INFO, BYE, and so on.
bogdan-iancu added a commit that referenced this pull request Aug 2, 2013
Ds better pua dialoginfo

Thank you for the fixes! Please provide the update on the docs too !

Credits go to Damien Sandras from Be IP s.a. @ http://www.beip.be
@bogdan-iancu bogdan-iancu merged commit a524780 into OpenSIPS:1.8 Aug 2, 2013
@dsandras
Copy link
Contributor Author

Unfortunately, this pull request is incomplete too.
Branch 1.8 is missing commit dsandras@1e652a1
Branches 1.9, 1.10 and master are missing commits:
dsandras@1e652a1
dsandras@caf72d6
dsandras@7ceae5b

@bogdan-iancu
Copy link
Member

Fixed, thanks for the noticed.

@dsandras
Copy link
Contributor Author

dsandras commented Sep 2, 2013

This is now really fixed. Thanks!

@caloveri caloveri mentioned this pull request Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants