Dialog states

A dialog can assume several states. The dialog state is present in the $DLG_status variable. The values can be as follows:

  • NULL: Not found
  • 1: Unconfirmed (INVITE sent but no reply received)
  • 2: Early state (INVITE sent and provisional reply received, 100,180,183)
  • 3: Confirmed (INVITE sent, 200 OK received, no ACK)
  • 4: Established (INVITE sent, 200 OK received, ACK confirmed)
  • 5: Ended (BYE received)

It is very useful to check the dialog state before taking any action such as reading dialog variables. If the dialog is NULL, a dialog variable and/or flag is not readable.

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.