#include <pcre.h>#include "../../pvar.h"#include "../../parser/msg_parser.h"


Go to the source code of this file.
Data Structures | |
| struct | dp_param |
| struct | dpl_id |
| struct | dpl_index |
| struct | dpl_node |
Defines | |
| #define | DP_VAL_INT 0 |
| #define | DP_VAL_SPEC 1 |
| #define | EQUAL_OP 0 |
| #define | MAX_REPLACE_WITH 10 |
| #define | REGEX_OP 1 |
Typedefs | |
| typedef struct dp_param * | dp_param_p |
| typedef struct dp_param | dp_param_t |
| typedef struct dpl_id * | dpl_id_p |
| typedef struct dpl_id | dpl_id_t |
| typedef struct dpl_index * | dpl_index_p |
| typedef struct dpl_index | dpl_index_t |
| typedef struct dpl_node * | dpl_node_p |
| typedef struct dpl_node | dpl_node_t |
Functions | |
| void | destroy_data () |
| int | dp_load_db () |
| int | init_data () |
| struct subst_expr * | repl_exp_parse (str subst) |
| void | repl_expr_free (struct subst_expr *se) |
| int | rule_translate (struct sip_msg *msg, str, dpl_node_t *rule, str *) |
| dpl_id_p | select_dpid (int id) |
| int | translate (struct sip_msg *msg, str user_name, str *repl_user, dpl_id_p idp, str *) |
| #define DP_VAL_INT 0 |
| #define DP_VAL_SPEC 1 |
| #define EQUAL_OP 0 |
Definition at line 36 of file dialplan.h.
Referenced by build_rule(), check_self_op(), comp_ip(), comp_n2n(), comp_no(), comp_s2s(), comp_scriptvar(), comp_str(), comp_strval(), print_expr(), and translate().
| #define MAX_REPLACE_WITH 10 |
Definition at line 38 of file dialplan.h.
| #define REGEX_OP 1 |
| typedef struct dp_param * dp_param_p |
| typedef struct dp_param dp_param_t |
| typedef struct dpl_index * dpl_index_p |
| typedef struct dpl_index dpl_index_t |
| typedef struct dpl_node * dpl_node_p |
| typedef struct dpl_node dpl_node_t |
| void destroy_data | ( | ) |
Definition at line 165 of file dp_db.c.
References crt_idx, destroy_hash(), and shm_free.
Referenced by mod_destroy().
| int dp_load_db | ( | ) |
Definition at line 180 of file dp_db.c.
References add_rule2hash(), build_rule(), crt_idx, DB_CAP_FETCH, DB_CAPABILITY, destroy_hash(), destroy_rule(), dp_fetch_rows, DP_TABLE_COL_NO, db_func::fetch_result, db_func::free_result, list_hash(), LM_DBG, LM_ERR, LM_WARN, next_idx, db_func::query, RES_ROW_N, RES_ROWS, ROW_VALUES, and db_func::use_table.
Referenced by init_db_data(), and mi_reload_rules().
| int init_data | ( | ) |
| struct subst_expr* repl_exp_parse | ( | str | subst | ) | [read] |
Definition at line 49 of file dp_repl.c.
References _str::len, LM_ERR, subst_expr::max_pmatch, NULL, parse_repl(), repl_expr_free(), subst_expr::replace_all, _str::s, shm_malloc(), and WITHOUT_SEP.
Referenced by build_rule().
| void repl_expr_free | ( | struct subst_expr * | se | ) |
Definition at line 34 of file dp_repl.c.
References subst_expr::replacement, _str::s, and shm_free.
Referenced by build_rule(), destroy_rule(), and repl_exp_parse().
| int rule_translate | ( | struct sip_msg * | msg, | |
| str | , | |||
| dpl_node_t * | rule, | |||
| str * | ||||
| ) |
Definition at line 107 of file dp_repl.c.
References replace_with::c, dp_output_buf, sip_msg::first_line, len, _str::len, LM_CRIT, LM_DBG, LM_ERR, dpl_node::match_exp, MAX_PHONE_NB_DIGITS, subst_expr::max_pmatch, MAX_REPLACE_WITH, subst_expr::n_escapes, sip_msg::new_uri, replace_with::nmatch, NULL, replace_with::offset, pv_get_spec_value(), dpl_node::repl_comp, subst_expr::replace, REPLACE_CHAR, REPLACE_NMATCH, REPLACE_SPEC, REPLACE_URI, subst_expr::replacement, msg_start::request, _pv_value::rs, s, _str::s, SIP_REQUEST, replace_with::size, replace_with::spec, dpl_node::subst_comp, dpl_node::subst_exp, msg_start::type, replace_with::type, msg_start::u, and replace_with::u.
Referenced by translate().
| dpl_id_p select_dpid | ( | int | id | ) |
Definition at line 606 of file dp_db.c.
References crt_idx, dpl_id::dp_id, dpl_id::next, and NULL.
Referenced by dp_translate_f(), and mi_translate().
Definition at line 264 of file dp_repl.c.
References dpl_node::attrs, dp_attrs_buf, DP_MAX_ATTRS_LEN, EQUAL_OP, dpl_id::first_index, dpl_index::first_rule, dpl_index::len, _str::len, LM_DBG, LM_ERR, dpl_node::match_comp, dpl_node::match_exp, dpl_node::matchop, dpl_node::next, dpl_index::next, NULL, dpl_node::pr, REGEX_OP, rule_translate(), _str::s, and search_rule().
Referenced by dp_translate_f(), and mi_translate().
1.5.6