dialplan.c File Reference

#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"

Include dependency graph for dialplan.c:

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_rootmi_reload_rules (struct mi_root *cmd_tree, void *param)
static struct mi_rootmi_translate (struct mi_root *cmd_tree, void *param)
static void mod_destroy ()
static int mod_init (void)

Variables

pv_spec_tattr_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 Documentation

#define DEFAULT_PARAM   "$ruri.user"

Definition at line 51 of file dialplan.c.

#define verify_par_type ( _par_no,
_spec   ) 

Definition at line 347 of file dialplan.c.

Referenced by dp_trans_fixup().


Function Documentation

static int child_init ( int  rank  )  [static]

Definition at line 178 of file dialplan.c.

References dp_connect_db().

static int dp_get_ivalue ( struct sip_msg msg,
dp_param_p  dp,
int *  val 
) [static]

static int dp_get_svalue ( struct sip_msg msg,
pv_spec_t  spec,
str val 
) [static]

static int dp_trans_fixup ( void **  param,
int  param_no 
) [static]

static int dp_translate_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int dp_update ( struct sip_msg msg,
pv_spec_t src,
pv_spec_t dest,
str repl,
str attrs 
) [static]

static int mi_child_init ( void   )  [static]

Definition at line 204 of file dialplan.c.

References dp_connect_db().

static struct mi_root * mi_reload_rules ( struct mi_root cmd_tree,
void *  param 
) [static, read]

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.

static struct mi_root * mi_translate ( struct mi_root cmd_tree,
void *  param 
) [static, read]

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]


Variable Documentation

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.

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

Definition at line 69 of file dialplan.c.

Referenced by dp_load_db(), and mod_init().

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.

Definition at line 71 of file dialplan.c.


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