#include <stdio.h>#include <string.h>#include <stdlib.h>#include <sys/time.h>#include "../../sr_module.h"#include "../../db/db.h"#include "../../dprint.h"#include "../../error.h"#include "../../ut.h"#include "../../pvar.h"#include "../../mod_fix.h"#include "../../script_cb.h"#include "../../faked_msg.h"#include "../../mem/mem.h"#include "../../mi/mi.h"#include "../tm/tm_load.h"#include "../rr/api.h"#include "dlg_hash.h"#include "dlg_timer.h"#include "dlg_handlers.h"#include "dlg_load.h"#include "dlg_cb.h"#include "dlg_db_handler.h"#include "dlg_req_within.h"#include "dlg_profile.h"#include "dlg_var.h"#include "dlg_transfer.h"

Go to the source code of this file.
Functions | |
| static int | child_init (int rank) |
| static int | fixup_dlg_bridge (void **param, int param_no) |
| static int | fixup_dlg_bye (void **param, int param_no) |
| static int | fixup_dlg_refer (void **param, int param_no) |
| static int | fixup_get_profile2 (void **param, int param_no) |
| static int | fixup_get_profile3 (void **param, int param_no) |
| static int | fixup_profile (void **param, int param_no) |
| int | load_dlg (struct dlg_binds *dlgb) |
| struct mi_root * | mi_dlg_bridge (struct mi_root *cmd_tree, void *param) |
| static void | mod_destroy (void) |
| static MODULE_VERSION int | mod_init (void) |
| static int | pv_get_dlg_count (struct sip_msg *msg, pv_param_t *param, pv_value_t *res) |
| static int | w_dlg_bridge (struct sip_msg *, char *, char *, char *) |
| static int | w_dlg_bye (struct sip_msg *, char *, char *) |
| static int | w_dlg_get (struct sip_msg *, char *, char *, char *) |
| static int | w_dlg_isflagset (struct sip_msg *msg, char *flag, str *s2) |
| static int | w_dlg_manage (struct sip_msg *, char *, char *) |
| static int | w_dlg_refer (struct sip_msg *, char *, char *) |
| static int | w_dlg_resetflag (struct sip_msg *msg, char *flag, str *s2) |
| static int | w_dlg_setflag (struct sip_msg *msg, char *flag, char *s2) |
| static int | w_get_profile_size (struct sip_msg *, char *, char *, char *) |
| static int | w_is_in_profile (struct sip_msg *, char *, char *) |
| static int | w_set_dlg_profile (struct sip_msg *, char *, char *) |
| static int | w_unset_dlg_profile (struct sip_msg *, char *, char *) |
Variables | |
| stat_var * | active_dlgs = 0 |
| int | active_dlgs_cnt = 0 |
| static cmd_export_t | cmds [] |
| struct rr_binds | d_rrb |
| struct tm_binds | d_tmb |
| static int | db_fetch_rows = 200 |
| static unsigned int | db_update_period = DB_DEFAULT_UPDATE_PERIOD |
| static str | db_url = str_init(DEFAULT_DB_URL) |
| static int | default_timeout = 60 * 60 * 12 |
| str | dlg_bridge_controller = {"sip:controller@kamailio.org", 27} |
| int | dlg_enable_stats = 1 |
| str | dlg_extra_hdrs = {NULL,0} |
| static int | dlg_flag = -1 |
| static int | dlg_hash_size = 4096 |
| stat_var * | early_dlgs = 0 |
| int | early_dlgs_cnt = 0 |
| stat_var * | expired_dlgs = 0 |
| struct module_exports | exports |
| stat_var * | failed_dlgs = 0 |
| static mi_export_t | mi_cmds [] |
| static pv_export_t | mod_items [] |
| static param_export_t | mod_params [] |
| static stat_export_t | mod_stats [] |
| stat_var * | processed_dlgs = 0 |
| static char * | profiles_nv_s = NULL |
| static char * | profiles_wv_s = NULL |
| static char * | rr_param = "did" |
| static int | seq_match_mode = SEQ_MATCH_STRICT_ID |
| pv_spec_t | timeout_avp |
| static str | timeout_spec = {NULL, 0} |
| static int child_init | ( | int | rank | ) | [static] |
Definition at line 549 of file dialog.c.
References active_dlgs_cnt, DB_MODE_DELAYED, DB_MODE_NONE, DB_MODE_REALTIME, DB_MODE_SHUTDOWN, dlg_connect_db(), dlg_db_mode, dlg_enable_stats, early_dlgs_cnt, if_update_stat, LM_ERR, PROC_MAIN, and PROC_TIMER.
| static int fixup_dlg_bridge | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_dlg_bye | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_dlg_refer | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_get_profile2 | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 294 of file dialog.c.
References E_SCRIPT, fixup_profile(), fixup_pvar(), LM_ERR, PVT_AVP, PVT_SCRIPTVAR, and _pv_spec::type.
Referenced by fixup_get_profile3().
| static int fixup_get_profile3 | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_profile | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 261 of file dialog.c.
References E_CFG, _str::len, LM_CRIT, LM_ERR, NULL, pkg_free, pv_parse_format(), _str::s, s, and search_dlg_profile().
Referenced by fixup_get_profile2(), and fixup_get_profile3().
| int load_dlg | ( | struct dlg_binds * | dlgb | ) |
Definition at line 328 of file dialog.c.
References register_dlgcb(), and dlg_binds::register_dlgcb.
Referenced by load_dlg_api().
Definition at line 1014 of file dialog.c.
References dlg_bridge(), init_mi_tree(), mi_node::kids, _str::len, LM_ERR, MI_INTERNAL_ERR_LEN, MI_INTERNAL_ERR_S, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mi_node::next, mi_root::node, NULL, _str::s, and mi_node::value.
| static void mod_destroy | ( | void | ) | [static] |
Definition at line 575 of file dialog.c.
References DB_MODE_DELAYED, DB_MODE_NONE, DB_MODE_SHUTDOWN, destroy_dlg_callbacks(), destroy_dlg_db(), destroy_dlg_handlers(), destroy_dlg_profiles(), destroy_dlg_table(), destroy_dlg_timer(), dialog_update_db(), dlg_db_mode, DLGCB_CREATED, and DLGCB_LOADED.
| static int mod_init | ( | void | ) | [static] |
Definition at line 359 of file dialog.c.
References add_profile_definitions(), call_id_column, d_rrb, d_tmb, db_fetch_rows, DB_MODE_DELAYED, DB_MODE_NONE, DB_MODE_REALTIME, DB_MODE_SHUTDOWN, db_update_period, default_timeout, destroy_dlg_callbacks(), dialog_table_name, dlg_cfg_cb(), dlg_db_mode, dlg_enable_stats, dlg_flag, dlg_hash_size, dlg_onreq(), dlg_onroute(), dlg_ontimeout(), dlg_timer_routine(), DLGCB_LOADED, faked_msg_init(), from_contact_column, from_cseq_column, from_route_column, from_sock_column, from_tag_column, from_uri_column, h_entry_column, h_id_column, init_dlg_db(), init_dlg_handlers(), init_dlg_table(), init_dlg_timer(), _str::len, LM_ERR, LM_WARN, load_rr_api(), load_tm_api(), MAX_DLG_RR_PARAM_NAME, MAX_FLAG, POST_SCRIPT_CB, PRE_SCRIPT_CB, profile_cleanup(), profiles_nv_s, profiles_wv_s, pv_parse_spec(), PVT_AVP, rr_binds::register_rrcb, register_script_cb(), register_timer(), tm_binds::register_tmcb, REQ_TYPE_CB, rr_param, run_load_callbacks(), _str::s, SEQ_MATCH_FALLBACK, seq_match_mode, SEQ_MATCH_NO_ID, SEQ_MATCH_STRICT_ID, sflags_column, start_time_column, state_column, module_exports::stats, timeout_column, TMCB_REQUEST_IN, to_contact_column, to_cseq_column, to_route_column, to_sock_column, to_tag_column, to_uri_column, toroute_column, and _pv_spec::type.
| static int pv_get_dlg_count | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| pv_value_t * | res | |||
| ) | [static] |
Definition at line 335 of file dialog.c.
References _pv_value::flags, get_stat_val, int2str(), _str::len, NULL, PV_TYPE_INT, PV_VAL_INT, PV_VAL_STR, _pv_value::ri, _pv_value::rs, and _str::s.
| static int w_dlg_bridge | ( | struct sip_msg * | msg, | |
| char * | from, | |||
| char * | to, | |||
| char * | op | |||
| ) | [static] |
Definition at line 853 of file dialog.c.
References dlg_bridge(), fixup_get_svalue(), _str::len, LM_ERR, NULL, and _str::s.
| static int w_dlg_bye | ( | struct sip_msg * | msg, | |
| char * | side, | |||
| char * | s2 | |||
| ) | [static] |
Definition at line 794 of file dialog.c.
References dlg_bye(), dlg_bye_all(), DLG_CALLEE_LEG, DLG_CALLER_LEG, dlg_get_ctx_dialog(), and NULL.
| static int w_dlg_get | ( | struct sip_msg * | msg, | |
| char * | ci, | |||
| char * | ft, | |||
| char * | tt | |||
| ) | [static] |
Definition at line 960 of file dialog.c.
References current_dlg_pointer, fixup_get_svalue(), get_dlg(), _str::len, LM_ERR, NULL, and _str::s.
Definition at line 751 of file dialog.c.
References dlg_get_ctx_dialog(), fixup_get_ivalue(), LM_ERR, NULL, and dlg_cell::sflags.
| static int w_dlg_manage | ( | struct sip_msg * | msg, | |
| char * | s1, | |||
| char * | s2 | |||
| ) | [static] |
Definition at line 770 of file dialog.c.
References dlg_new_dialog(), dlg_onroute(), get_to, HDR_TO_F, _str::len, LM_ERR, NULL, parse_headers(), _str::s, seq_match_mode, SEQ_MATCH_NO_ID, dlg_cell::tag, and sip_msg::to.
| static int w_dlg_refer | ( | struct sip_msg * | msg, | |
| char * | side, | |||
| char * | to | |||
| ) | [static] |
Definition at line 820 of file dialog.c.
References DLG_CALLEE_LEG, DLG_CALLER_LEG, dlg_get_ctx_dialog(), dlg_transfer(), fixup_get_svalue(), _str::len, LM_ERR, NULL, and _str::s.
Definition at line 730 of file dialog.c.
References dlg_get_ctx_dialog(), fixup_get_ivalue(), LM_ERR, NULL, and dlg_cell::sflags.
| static int w_dlg_setflag | ( | struct sip_msg * | msg, | |
| char * | flag, | |||
| char * | s2 | |||
| ) | [static] |
Definition at line 710 of file dialog.c.
References dlg_get_ctx_dialog(), fixup_get_ivalue(), LM_ERR, NULL, and dlg_cell::sflags.
| static int w_get_profile_size | ( | struct sip_msg * | msg, | |
| char * | profile, | |||
| char * | value, | |||
| char * | result | |||
| ) | [static] |
Definition at line 674 of file dialog.c.
References EQ_T, _pv_value::flags, get_profile_size(), dlg_profile_table::has_value, _str::len, LM_ERR, LM_WARN, NULL, pv_printf_s(), PV_TYPE_INT, PV_VAL_INT, _pv_spec::pvp, _pv_value::ri, _str::s, _pv_spec::setf, and dlg_profile_table::size.
| static int w_is_in_profile | ( | struct sip_msg * | msg, | |
| char * | profile, | |||
| char * | value | |||
| ) | [static] |
Definition at line 652 of file dialog.c.
References is_dlg_in_profile(), _str::len, LM_WARN, NULL, pv_printf_s(), and _str::s.
| static int w_set_dlg_profile | ( | struct sip_msg * | msg, | |
| char * | profile, | |||
| char * | value | |||
| ) | [static] |
Definition at line 592 of file dialog.c.
References _str::len, LM_ERR, LM_WARN, NULL, pv_printf_s(), _str::s, and set_dlg_profile().
| static int w_unset_dlg_profile | ( | struct sip_msg * | msg, | |
| char * | profile, | |||
| char * | value | |||
| ) | [static] |
Definition at line 622 of file dialog.c.
References _str::len, LM_ERR, LM_WARN, NULL, pv_printf_s(), _str::s, and unset_dlg_profile().
| stat_var* active_dlgs = 0 |
Definition at line 94 of file dialog.c.
Referenced by bye_reply_cb(), dlg_onreply(), dlg_onroute(), and dlg_ontimeout().
| int active_dlgs_cnt = 0 |
cmd_export_t cmds[] [static] |
Definition at line 101 of file dialog.c.
Referenced by add_dlg_rr_param(), dlg_onroute(), and mod_init().
tm bindings
Definition at line 100 of file dialog.c.
Referenced by dlg_bridge(), dlg_new_dialog(), dlg_onroute(), dlg_refer_callee(), dlg_refer_tm_callback(), get_current_dialog(), mod_init(), and send_bye().
int db_fetch_rows = 200 [static] |
unsigned int db_update_period = DB_DEFAULT_UPDATE_PERIOD [static] |
int default_timeout = 60 * 60 * 12 [static] |
Definition at line 81 of file dialog.c.
Referenced by dlg_onroute(), get_dlg_timeout(), init_dlg_handlers(), and mod_init().
| str dlg_bridge_controller = {"sip:controller@kamailio.org", 27} |
| int dlg_enable_stats = 1 |
Definition at line 91 of file dialog.c.
Referenced by bye_reply_cb(), child_init(), dlg_new_dialog(), dlg_onreply(), dlg_onroute(), dlg_ontimeout(), and mod_init().
| str dlg_extra_hdrs = {NULL,0} |
int dlg_flag = -1 [static] |
Definition at line 79 of file dialog.c.
Referenced by dlg_onreq(), init_dlg_handlers(), and mod_init().
int dlg_hash_size = 4096 [static] |
| stat_var* early_dlgs = 0 |
| int early_dlgs_cnt = 0 |
| stat_var* expired_dlgs = 0 |
| struct module_exports exports |
| stat_var* failed_dlgs = 0 |
mi_export_t mi_cmds[] [static] |
pv_export_t mod_items[] [static] |
param_export_t mod_params[] [static] |
stat_export_t mod_stats[] [static] |
| stat_var* processed_dlgs = 0 |
char* profiles_nv_s = NULL [static] |
char* profiles_wv_s = NULL [static] |
char* rr_param = "did" [static] |
int seq_match_mode = SEQ_MATCH_STRICT_ID [static] |
Definition at line 82 of file dialog.c.
Referenced by dlg_new_dialog(), dlg_onroute(), init_dlg_handlers(), mod_init(), and w_dlg_manage().
str timeout_spec = {NULL, 0} [static] |
1.5.6