Validating a dialog and fixing broken dialogs

One of the most useful features of the dialog module is the dialog validation. There are some cases where this can be very useful. It can prevent malicious BYEs to close dialogs without disconnecting the call causing billing problems and other injected in-dialog requests. The function used to perform dialog validation is validate_dialog() and the result codes are displayed here:

  • 1: Dialog exists and is valid
  • -1: Invalid cseq
  • -2: Invalid remote target
  • -3: Invalid route set
  • -4: Other errors (parsing, no dlg, and so on)

There are cases where a UAS sends a reply with invalid information in the headers. You can fix these headers based on the dialog information stored in the memory using the fix_route_dialog() ...

Get Building Telephony Systems with OpenSIPS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.