Copyright © 2006 voice-system.ro
enable_stats
(integer)hash_size
(integer)rr_param
(string)dlg_flag
(integer)timeout_avp
(string)default_timeout
(integer)dlg_extra_hdrs
(string)dlg_match_mode
(integer)db_url
(string)db_mode
(integer)db_update_period
(integer)db_fetch_rows
(integer)table_name
(string)callid_column
(string)from_uri_column
(string)from_tag_column
(string)to_uri_column
(string)to_tag_column
(string)caller_cseq_column
(string)callee_cseq_column
(string)caller_route_column
(string)callee_route_column
(string)caller_contact_column
(string)callee_contact_column
(string)caller_sock_column
(string)callee_sock_column
(string)h_id_column
(string)h_entry_column
(string)state_column
(string)start_time_column
(string)timeout_column
(string)active_dialogs
early_dialogs
processed_dialogs
expired_dialogs
failed_dialogs
dlg_list
dlg_end_dlg
$DLG_count
$DLG_status
$DLG_lifetime
enable_stats
parameterhash_size
parameterrr_param
parameterdlg_flag
parametertimeout_avp
parameterdefault_timeout
parameterdlf_extra_hdrs
parameterdlg_match_mode
parameterdb_url
parameterdb_mode
parameterdb_update_period
parameterdb_fetch_rows
parametertable_name
parametercallid_column
parameterfrom_uri_column
parameterfrom_tag_column
parameterto_uri_column
parameterto_tag_column
parametercaller_cseq_column
parametercallee_cseq_column
parametercaller_route_column
parameterto_route_column
parametercaller_contact_column
parametercallee_contact_column
parametercaller_sock_column
parametercallee_sock_column
parameterh_id_column
parameterh_entry_column
parameterstate_column
parameterstart_time_column
parametertimeout_column
parameterThe 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:
None.
enable_stats
(integer)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)".
hash_size
(integer)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.
IMPORTANT: If dialogs' information should be stored in a database, a constant hash_size should be used, otherwise the restored process will not take place. If you really want to modify the hash_size you must delete all table's rows before restarting openser.
Default value is "4096".
rr_param
(string)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".
dlg_flag
(integer)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".
timeout_avp
(string)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".
default_timeout
(integer)The default dialog timeout (in seconds) if no custom one is set.
Default value is "43200 (12 hours)".
dlg_extra_hdrs
(string)A string containing the extra headers (full format, with EOH) to be added in the requests generated by the module (like BYEs).
Default value is "NULL".
dlg_match_mode
(integer)How the seqential requests should be matched against the known dialogs. The modes are a combination between matching based on a cookie (DID) stored as cookie in Record-Route header and the matching based on SIP elements (as in RFC3261).
The supported modes are:
0 - DID_ONLY - the match is done exclusivly based on DID;
1 - DID_FALLBACK - the match is first tried based on DID and if not present, it will fallback to SIP matching;
2 - DID_NONE - the match is done exclusivly based on SIP elements; no DID information is added in RR.
Default value is "0 (DID_ONLY)".
db_url
(string)If you want to store the information about the dialogs in a database a database url must be specified.
Default value is "mysql://openser:openserrw@localhost/openser".
db_mode
(integer)Describe how to push into the DB the dialogs' information from memory.
The supported modes are:
0 - NO_DB - the memory content is not flushed into DB;
1 - REALTIME - any dialog information changes will be reflected into the database immediatly.
2 - DELAYED - the dialog information changes will be flushed into DB periodically, based on a timre routine.
Default value is "0".
db_update_period
(integer)The interval (seconds) at which to update dialogs' information if you chose to store the dialogs' info at a given interval. A too short interval will generate intensiv database operations, a too large one will not notice short dialogs.
Default value is "60".
db_fetch_rows
(integer)The number of the rows to be fetched at once from database when loading the dialog records at startup from the database. This value can be used to tune the load time at startup. For 1MB of private memory (default) it should be below 400. The database driver must support fetch_result() capability. A value of 0 means the functionality is disabled.
Default value is "200".
table_name
(string)If you want to store the information about the dialogs in a database a table name must be specified.
Default value is "dialog".
callid_column
(string)The column's name in the database to store the dialogs' callid.
Default value is "callid".
from_uri_column
(string)The column's name in the database to store the caller's sip address.
Default value is "from_uri".
from_tag_column
(string)The column's name in the database to store the From tag from the Invite request.
Default value is "from_tag".
to_uri_column
(string)The column's name in the database to store the calee's sip address.
Default value is "to_uri".
to_tag_column
(string)The column's name in the database to store the To tag from the 200 OK response to the Invite request, if present.
Default value is "to_tag".
caller_cseq_column
(string)The column's name in the database to store the cseq from caller side.
Default value is "caller_cseq".
callee_cseq_column
(string)The column's name in the database to store the cseq from callee side.
Default value is "callee_cseq".
caller_route_column
(string)The column's name in the database to store the route records from caller side (proxy to caller).
Default value is "caller_route_set".
callee_route_column
(string)The column's name in the database to store the route records from callee side (proxy to callee).
Default value is "callee_route_set".
caller_contact_column
(string)The column's name in the database to store the caller's contact uri.
Default value is "from_contact".
callee_contact_column
(string)The column's name in the database to store the callee's contact uri.
Default value is "callee_contact".
caller_sock_column
(string)The column's name in the database to store the information about the local interface receiving the traffic from caller.
Default value is "caller_sock".
callee_sock_column
(string)The column's name in the database to store information about the local interface receiving the traffic from callee.
Default value is "callee_contact".
h_id_column
(string)The column's name in the database to store the dialogs' hash id information.
Default value is "hash_id".
h_entry_column
(string)The column's name in the database to store the dialogs' hash entry information.
Default value is "hash_entry".
state_column
(string)The column's name in the database to store the dialogs' state information.
Default value is "state".
start_time_column
(string)The column's name in the database to store the dialogs' start time information.
Default value is "start_time".
timeout_column
(string)The column's name in the database to store the dialogs' timeout.
Default value is "timeout".
active_dialogs
Returns the number of current active dialogs (may be confirmed or not).
processed_dialogs
Returns the total number of processed dialogs (terminated, expired or active) from the startup.
dlg_list
It returns a listing of all dialogs (calls).
Name: dlg_list
Parameters: none
MI FIFO Command Format:
:dlg_list:_reply_fifo_file_ _empty_line_
dlg_end_dlg
Terminates an ongoing dialog by sending BYE in both directions.
Name: dlg_end_dlg
Parameters:
h_entry - hash entry of the dialog in the internal dialog table
h_id - hash id of the dialog on the hash entry
extra_hdrs - (optional) string containg extra headers (full format) to be added to the BYE requests.
The values for the h_entry and h_id can be get via the dlg_list MI command.
MI FIFO Command Format:
:dlg_end_dlg:_reply_fifo_file_ 342 56 _empty_line_
$DLG_count
Returns the number of current active dialogs (may be confirmed or not).
$DLG_status
Returns the status of the dialog corresponding to the processed sequential request. This PV will be available only for sequential requests, after doing loose_route().
Value may be:
NULL - Dialog not found.
3 - Confirmed by a final reply but no ACK received yet.
4 - Confirmed by a final reply and ACK received.
5 - Dialog ended.
$DLG_lifetime
Returns the duration (in seconds) of the dialog corresponding to the processed sequential request. The duration is calculated from the dialog confirmation and the current moment. This PV will be available only for sequential requests, after doing loose_route().
NULL will be returned if there is no dialog for the request.
register_dlgcb (dialog, type, cb, param)
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.
The parameter was removed with version 1.3 as the option of tight matching became mandatory and not configurable. Now, the tight matching is done all the time (when using DID matching).
Take a look at http://www.openser-project.org/.
First at all check if your question was already answered on one of our mailing lists:
User Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
E-mails regarding any stable OpenSER release should be sent to
<users@lists.openser-project.org>
and e-mails regarding development versions
should be sent to <devel@lists.openser-project.org>
.
If you want to keep the mail private, send it to
<team@lists.openser-project.org>
.
Please follow the guidelines provided at: http://sourceforge.net/tracker/?group_id=139143.