SIP API Developer's Guide

Exit Print View

Updated: July 2014
 
 

Dialog Management Layer

A dialog represents a persistent peer-to-peer relationship between two user agents. A dialog facilitates the sequencing of messages between the user agents and the proper routing of requests between the user agents. The dialog represents a context in which to interpret SIP messages. A dialog is uniquely identified by a dialog id, which is a combination of the Call-ID, From, and To tags.

Dialog use is optional. You can create dialogs using INVITE and SUBSCRIBE as methods. A response to an INVITE in the 101–299 range combined with a To tag creates a dialog. A response to a SUBSCRIBE in the 200–299 range or a NOTIFY request creates a dialog. Provisional responses create dialogs that are marked as EARLY dialogs. Final responses in the 200–299 range create dialogs that are marked as CONFIRMED dialogs. An EARLY dialog becomes a confirmed dialog when the stack receives a response in the 200–299 range. If the application registers a callback function with the stack to send notification when a dialog changes state, the stack invokes that function.

An application can perform dialog management internally, or delegate dialog management to the stack. If the stack manages dialogs, the stack automatically creates and maintains dialogs. The stack also delivers any dialogs, matching any incoming messages to the application. If the stack is not managing dialogs, there is no dialog-related interaction between the application and the stack.