Functions related to dialog handlingModule: dialog :: Kamailio dialog module. More...
#include "../../parser/msg_parser.h"#include "../../str.h"#include "../../pvar.h"#include "../../modules/tm/t_hooks.h"#include "dlg_timer.h"

Go to the source code of this file.
Definition in file dlg_handlers.h.
| int dlg_new_dialog | ( | sip_msg_t * | req, | |
| struct cell * | t, | |||
| const int | run_initial_cbs | |||
| ) |
Create a new dialog from a SIP message, register a callback to keep track of the dialog with help of the tm module. This function is either called from the request callback, or from the dlg_manage function in the configuration script.
| req | SIP message | |
| t | transaction | |
| run_initial_cbs | if set zero, initial callbacks are not executed |
Create a new dialog from a sip message.
| dialog | unreferenced dialog |
Create a new dialog from a sip message Create a new dialog from a SIP message, register a callback to keep track of the dialog with help of the tm module. This function is either called from the request callback, or from the dlg_manage function in the configuration script.
| req | SIP message | |
| t | transaction | |
| run_initial_cbs | if set zero, initial callbacks are not executed |
Definition at line 765 of file dlg_handlers.c.
References add_dlg_rr_param(), build_new_dlg(), DLG_CALLER_LEG, DLG_DIR_DOWNSTREAM, dlg_ref(), dlg_release(), dlg_set_toroute(), dlg_unref(), sip_msg::first_line, get_dlg(), get_dlg_timeout(), dlg_cell::h_entry, dlg_cell::h_id, dlg_cell::iflags, _str::len, dlg_cell::lifetime, link_dlg(), METHOD_INVITE, populate_leg_info(), pre_match_parse(), _str::s, seq_match_mode, set_current_dialog(), dlg_cell::sflags, and dlg_cell::vars.
Referenced by dlg_onreq().


| void dlg_onreq | ( | struct cell * | t, | |
| int | type, | |||
| struct tmcb_params * | param | |||
| ) |
| t | transaction, used to created the dialog | |
| type | type of the entered callback | |
| param | saved dialog structure in the callback |
| t | transaction, used to created the dialog | |
| type | type of the entered callback | |
| param | saved dialog structure in the callback |
Definition at line 702 of file dlg_handlers.c.
References DLG_DIR_DOWNSTREAM, dlg_flag, dlg_new_dialog(), dlg_release(), dlg_set_tm_callbacks(), sip_msg::first_line, and METHOD_INVITE.

Function that is registered as RR callback for dialog tracking. It sets the appropriate events after the SIP method and run the state machine to update the dialog state. It updates then the saved dialogs and also the statistics.
| req | SIP request | |
| route_params | record-route parameter | |
| param | unused |
Definition at line 1076 of file dlg_handlers.c.
References hdr_field::body, dlg_cell::callid, dlg_cell::cbs, CURR_DLG_ID, CURR_DLG_LIFETIME, CURR_DLG_STATUS, default_timeout, dlg_cell::dflags, DLG_CALLEE_LEG, DLG_CALLER_LEG, DLG_DIR_UPSTREAM, DLG_EVENT_REQ, DLG_EVENT_REQACK, DLG_EVENT_REQBYE, dlg_get_iuid_shm_clone(), dlg_iuid_sfree(), dlg_ka_add(), dlg_lookup(), dlg_ref(), dlg_release(), dlg_run_event_route(), dlg_seq_down_onreply(), dlg_seq_up_onreply(), DLG_STATE_CONFIRMED, DLG_STATE_CONFIRMED_NA, DLG_STATE_DELETED, dlg_terminated(), dlg_unref(), sip_msg::first_line, get_dlg(), get_dlg_timeout(), dlg_cell::h_entry, dlg_cell::h_id, sip_msg::id, _str::len, dlg_cell::lifetime, match_dialog(), METHOD_ACK, METHOD_BYE, METHOD_PRACK, next_state_dlg(), parse_dlg_rr_param(), pre_match_parse(), remove_dialog_timer(), _str::s, seq_match_mode, set_current_dialog(), dlg_cell::start_ts, dlg_cell::tag, timeout, dlg_cell::tl, unref_dlg_from_cb(), update_cseqs(), and update_dlg_timer().

| void dlg_ontimeout | ( | struct dlg_tl * | tl | ) |
| tl | dialog timer list |
Definition at line 1309 of file dlg_handlers.c.
References dlg_cell::callid, DLG_CALLEE_LEG, DLG_CALLER_LEG, DLG_DIR_NONE, DLG_EVENT_REQBYE, DLG_IFLAG_TIMEOUTBYE, dlg_ref(), dlg_run_event_route(), DLG_STATE_CONFIRMED, DLG_STATE_CONFIRMED_NA, DLG_STATE_DELETED, dlg_unref(), dlg_cell::iflags, _str::len, next_state_dlg(), _str::s, dlg_cell::state, dlg_cell::tag, and dlg_cell::toroute.

| void dlg_tmcb_dummy | ( | tm_cell_t * | t, | |
| int | type, | |||
| struct tmcb_params * | param | |||
| ) |
| t | unused | |
| type | unused | |
| param | unused |
| void init_dlg_handlers | ( | char * | rr_param_p, | |
| int | dlg_flag_p, | |||
| pv_spec_t * | timeout_avp_p, | |||
| int | default_timeout_p, | |||
| int | seq_match_mode_p | |||
| ) |
| rr_param_p | added record-route parameter | |
| dlg_flag_p | dialog flag | |
| timeout_avp_p | AVP for timeout setting | |
| default_timeout_p | default timeout | |
| seq_match_mode_p | matching mode |
Definition at line 123 of file dlg_handlers.c.
References default_timeout, dlg_flag, _str::len, _str::s, seq_match_mode, and timeout_avp.
| int populate_leg_info | ( | struct dlg_cell * | dlg, | |
| struct sip_msg * | msg, | |||
| struct cell * | t, | |||
| unsigned int | leg, | |||
| str * | tag | |||
| ) |
Parse SIP message and populate leg informations.
| dlg | the dialog to add cseq, contact & record_route | |
| msg | sip message | |
| t | transaction | |
| leg | type of the call leg | |
| tag | SIP To tag |
Definition at line 203 of file dlg_handlers.c.
References contact, dlg_cell::cseq, DLG_CALLER_LEG, dlg_set_leg_info(), dlg_cell::from_rr_nb, get_cseq, HDR_EOH_F, _str::len, hdr_field::parsed, print_rr_body(), sip_msg::rcv, and _str::s.
Referenced by dlg_new_dialog(), and dlg_onreply().


| int pv_get_dlg_lifetime | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| pv_value_t * | res | |||
| ) |
| msg | SIP message | |
| param | pseudo-variable parameter | |
| res | pseudo-variable result |
Definition at line 1381 of file dlg_handlers.c.
References CURR_DLG_ID, CURR_DLG_LIFETIME, sip_msg::id, int2str(), and pv_get_null().

| int pv_get_dlg_status | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| pv_value_t * | res | |||
| ) |
| msg | SIP message | |
| param | pseudo-variable parameter | |
| res | pseudo-variable result |
Definition at line 1411 of file dlg_handlers.c.
References CURR_DLG_ID, CURR_DLG_STATUS, sip_msg::id, int2str(), and pv_get_null().

1.7.1