#include <string.h>#include <stdlib.h>#include <stdio.h>#include <math.h>#include "../../sr_module.h"#include "../../db/db.h"#include "../../dprint.h"#include "../../error.h"#include "../../ut.h"#include "../../action.h"#include "../../pvar.h"#include "../../dset.h"#include "../../mem/mem.h"#include "../../mi/mi.h"#include "../../parser/parse_to.h"#include "dialplan.h"#include "dp_db.h"

Go to the source code of this file.
Defines | |
| #define | DEFAULT_PARAM "$ruri.user" |
| #define | verify_par_type(_par_no, _spec) |
Functions | |
| static int | child_init (int rank) |
| static int | dp_get_ivalue (struct sip_msg *msg, dp_param_p dp, int *val) |
| static int | dp_get_svalue (struct sip_msg *msg, pv_spec_t spec, str *val) |
| static int | dp_trans_fixup (void **param, int param_no) |
| static int | dp_translate_f (struct sip_msg *msg, char *str1, char *str2) |
| static int | dp_update (struct sip_msg *msg, pv_spec_t *src, pv_spec_t *dest, str *repl, str *attrs) |
| static int | mi_child_init () |
| static struct mi_root * | mi_reload_rules (struct mi_root *cmd_tree, void *param) |
| static struct mi_root * | mi_translate (struct mi_root *cmd_tree, void *param) |
| static void | mod_destroy () |
| static int | mod_init (void) |
Variables | |
| pv_spec_t * | attr_pvar = NULL |
| str | attr_pvar_s = {NULL,0} |
| static cmd_export_t | cmds [] |
| dp_param_p | default_par2 = NULL |
| str | default_param_s = str_init(DEFAULT_PARAM) |
| int | dp_fetch_rows = 1000 |
| struct module_exports | exports |
| static mi_export_t | mi_cmds [] |
| static param_export_t | mod_params [] |
| #define DEFAULT_PARAM "$ruri.user" |
Definition at line 51 of file dialplan.c.
| #define verify_par_type | ( | _par_no, | |||
| _spec | ) |
| static int child_init | ( | int | rank | ) | [static] |
| static int dp_get_ivalue | ( | struct sip_msg * | msg, | |
| dp_param_p | dp, | |||
| int * | val | |||
| ) | [static] |
Definition at line 210 of file dialplan.c.
References DP_VAL_INT, _pv_value::flags, dp_param::id, LM_DBG, LM_ERR, pv_get_spec_value(), PV_VAL_EMPTY, PV_VAL_INT, PV_VAL_NULL, _pv_value::ri, dp_param::sp, _pv_spec::type, dp_param::type, and dp_param::v.
Referenced by dp_translate_f().
Definition at line 232 of file dialplan.c.
References _pv_value::flags, LM_DBG, LM_ERR, pv_get_spec_value(), PV_VAL_EMPTY, PV_VAL_NULL, PV_VAL_STR, _pv_value::rs, and _pv_spec::type.
Referenced by dp_translate_f().
| static int dp_trans_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 366 of file dialplan.c.
References DP_VAL_INT, DP_VAL_SPEC, E_CFG, E_INVALID_PARAMS, E_OUT_OF_MEM, dp_param::id, _str::len, LM_DBG, LM_ERR, NULL, pkg_free, pkg_malloc, pv_parse_spec(), _str::s, s, dp_param::sp, str2s(), dp_param::type, dp_param::v, and verify_par_type.
| static int dp_translate_f | ( | struct sip_msg * | msg, | |
| char * | str1, | |||
| char * | str2 | |||
| ) | [static] |
Definition at line 295 of file dialplan.c.
References attrs, dp_get_ivalue(), dp_get_svalue(), dpl_id::dp_id, dp_update(), _str::len, LM_DBG, LM_ERR, NULL, _str::s, select_dpid(), dp_param::sp, translate(), and dp_param::v.
| static int dp_update | ( | struct sip_msg * | msg, | |
| pv_spec_t * | src, | |||
| pv_spec_t * | dest, | |||
| str * | repl, | |||
| str * | attrs | |||
| ) | [static] |
Definition at line 249 of file dialplan.c.
References append_branch(), EQ_T, FAILURE_ROUTE, _pv_value::flags, _str::len, LM_ERR, PV_VAL_STR, _pv_spec::pvp, PVT_RURI, PVT_RURI_USERNAME, Q_UNSPECIFIED, route_type, _pv_value::rs, _str::s, _pv_spec::setf, and _pv_spec::type.
Referenced by dp_translate_f().
| static int mi_child_init | ( | void | ) | [static] |
Definition at line 439 of file dialplan.c.
References dp_load_db(), init_mi_tree(), LM_ERR, MI_OK_LEN, MI_OK_S, and NULL.
Definition at line 461 of file dialplan.c.
References add_mi_node_child(), attrs, dpl_id::dp_id, free_mi_tree(), init_mi_tree(), mi_node::kids, _str::len, LM_DBG, LM_ERR, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mi_node::next, mi_root::node, NULL, root, _str::s, select_dpid(), str2s(), translate(), and mi_node::value.
| static void mod_destroy | ( | void | ) | [static] |
Definition at line 186 of file dialplan.c.
References destroy_data(), dp_disconnect_db(), NULL, and shm_free.
| static int mod_init | ( | void | ) | [static] |
Definition at line 118 of file dialplan.c.
References attrs_column, dp_db_url, dp_fetch_rows, dp_table_name, dpid_column, init_data(), _str::len, LM_DBG, LM_ERR, match_exp_column, match_len_column, match_op_column, NULL, pr_column, pv_parse_spec(), PVT_AVP, PVT_SCRIPTVAR, repl_exp_column, _str::s, shm_malloc(), dp_param::sp, subst_exp_column, _pv_spec::type, dp_param::v, and ZSW.
Definition at line 64 of file dialplan.c.
| str attr_pvar_s = {NULL,0} |
Definition at line 63 of file dialplan.c.
cmd_export_t cmds[] [static] |
Definition at line 94 of file dialplan.c.
| dp_param_p default_par2 = NULL |
Definition at line 67 of file dialplan.c.
| str default_param_s = str_init(DEFAULT_PARAM) |
Definition at line 66 of file dialplan.c.
| int dp_fetch_rows = 1000 |
| struct module_exports exports |
Definition at line 102 of file dialplan.c.
mi_export_t mi_cmds[] [static] |
Initial value:
{
{ "dp_reload", mi_reload_rules, MI_NO_INPUT_FLAG, 0, mi_child_init},
{ "dp_translate", mi_translate, 0, 0, 0},
{ 0, 0, 0, 0, 0}
}
Definition at line 88 of file dialplan.c.
param_export_t mod_params[] [static] |
Definition at line 71 of file dialplan.c.
1.5.6