Copyright © 2006 voice-system.ro
The dialog module provides dialog awareness to OpenSER proxy. Its functionality is to keep trace of the current dialogs, to offer information about them (like how many dialogs are active). The module exports no functions that could be used directly from scripts.
The module, via an internal API, also provide the foundation to build on top of it more complex dialog-based functionalities via other OpenSER modules.
To create the dialog associated to an initial request, the flag "dlg_flag" (Section 1.4.4) must be set before creating the corresponding transaction.
The dialog is automatically destroyed when a "BYE" is received. In case of no "BYE", the dialog lifetime is controlled via the default timeout (see "default_timeout" - Section 1.4.6) and custom timeout (see "timeout_avp" - Section 1.4.5). The dialog timeout is reset each time a sequential request passes.
The following modules must be loaded before this module:
TM - Transaction module
RR - Record-Route module
The following libraries or applications must be installed before running OpenSER with this module loaded:
If the statistics support should be enabled or not. Via statistic variables, the module provide information about the dialog processing. Set it to zero to disable or to non-zero to enable it.
Default value is "1 (enabled)".
The size of the hash table internally used to keep the dialogs. A larger table is much faster but consumes more memory. The hash size must be a power of 2 number.
Default value is "4096".
Name of the Record-Route parameter to be added with the dialog cookie. It is used for fast dialog matching of the sequential requests.
Default value is "did".
Flag to be used for marking if a dialog should be constructed for the current request (make sense only for initial requests).
Default value is "none".
The specification of an AVP to contain a custom timeout (in seconds) for the dialog. It may be used only in a request (initial or sequential) context
Default value is "none".
The default dialog timeout (in seconds) if no custom one is set.
Default value is "43200 (12 hours)".
If tight matching should be use dialog matching of sequential requests. By default, the matching is done only on the RR cookie; tight matching extra checks the callid. Set it to zero to disable or to non-zero to enable it.
Default value is "0 (disabled)".
There are no exported functions that could be used in scripts.
Returns the number of current active dialogs (may be confirmed or not).
Returns the total number of processed dialogs (terminated, expired or active) from the startup.
Returns the total number of expired dialogs from the startup.
Register a new callback to the dialog.
Meaning of the parameters is as follows:
struct dlg_cell* dlg - dialog to register callback to. If maybe NULL only for DLG_CREATED callback type, which is not a per dialog type.
int type - types of callbacks; more types may be register for the same callback function; only DLG_CREATED must be register alone. Possible types:
DLG_CREATED - called when a new dialog is created - it's a global type (not associated to any dialog)
DLG_FAILED - called when the dialog was negatively replied (non-2xx) - it's a per dialog type.
DLG_CONFIRMED - called when the dialog is confirmed (2xx replied) - it's a per dialog type.
DLG_REQ_WITHIN - called when the dialog matches a sequential request - it's a per dialog type.
DLG_TERMINATED - called when the dialog is terminated via BYE - it's a per dialog type.
DLG_EXPIRED - called when the dialog expires without receiving a BYE - it's a per dialog type.
dialog_cb f - callback function to be called. Prototype is: "void (dialog_cb) (struct dlg_cell* dlg, int type, struct sip_msg* msg, void** param);"
void *param - parameter to be passed to the callback function.
Take a look at http://openser.org/.
First at all check if your question was already answered on one of our mailing lists:
User Mailing List - http://openser.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://openser.org/cgi-bin/mailman/listinfo/devel
If you want to keep the mail private, send it to
Please follow the guidelines provided at: http://sourceforge.net/tracker/?group_id=139143.