Functions

dlg_handlers.h File Reference

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"
Include dependency graph for dlg_handlers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions


Detailed Description

Definition in file dlg_handlers.h.


Function Documentation

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.

See also:
dlg_onreq
w_dlg_manage
Parameters:
req SIP message
t transaction
run_initial_cbs if set zero, initial callbacks are not executed
Returns:
0 on success, -1 on failure

Create a new dialog from a sip message.

See also:
dlg_onreq
Parameters:
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.

See also:
dlg_onreq
w_dlg_manage
Parameters:
req SIP message
t transaction
run_initial_cbs if set zero, initial callbacks are not executed
Returns:
0 on success, -1 on failure

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void dlg_onreq ( struct cell *  t,
int  type,
struct tmcb_params *  param 
)
Parameters:
t transaction, used to created the dialog
type type of the entered callback
param saved dialog structure in the callback
See also:
dlg_new_dialog
Parameters:
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.

Here is the call graph for this function:

void dlg_onroute ( struct sip_msg req,
str route_params,
void *  param 
)
void dlg_ontimeout ( struct dlg_tl tl  ) 
void dlg_tmcb_dummy ( tm_cell_t *  t,
int  type,
struct tmcb_params *  param 
)
Parameters:
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 
)
Parameters:
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.

Parameters:
dlg the dialog to add cseq, contact & record_route
msg sip message
t transaction
leg type of the call leg
tag SIP To tag
Returns:
0 on success, -1 on failure
Note:
for a request: get record route in normal order, for a reply get in reverse order, skipping the ones from the request and the proxies' own

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int pv_get_dlg_lifetime ( struct sip_msg msg,
pv_param_t *  param,
pv_value_t *  res 
)
Parameters:
msg SIP message
param pseudo-variable parameter
res pseudo-variable result
Returns:
0 on success, -1 on failure

Definition at line 1381 of file dlg_handlers.c.

References CURR_DLG_ID, CURR_DLG_LIFETIME, sip_msg::id, int2str(), and pv_get_null().

Here is the call graph for this function:

int pv_get_dlg_status ( struct sip_msg msg,
pv_param_t *  param,
pv_value_t *  res 
)
Parameters:
msg SIP message
param pseudo-variable parameter
res pseudo-variable result
Returns:
0 on success, -1 on failure

Definition at line 1411 of file dlg_handlers.c.

References CURR_DLG_ID, CURR_DLG_STATUS, sip_msg::id, int2str(), and pv_get_null().

Here is the call graph for this function: