How to use dum

From reSIProcate
Jump to navigation Jump to search

Major Components

The DialogUsamgeManger (or DUM) is the unit that keeps track of all the Dialog related data structures and sits on top of the transaction layer of the stack. It keeps track of multiple DialogSets which contains Dialogs. Each DialogSet contains all the Dialogs that were created by a common initial request. They all share the same SIP Call-Id and from tag from the orginal request. Inside a specific DialogSet there can be some type of BaseCreator that represnets the intial request that generated the dialog. This will only exist on the UAC side. The DialogSet also contains serveral objects dereived from BaseUsage that are using this particular dialog. There are several types of things that are a Usage of a dialog. There can be one InviteSession, one Registration, one Publication, multiple Subscriptions and multiple OutOfDialogRequests. Note the name OutOfDialog is a little weird - OutOfDialog requests are actually in a thing a lot like a dialog but are transactions that are not in one of the other categories. Typically messages that result in OutOfDialogRequests areMESSAGE and OPTIONS.

An initial SIP Request is created by calling the makeX interfaces on the DUM. It is then sent using the send interface on the DUM. When a response is returned for the request, a callback from one of the Handler classes will be called to notify the application about the incoming events. This will pass up some type of client or server usages class that can be used to send aditional messages and responses in the context of this particularr usage of the Dialog.

DUM Usage Inheritance.png

Definitions

DialogUsage Manager - Main class that keeps track of all the DialogsSets, Dialogs, and Usages.

DialogSet - A set of dialogs that were gerneated from a common request. They share the same call-id and the same from tag in the request that genreated the dialog.

Dialog - A container holding such things and local and remote CSEQ, URI, Call-ID and such as defined by the SIP standard.

DialogID - An identifier that uniquely finds a a Dialog by Call-ID, and To and From tags.

DialogSetID - An identifier that uniquily identifies a Dialog-Set and is formed from Call-ID and From tag.

Usages - These are the objects are are using a dialog. They include ClientInviteSession, ClientOutOfDialogReq, ClientPublication, ClientRegistration, ClientSubscription, ServerInviteSession, ServerOutOfDialogReq, ServerPublication, ServerRegistration, and ServerSubscription.

Handlers - These are objects uses to derive class from that allow callbacks from this layer to the application. They include InviteSessionHandler, OutOfDialogHandler, RegistrationHandler, SubscriptionHandler, and PublictionHandler.

Handles - All the Usages and Handlers are not really exposed to the applications using this layer. Instead, handles to them are passed out. When the applications goes to use a handle, the underlying object may have been deleted and the applications must be prepared for this not to work.