Kamailio module dialog

From 탱이의 잡동사니
Revision as of 07:44, 28 July 2019 by Pchero (talk | contribs) (→‎Basic)
Jump to navigation Jump to search

Overview

Kamailio dialog 모듈 내용 정리.

Basic

Kamailio can behave as a stateful proxy through the TM module. However, "stateful" in this context refers to transaction state, not dialog state. Certain applications may benefit from an awareness of "calls" in the proxy, not just SIP transactions.

For example, a common need is to limit the number of calls that can be made concurrently by an endpoint, account, user group, etc. In order to count the number of calls in progress, it is necessary for the proxy to be aware of whole dialogs, not just transactions, and to provide some means of programmatically classifying these dialogs. This is just one common application discussed for illustrative purposes; there are many others.

The dialog module provides dialog awareness for the kamailio proxy. It's functionality is to keep track of the current dialogs, to offer information about them (e.g. how many dialogs are active), and to manage various characteristics of dialogs. The module exports several functions that can be used directly from the configuration route script as well as functions for the RPC interface.

This module also provides a API foundation on which to build more complex dialog-oriented functionality in other Kamailio modules.

How it works

To create the dialog associated with an initial INVITE request, execute the function "dlg_manage()" or set the flag specified by parameter "dlg_flag" 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 and custom timeout. The dialog timeout is reset each time a sequential request is processed.

See also