dlg_handlers.c File Reference

#include <string.h>
#include <time.h>
#include "../../trim.h"
#include "../../pvar.h"
#include "../../timer.h"
#include "../../statistics.h"
#include "../../action.h"
#include "../../script_cb.h"
#include "../../faked_msg.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_cseq.h"
#include "../../parser/contact/parse_contact.h"
#include "../../parser/parse_rr.h"
#include "../tm/tm_load.h"
#include "../rr/api.h"
#include "dlg_hash.h"
#include "dlg_timer.h"
#include "dlg_cb.h"
#include "dlg_handlers.h"
#include "dlg_req_within.h"
#include "dlg_db_handler.h"
#include "dlg_profile.h"
#include "dlg_var.h"

Include dependency graph for dlg_handlers.c:

Go to the source code of this file.

Defines

#define DLG_SEPARATOR   '.'
#define get_dlg_tl_payload(_tl_)
#define RR_DLG_PARAM_SIZE   (2*2*sizeof(int)+3+MAX_DLG_RR_PARAM_NAME)

Functions

static int add_dlg_rr_param (struct sip_msg *req, unsigned int entry, unsigned int id)
void destroy_dlg_handlers (void)
int dlg_new_dialog (struct sip_msg *msg, struct cell *t)
static void dlg_onreply (struct cell *t, int type, struct tmcb_params *param)
void dlg_onreq (struct cell *t, int type, struct tmcb_params *param)
void dlg_onroute (struct sip_msg *req, str *route_params, void *param)
void dlg_ontimeout (struct dlg_tl *tl)
static void dlg_seq_down_onreply (struct cell *t, int type, struct tmcb_params *param)
static void dlg_seq_up_onreply (struct cell *t, int type, struct tmcb_params *param)
static int get_dlg_timeout (struct sip_msg *req)
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)
static int parse_dlg_rr_param (char *p, char *end, int *h_entry, int *h_id)
int populate_leg_info (struct dlg_cell *dlg, struct sip_msg *msg, struct cell *t, unsigned int leg, str *tag)
static int pre_match_parse (struct sip_msg *req, str *callid, str *ftag, str *ttag)
int pv_get_dlg_lifetime (struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
int pv_get_dlg_status (struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
void unref_new_dialog (void *dialog)
static void unreference_dialog (void *dialog)
static int update_cseqs (struct dlg_cell *dlg, struct sip_msg *req, unsigned int dir)

Variables

static unsigned int CURR_DLG_ID = 0xffffffff
static unsigned int CURR_DLG_LIFETIME = 0
static unsigned int CURR_DLG_STATUS = 0
struct rr_binds d_rrb
static int default_timeout
static int dlg_flag
stat_varearly_dlgs
stat_varexpired_dlgs
stat_varfailed_dlgs
stat_varprocessed_dlgs
static str rr_param
static int seq_match_mode
static int shutdown_done = 0
static pv_spec_ttimeout_avp


Define Documentation

#define DLG_SEPARATOR   '.'

Definition at line 94 of file dlg_handlers.c.

Referenced by add_dlg_rr_param(), and parse_dlg_rr_param().

#define get_dlg_tl_payload ( _tl_   ) 

Value:

((struct dlg_cell*)((char *)(_tl_)- \
      (unsigned long)(&((struct dlg_cell*)0)->tl)))

Definition at line 820 of file dlg_handlers.c.

Referenced by dlg_ontimeout().

#define RR_DLG_PARAM_SIZE   (2*2*sizeof(int)+3+MAX_DLG_RR_PARAM_NAME)

Definition at line 93 of file dlg_handlers.c.

Referenced by add_dlg_rr_param().


Function Documentation

static int add_dlg_rr_param ( struct sip_msg req,
unsigned int  entry,
unsigned int  id 
) [inline, static]

void destroy_dlg_handlers ( void   ) 

Definition at line 112 of file dlg_handlers.c.

References shutdown_done.

Referenced by mod_destroy().

int dlg_new_dialog ( struct sip_msg msg,
struct cell t 
)

static void dlg_onreply ( struct cell t,
int  type,
struct tmcb_params param 
) [static]

void dlg_onreq ( struct cell t,
int  type,
struct tmcb_params param 
)

Definition at line 414 of file dlg_handlers.c.

References current_dlg_pointer, dlg_flag, dlg_new_dialog(), sip_msg::flags, NULL, and tmcb_params::req.

Referenced by mod_init().

void dlg_onroute ( struct sip_msg req,
str route_params,
void *  param 
)

void dlg_ontimeout ( struct dlg_tl tl  ) 

static void dlg_seq_down_onreply ( struct cell t,
int  type,
struct tmcb_params param 
) [static]

static void dlg_seq_up_onreply ( struct cell t,
int  type,
struct tmcb_params param 
) [static]

static int get_dlg_timeout ( struct sip_msg req  )  [inline, static]

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 
)

Definition at line 97 of file dlg_handlers.c.

References default_timeout, dlg_flag, _str::len, _str::s, and seq_match_mode.

Referenced by mod_init().

static int parse_dlg_rr_param ( char *  p,
char *  end,
int *  h_entry,
int *  h_id 
) [inline, static]

Definition at line 530 of file dlg_handlers.c.

References DLG_SEPARATOR, LM_ERR, reverse_hex2int(), and s.

Referenced by dlg_onroute().

int populate_leg_info ( struct dlg_cell dlg,
struct sip_msg msg,
struct cell t,
unsigned int  leg,
str tag 
)

static int pre_match_parse ( struct sip_msg req,
str callid,
str ftag,
str ttag 
) [inline, static]

int pv_get_dlg_lifetime ( struct sip_msg msg,
pv_param_t param,
pv_value_t res 
)

int pv_get_dlg_status ( struct sip_msg msg,
pv_param_t param,
pv_value_t res 
)

void unref_new_dialog ( void *  dialog  ) 

Definition at line 425 of file dlg_handlers.c.

References dlg_onreply(), tmcb_params::param, and TMCB_TRANS_DELETED.

Referenced by dlg_new_dialog().

static void unreference_dialog ( void *  dialog  )  [static]

Definition at line 606 of file dlg_handlers.c.

References d_table, and unref_dlg().

Referenced by dlg_onroute().

static int update_cseqs ( struct dlg_cell dlg,
struct sip_msg req,
unsigned int  dir 
) [inline, static]


Variable Documentation

unsigned int CURR_DLG_ID = 0xffffffff [static]

Definition at line 91 of file dlg_handlers.c.

Referenced by dlg_onroute(), pv_get_dlg_lifetime(), and pv_get_dlg_status().

unsigned int CURR_DLG_LIFETIME = 0 [static]

Definition at line 89 of file dlg_handlers.c.

Referenced by dlg_onroute(), and pv_get_dlg_lifetime().

unsigned int CURR_DLG_STATUS = 0 [static]

Definition at line 90 of file dlg_handlers.c.

Referenced by dlg_onroute(), and pv_get_dlg_status().

struct rr_binds d_rrb

Definition at line 101 of file dialog.c.

Referenced by add_dlg_rr_param(), dlg_onroute(), and mod_init().

int default_timeout [static]

Definition at line 76 of file dlg_handlers.c.

int dlg_flag [static]

Definition at line 74 of file dlg_handlers.c.

Definition at line 98 of file dialog.c.

Referenced by dlg_onreply().

Definition at line 96 of file dialog.c.

Definition at line 97 of file dialog.c.

Definition at line 95 of file dialog.c.

str rr_param [static]

Definition at line 73 of file dlg_handlers.c.

int seq_match_mode [static]

Definition at line 77 of file dlg_handlers.c.

int shutdown_done = 0 [static]

Definition at line 75 of file dlg_handlers.c.


Generated on Tue May 22 16:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6