Wed Feb 11 12:00:26 2009

Asterisk developer's documentation


misdn_config.c File Reference

chan_misdn configuration management More...

#include "asterisk.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "chan_misdn_config.h"
#include "asterisk/config.h"
#include "asterisk/channel.h"
#include "asterisk/logger.h"
#include "asterisk/lock.h"
#include "asterisk/pbx.h"
#include "asterisk/strings.h"
#include "asterisk/utils.h"

Go to the source code of this file.

Data Structures

union  misdn_cfg_pt
struct  misdn_cfg_spec
struct  msn_list

Defines

#define AST_DESTROY_CFG   ast_config_destroy
#define AST_LOAD_CFG   ast_config_load
#define CLI_ERROR(name, value, section)
#define GEN_CFG   1
#define NO_DEFAULT   "<>"
#define NONE   0
#define NUM_GEN_ELEMENTS   (sizeof(gen_spec) / sizeof(struct misdn_cfg_spec))
#define NUM_PORT_ELEMENTS   (sizeof(port_spec) / sizeof(struct misdn_cfg_spec))
#define PORT_CFG   2

Enumerations

enum  misdn_cfg_type {
  MISDN_CTYPE_STR, MISDN_CTYPE_INT, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT,
  MISDN_CTYPE_MSNLIST, MISDN_CTYPE_ASTGROUP
}

Functions

static void _build_general_config (struct ast_variable *v)
static void _build_port_config (struct ast_variable *v, char *cat)
static int _enum_array_map (void)
static void _fill_defaults (void)
static void _free_general_cfg (void)
static void _free_msn_list (struct msn_list *iter)
static void _free_port_cfg (void)
static int _parse (union misdn_cfg_pt *dest, char *value, enum misdn_cfg_type type, int boolint_def)
static int get_cfg_position (char *name, int type)
void misdn_cfg_destroy (void)
void misdn_cfg_get (int port, enum misdn_cfg_elements elem, void *buf, int bufsize)
void misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char *buf, int bufsize)
void misdn_cfg_get_desc (enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default)
enum misdn_cfg_elements misdn_cfg_get_elem (char *name)
void misdn_cfg_get_name (enum misdn_cfg_elements elem, void *buf, int bufsize)
int misdn_cfg_get_next_port (int port)
int misdn_cfg_get_next_port_spin (int port)
void misdn_cfg_get_ports_string (char *ports)
 Generate a comma separated list of all active ports.
int misdn_cfg_init (int this_max_ports)
int misdn_cfg_is_group_method (char *group, enum misdn_cfg_method meth)
int misdn_cfg_is_msn_valid (int port, char *msn)
int misdn_cfg_is_port_valid (int port)
static void misdn_cfg_lock (void)
void misdn_cfg_reload (void)
static void misdn_cfg_unlock (void)
void misdn_cfg_update_ptp (void)
ast_jb_confmisdn_get_global_jbconf ()

Variables

static ast_mutex_t config_mutex
static struct ast_jb_conf default_jbconf
static struct misdn_cfg_spec gen_spec []
static union misdn_cfg_ptgeneral_cfg
static struct ast_jb_conf global_jbconf
static int * map
static int max_ports
static union misdn_cfg_pt ** port_cfg
static struct misdn_cfg_spec port_spec []
static const char ports_description []
static int * ptp


Detailed Description

chan_misdn configuration management

Author:
Christian Richter <crich@beronet.com>

Definition in file misdn_config.c.


Define Documentation

#define AST_DESTROY_CFG   ast_config_destroy

Definition at line 49 of file misdn_config.c.

Referenced by misdn_cfg_init().

#define AST_LOAD_CFG   ast_config_load

Definition at line 48 of file misdn_config.c.

Referenced by misdn_cfg_init().

#define CLI_ERROR ( name,
value,
section   ) 

Value:

({ \
   ast_log(LOG_WARNING, "misdn.conf: \"%s=%s\" (section: %s) invalid or out of range. " \
      "Please edit your misdn.conf and then do a \"misdn reload\".\n", name, value, section); \
})

Definition at line 400 of file misdn_config.c.

Referenced by _build_general_config(), and _build_port_config().

#define GEN_CFG   1

Definition at line 54 of file misdn_config.c.

Referenced by _build_general_config(), get_cfg_position(), and misdn_cfg_get_elem().

#define NO_DEFAULT   "<>"

Definition at line 51 of file misdn_config.c.

Referenced by _fill_defaults(), and misdn_cfg_get_desc().

#define NONE   0

Definition at line 52 of file misdn_config.c.

#define NUM_GEN_ELEMENTS   (sizeof(gen_spec) / sizeof(struct misdn_cfg_spec))

Definition at line 56 of file misdn_config.c.

Referenced by _enum_array_map(), _fill_defaults(), _free_general_cfg(), get_cfg_position(), and misdn_cfg_init().

#define NUM_PORT_ELEMENTS   (sizeof(port_spec) / sizeof(struct misdn_cfg_spec))

Definition at line 57 of file misdn_config.c.

Referenced by _build_port_config(), _enum_array_map(), _fill_defaults(), _free_port_cfg(), get_cfg_position(), and misdn_cfg_init().

#define PORT_CFG   2

Definition at line 55 of file misdn_config.c.

Referenced by _build_port_config(), get_cfg_position(), and misdn_cfg_get_elem().


Enumeration Type Documentation

enum misdn_cfg_type

Enumerator:
MISDN_CTYPE_STR 
MISDN_CTYPE_INT 
MISDN_CTYPE_BOOL 
MISDN_CTYPE_BOOLINT 
MISDN_CTYPE_MSNLIST 
MISDN_CTYPE_ASTGROUP 

Definition at line 70 of file misdn_config.c.


Function Documentation

static void _build_general_config ( struct ast_variable v  )  [static]

Definition at line 944 of file misdn_config.c.

References _parse(), ast_jb_read_conf(), misdn_cfg_spec::boolint_def, CLI_ERROR, GEN_CFG, gen_spec, general_cfg, get_cfg_position(), global_jbconf, ast_variable::name, ast_variable::next, misdn_cfg_spec::type, and ast_variable::value.

Referenced by misdn_cfg_init().

00945 {
00946    int pos;
00947 
00948    for (; v; v = v->next) {
00949       if (!ast_jb_read_conf(&global_jbconf, v->name, v->value))
00950          continue;
00951       if (((pos = get_cfg_position(v->name, GEN_CFG)) < 0) || 
00952          (_parse(&general_cfg[pos], v->value, gen_spec[pos].type, gen_spec[pos].boolint_def) < 0))
00953          CLI_ERROR(v->name, v->value, "general");
00954    }
00955 }

static void _build_port_config ( struct ast_variable v,
char *  cat 
) [static]

Definition at line 957 of file misdn_config.c.

References _parse(), BUFFERSIZE, CLI_ERROR, get_cfg_position(), max_ports, ast_variable::name, ast_variable::next, NUM_PORT_ELEMENTS, PORT_CFG, port_spec, ptp, type, and ast_variable::value.

Referenced by misdn_cfg_init().

00958 {
00959    int pos, i;
00960    union misdn_cfg_pt cfg_tmp[NUM_PORT_ELEMENTS];
00961    int cfg_for_ports[max_ports + 1];
00962 
00963    if (!v || !cat)
00964       return;
00965 
00966    memset(cfg_tmp, 0, sizeof(cfg_tmp));
00967    memset(cfg_for_ports, 0, sizeof(cfg_for_ports));
00968 
00969    if (!strcasecmp(cat, "default")) {
00970       cfg_for_ports[0] = 1;
00971    }
00972 
00973    if (((pos = get_cfg_position("name", PORT_CFG)) < 0) || 
00974       (_parse(&cfg_tmp[pos], cat, port_spec[pos].type, port_spec[pos].boolint_def) < 0)) {
00975       CLI_ERROR(v->name, v->value, cat);
00976       return;
00977    }
00978 
00979    for (; v; v = v->next) {
00980       if (!strcasecmp(v->name, "ports")) {
00981          char *token;
00982          char ptpbuf[BUFFERSIZE] = "";
00983          int start, end;
00984          for (token = strsep(&v->value, ","); token; token = strsep(&v->value, ","), *ptpbuf = 0) { 
00985             if (!*token)
00986                continue;
00987             if (sscanf(token, "%d-%d%s", &start, &end, ptpbuf) >= 2) {
00988                for (; start <= end; start++) {
00989                   if (start <= max_ports && start > 0) {
00990                      cfg_for_ports[start] = 1;
00991                      ptp[start] = (strstr(ptpbuf, "ptp")) ? 1 : 0;
00992                   } else
00993                      CLI_ERROR(v->name, v->value, cat);
00994                }
00995             } else {
00996                if (sscanf(token, "%d%s", &start, ptpbuf)) {
00997                   if (start <= max_ports && start > 0) {
00998                      cfg_for_ports[start] = 1;
00999                      ptp[start] = (strstr(ptpbuf, "ptp")) ? 1 : 0;
01000                   } else
01001                      CLI_ERROR(v->name, v->value, cat);
01002                } else
01003                   CLI_ERROR(v->name, v->value, cat);
01004             }
01005          }
01006       } else {
01007          if (((pos = get_cfg_position(v->name, PORT_CFG)) < 0) || 
01008             (_parse(&cfg_tmp[pos], v->value, port_spec[pos].type, port_spec[pos].boolint_def) < 0))
01009             CLI_ERROR(v->name, v->value, cat);
01010       }
01011    }
01012 
01013    for (i = 0; i < (max_ports + 1); ++i) {
01014       if (cfg_for_ports[i]) {
01015          memcpy(port_cfg[i], cfg_tmp, sizeof(cfg_tmp));
01016       }
01017    }
01018 }

static int _enum_array_map ( void   )  [static]

Definition at line 405 of file misdn_config.c.

References ast_log(), gen_spec, LOG_WARNING, MISDN_CFG_FIRST, MISDN_CFG_LAST, MISDN_CFG_PTP, MISDN_GEN_FIRST, MISDN_GEN_LAST, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, and port_spec.

Referenced by misdn_cfg_init().

00406 {
00407    int i, j, ok;
00408 
00409    for (i = MISDN_CFG_FIRST + 1; i < MISDN_CFG_LAST; ++i) {
00410       if (i == MISDN_CFG_PTP)
00411          continue;
00412       ok = 0;
00413       for (j = 0; j < NUM_PORT_ELEMENTS; ++j) {
00414          if (port_spec[j].elem == i) {
00415             map[i] = j;
00416             ok = 1;
00417             break;
00418          }
00419       }
00420       if (!ok) {
00421          ast_log(LOG_WARNING, "Enum element %d in misdn_cfg_elements (port section) has no corresponding element in the config struct!\n", i);
00422          return -1;
00423       }
00424    }
00425    for (i = MISDN_GEN_FIRST + 1; i < MISDN_GEN_LAST; ++i) {
00426       ok = 0;
00427       for (j = 0; j < NUM_GEN_ELEMENTS; ++j) {
00428          if (gen_spec[j].elem == i) {
00429             map[i] = j;
00430             ok = 1;
00431             break;
00432          }
00433       }
00434       if (!ok) {
00435          ast_log(LOG_WARNING, "Enum element %d in misdn_cfg_elements (general section) has no corresponding element in the config struct!\n", i);
00436          return -1;
00437       }
00438    }
00439    return 0;
00440 }

static void _fill_defaults ( void   )  [static]

Definition at line 1075 of file misdn_config.c.

References _parse(), misdn_cfg_pt::any, gen_spec, general_cfg, NO_DEFAULT, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, port_cfg, port_spec, and type.

Referenced by misdn_cfg_init().

01076 {
01077    int i;
01078 
01079    for (i = 0; i < NUM_PORT_ELEMENTS; ++i) {
01080       if (!port_cfg[0][i].any && strcasecmp(port_spec[i].def, NO_DEFAULT))
01081          _parse(&(port_cfg[0][i]), (char *)port_spec[i].def, port_spec[i].type, port_spec[i].boolint_def);
01082    }
01083    for (i = 0; i < NUM_GEN_ELEMENTS; ++i) {
01084       if (!general_cfg[i].any && strcasecmp(gen_spec[i].def, NO_DEFAULT))
01085          _parse(&(general_cfg[i]), (char *)gen_spec[i].def, gen_spec[i].type, gen_spec[i].boolint_def);
01086    }
01087 }

static void _free_general_cfg ( void   )  [static]

Definition at line 515 of file misdn_config.c.

References misdn_cfg_pt::any, free, general_cfg, and NUM_GEN_ELEMENTS.

Referenced by misdn_cfg_destroy(), and misdn_cfg_init().

00516 {
00517    int i;
00518 
00519    for (i = 0; i < NUM_GEN_ELEMENTS; i++) 
00520       if (general_cfg[i].any)
00521          free(general_cfg[i].any);
00522 }

static void _free_msn_list ( struct msn_list iter  )  [static]

Definition at line 473 of file misdn_config.c.

References free, msn_list::msn, and msn_list::next.

Referenced by _free_port_cfg().

00474 {
00475    if (iter->next)
00476       _free_msn_list(iter->next);
00477    if (iter->msn)
00478       free(iter->msn);
00479    free(iter);
00480 }

static void _free_port_cfg ( void   )  [static]

Definition at line 482 of file misdn_config.c.

References _free_msn_list(), misdn_cfg_pt::any, free, MISDN_CFG_GROUPNAME, MISDN_CTYPE_MSNLIST, misdn_cfg_pt::ml, NUM_PORT_ELEMENTS, port_cfg, port_spec, misdn_cfg_pt::str, and type.

Referenced by misdn_cfg_destroy(), and misdn_cfg_init().

00483 {
00484    int i, j;
00485    int gn = map[MISDN_CFG_GROUPNAME];
00486    union misdn_cfg_pt* free_list[max_ports + 2];
00487    
00488    memset(free_list, 0, sizeof(free_list));
00489    free_list[0] = port_cfg[0];
00490    for (i = 1; i <= max_ports; ++i) {
00491       if (port_cfg[i][gn].str) {
00492          /* we always have a groupname in the non-default case, so this is fine */
00493          for (j = 1; j <= max_ports; ++j) {
00494             if (free_list[j] && free_list[j][gn].str == port_cfg[i][gn].str)
00495                break;
00496             else if (!free_list[j]) {
00497                free_list[j] = port_cfg[i];
00498                break;
00499             }
00500          }
00501       }
00502    }
00503    for (j = 0; free_list[j]; ++j) {
00504       for (i = 0; i < NUM_PORT_ELEMENTS; ++i) {
00505          if (free_list[j][i].any) {
00506             if (port_spec[i].type == MISDN_CTYPE_MSNLIST)
00507                _free_msn_list(free_list[j][i].ml);
00508             else
00509                free(free_list[j][i].any);
00510          }
00511       }
00512    }
00513 }

static int _parse ( union misdn_cfg_pt dest,
char *  value,
enum misdn_cfg_type  type,
int  boolint_def 
) [static]

Definition at line 881 of file misdn_config.c.

References ast_get_group(), ast_true(), calloc, misdn_cfg_pt::grp, len(), malloc, MISDN_CTYPE_ASTGROUP, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT, MISDN_CTYPE_INT, MISDN_CTYPE_MSNLIST, MISDN_CTYPE_STR, misdn_cfg_pt::ml, msn_list::msn, msn_list::next, misdn_cfg_pt::num, and misdn_cfg_pt::str.

Referenced by _build_general_config(), _build_port_config(), and _fill_defaults().

00882 {
00883    int re = 0;
00884    int len, tmp;
00885    char *valtmp;
00886 
00887    switch (type) {
00888    case MISDN_CTYPE_STR:
00889       if ((len = strlen(value))) {
00890          dest->str = (char *)malloc((len + 1) * sizeof(char));
00891          strncpy(dest->str, value, len);
00892          dest->str[len] = 0;
00893       } else {
00894          dest->str = (char *)malloc( sizeof(char));
00895          dest->str[0] = 0;
00896       }
00897       break;
00898    case MISDN_CTYPE_INT:
00899    {
00900       char *pat;
00901       if (strchr(value,'x')) 
00902          pat="%x";
00903       else
00904          pat="%d";
00905       if (sscanf(value, pat, &tmp)) {
00906          dest->num = (int *)malloc(sizeof(int));
00907          memcpy(dest->num, &tmp, sizeof(int));
00908       } else
00909          re = -1;
00910    }
00911       break;
00912    case MISDN_CTYPE_BOOL:
00913       dest->num = (int *)malloc(sizeof(int));
00914       *(dest->num) = (ast_true(value) ? 1 : 0);
00915       break;
00916    case MISDN_CTYPE_BOOLINT:
00917       dest->num = (int *)malloc(sizeof(int));
00918       if (sscanf(value, "%d", &tmp)) {
00919          memcpy(dest->num, &tmp, sizeof(int));
00920       } else {
00921          *(dest->num) = (ast_true(value) ? boolint_def : 0);
00922       }
00923       break;
00924    case MISDN_CTYPE_MSNLIST:
00925       for (valtmp = strsep(&value, ","); valtmp; valtmp = strsep(&value, ",")) {
00926          if ((len = strlen(valtmp))) {
00927             struct msn_list *ml = (struct msn_list *)malloc(sizeof(struct msn_list));
00928             ml->msn = (char *)calloc(len+1, sizeof(char));
00929             strncpy(ml->msn, valtmp, len);
00930             ml->next = dest->ml;
00931             dest->ml = ml;
00932          }
00933       }
00934       break;
00935    case MISDN_CTYPE_ASTGROUP:
00936       dest->grp = (ast_group_t *)malloc(sizeof(ast_group_t));
00937       *(dest->grp) = ast_get_group(value);
00938       break;
00939    }
00940 
00941    return re;
00942 }

static int get_cfg_position ( char *  name,
int  type 
) [static]

Definition at line 442 of file misdn_config.c.

References GEN_CFG, gen_spec, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, PORT_CFG, and port_spec.

Referenced by _build_general_config(), _build_port_config(), and misdn_cfg_get_elem().

00443 {
00444    int i;
00445 
00446    switch (type) {
00447    case PORT_CFG:
00448       for (i = 0; i < NUM_PORT_ELEMENTS; ++i) {
00449          if (!strcasecmp(name, port_spec[i].name))
00450             return i;
00451       }
00452       break;
00453    case GEN_CFG:
00454       for (i = 0; i < NUM_GEN_ELEMENTS; ++i) {
00455          if (!strcasecmp(name, gen_spec[i].name))
00456             return i;
00457       }
00458    }
00459 
00460    return -1;
00461 }

void misdn_cfg_destroy ( void   ) 

Definition at line 1094 of file misdn_config.c.

References _free_general_cfg(), _free_port_cfg(), ast_mutex_destroy(), config_mutex, free, general_cfg, map, misdn_cfg_lock(), misdn_cfg_unlock(), port_cfg, and ptp.

Referenced by unload_module().

01095 {
01096    misdn_cfg_lock();
01097 
01098    _free_port_cfg();
01099    _free_general_cfg();
01100 
01101    free(port_cfg);
01102    free(general_cfg);
01103    free(ptp);
01104    free(map);
01105 
01106    misdn_cfg_unlock();
01107    ast_mutex_destroy(&config_mutex);
01108 }

void misdn_cfg_get ( int  port,
enum misdn_cfg_elements  elem,
void *  buf,
int  bufsize 
)

Definition at line 524 of file misdn_config.c.

References misdn_cfg_pt::any, ast_log(), gen_spec, general_cfg, LOG_WARNING, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_STR, port_cfg, port_spec, misdn_cfg_pt::str, and type.

Referenced by add_in_calls(), add_out_calls(), cb_events(), dialtone_indicate(), load_module(), misdn_bridge(), misdn_call(), misdn_cfg_update_ptp(), misdn_check_l2l1(), misdn_new(), misdn_request(), misdn_set_opt_exec(), process_ast_dsp(), read_config(), reload_config(), update_config(), and update_ec_config().

00525 {
00526    int place;
00527 
00528    if ((elem < MISDN_CFG_LAST) && !misdn_cfg_is_port_valid(port)) {
00529       memset(buf, 0, bufsize);
00530       ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get! Port number %d is not valid.\n", port);
00531       return;
00532    }
00533 
00534    misdn_cfg_lock();
00535    if (elem == MISDN_CFG_PTP) {
00536       if (!memcpy(buf, &ptp[port], (bufsize > ptp[port]) ? sizeof(ptp[port]) : bufsize))
00537          memset(buf, 0, bufsize);
00538    } else {
00539       if ((place = map[elem]) < 0) {
00540          memset (buf, 0, bufsize);
00541          ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get! Invalid element (%d) requested.\n", elem);
00542       } else {
00543          if (elem < MISDN_CFG_LAST) {
00544             switch (port_spec[place].type) {
00545             case MISDN_CTYPE_STR:
00546                if (port_cfg[port][place].str) {
00547                   if (!memccpy(buf, port_cfg[port][place].str, 0, bufsize))
00548                      memset(buf, 0, 1);
00549                } else if (port_cfg[0][place].str) {
00550                   if (!memccpy(buf, port_cfg[0][place].str, 0, bufsize))
00551                      memset(buf, 0, 1);
00552                } else
00553                   memset(buf, 0, bufsize);
00554                break;
00555             default:
00556                if (port_cfg[port][place].any)
00557                   memcpy(buf, port_cfg[port][place].any, bufsize);
00558                else if (port_cfg[0][place].any)
00559                   memcpy(buf, port_cfg[0][place].any, bufsize);
00560                else
00561                   memset(buf, 0, bufsize);
00562             }
00563          } else {
00564             switch (gen_spec[place].type) {
00565             case MISDN_CTYPE_STR:
00566                if (!general_cfg[place].str || !memccpy(buf, general_cfg[place].str, 0, bufsize))
00567                   memset(buf, 0, 1);
00568                break;
00569             default:
00570                if (general_cfg[place].any)
00571                   memcpy(buf, general_cfg[place].any, bufsize);
00572                else
00573                   memset(buf, 0, bufsize);
00574             }
00575          }
00576       }
00577    }
00578    misdn_cfg_unlock();
00579 }

void misdn_cfg_get_config_string ( int  port,
enum misdn_cfg_elements  elem,
char *  buf,
int  bufsize 
)

Definition at line 755 of file misdn_config.c.

References ast_log(), ast_print_group(), BUFFERSIZE, gen_spec, general_cfg, LOG_WARNING, map, MISDN_CFG_FIRST, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_ASTGROUP, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT, MISDN_CTYPE_INT, MISDN_CTYPE_MSNLIST, MISDN_CTYPE_STR, MISDN_GEN_FIRST, MISDN_GEN_LAST, misdn_cfg_pt::ml, msn_list::msn, name, msn_list::next, port_cfg, port_spec, ptp, and type.

Referenced by misdn_show_config().

00756 {
00757    int place;
00758    char tempbuf[BUFFERSIZE] = "";
00759    struct msn_list *iter;
00760 
00761    if ((elem < MISDN_CFG_LAST) && !misdn_cfg_is_port_valid(port)) {
00762       *buf = 0;
00763       ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get_config_string! Port number %d is not valid.\n", port);
00764       return;
00765    }
00766 
00767    place = map[elem];
00768 
00769    misdn_cfg_lock();
00770    if (elem == MISDN_CFG_PTP) {
00771       snprintf(buf, bufsize, " -> ptp: %s", ptp[port] ? "yes" : "no");
00772    }
00773    else if (elem > MISDN_CFG_FIRST && elem < MISDN_CFG_LAST) {
00774       switch (port_spec[place].type) {
00775       case MISDN_CTYPE_INT:
00776       case MISDN_CTYPE_BOOLINT:
00777          if (port_cfg[port][place].num)
00778             snprintf(buf, bufsize, " -> %s: %d", port_spec[place].name, *port_cfg[port][place].num);
00779          else if (port_cfg[0][place].num)
00780             snprintf(buf, bufsize, " -> %s: %d", port_spec[place].name, *port_cfg[0][place].num);
00781          else
00782             snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
00783          break;
00784       case MISDN_CTYPE_BOOL:
00785          if (port_cfg[port][place].num)
00786             snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, *port_cfg[port][place].num ? "yes" : "no");
00787          else if (port_cfg[0][place].num)
00788             snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, *port_cfg[0][place].num ? "yes" : "no");
00789          else
00790             snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
00791          break;
00792       case MISDN_CTYPE_ASTGROUP:
00793          if (port_cfg[port][place].grp)
00794             snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, 
00795                    ast_print_group(tempbuf, sizeof(tempbuf), *port_cfg[port][place].grp));
00796          else if (port_cfg[0][place].grp)
00797             snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, 
00798                    ast_print_group(tempbuf, sizeof(tempbuf), *port_cfg[0][place].grp));
00799          else
00800             snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
00801          break;
00802       case MISDN_CTYPE_MSNLIST:
00803          if (port_cfg[port][place].ml)
00804             iter = port_cfg[port][place].ml;
00805          else
00806             iter = port_cfg[0][place].ml;
00807          if (iter) {
00808             for (; iter; iter = iter->next) {
00809                strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1);
00810             }
00811             tempbuf[strlen(tempbuf)-2] = 0;
00812          }
00813          snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none");
00814          break;
00815       case MISDN_CTYPE_STR:
00816          if ( port_cfg[port][place].str) {
00817             snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, port_cfg[port][place].str);
00818          } else if (port_cfg[0][place].str) {
00819             snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, port_cfg[0][place].str);
00820          } else {
00821             snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
00822          }
00823          break;
00824       }
00825    } else if (elem > MISDN_GEN_FIRST && elem < MISDN_GEN_LAST) {
00826       switch (gen_spec[place].type) {
00827       case MISDN_CTYPE_INT:
00828       case MISDN_CTYPE_BOOLINT:
00829          if (general_cfg[place].num)
00830             snprintf(buf, bufsize, " -> %s: %d", gen_spec[place].name, *general_cfg[place].num);
00831          else
00832             snprintf(buf, bufsize, " -> %s:", gen_spec[place].name);
00833          break;
00834       case MISDN_CTYPE_BOOL:
00835          if (general_cfg[place].num)
00836             snprintf(buf, bufsize, " -> %s: %s", gen_spec[place].name, *general_cfg[place].num ? "yes" : "no");
00837          else
00838             snprintf(buf, bufsize, " -> %s:", gen_spec[place].name);
00839          break;
00840       case MISDN_CTYPE_STR:
00841          if ( general_cfg[place].str) {
00842             snprintf(buf, bufsize, " -> %s: %s", gen_spec[place].name, general_cfg[place].str);
00843          } else {
00844             snprintf(buf, bufsize, " -> %s:", gen_spec[place].name);
00845          }
00846          break;
00847       default:
00848          snprintf(buf, bufsize, " -> type of %s not handled yet", gen_spec[place].name);
00849          break;
00850       }
00851    } else {
00852       *buf = 0;
00853       ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get_config_string! Invalid config element (%d) requested.\n", elem);
00854    }
00855    misdn_cfg_unlock();
00856 }

void misdn_cfg_get_desc ( enum misdn_cfg_elements  elem,
void *  buf,
int  bufsize,
void *  buf_default,
int  bufsize_default 
)

Definition at line 629 of file misdn_config.c.

References misdn_cfg_spec::def, desc, gen_spec, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_GEN_FIRST, MISDN_GEN_LAST, NO_DEFAULT, and port_spec.

Referenced by show_config_description().

00630 {
00631    int place = map[elem];
00632    struct misdn_cfg_spec *spec = NULL;
00633 
00634    /* here comes a hack to replace the (not existing) "name" element with the "ports" element */
00635    if (elem == MISDN_CFG_GROUPNAME) {
00636       if (!memccpy(buf, ports_description, 0, bufsize))
00637          memset(buf, 0, 1);
00638       if (buf_default && bufsize_default)
00639          memset(buf_default, 0, 1);
00640       return;
00641    }
00642 
00643    if ((elem > MISDN_CFG_FIRST) && (elem < MISDN_CFG_LAST))
00644       spec = (struct misdn_cfg_spec *)port_spec;
00645    else if ((elem > MISDN_GEN_FIRST) && (elem < MISDN_GEN_LAST))
00646       spec = (struct misdn_cfg_spec *)gen_spec;
00647       
00648    if (!spec || !spec[place].desc)
00649       memset(buf, 0, 1);
00650    else {
00651       if (!memccpy(buf, spec[place].desc, 0, bufsize))
00652          memset(buf, 0, 1);
00653       if (buf_default && bufsize) {
00654          if (!strcmp(spec[place].def, NO_DEFAULT))
00655             memset(buf_default, 0, 1);
00656          else if (!memccpy(buf_default, spec[place].def, 0, bufsize_default))
00657             memset(buf_default, 0, 1);
00658       }
00659    }
00660 }

enum misdn_cfg_elements misdn_cfg_get_elem ( char *  name  ) 

Definition at line 581 of file misdn_config.c.

References misdn_cfg_spec::elem, GEN_CFG, gen_spec, get_cfg_position(), MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, PORT_CFG, and port_spec.

Referenced by misdn_show_config().

00582 {
00583    int pos;
00584 
00585    /* here comes a hack to replace the (not existing) "name" element with the "ports" element */
00586    if (!strcmp(name, "ports"))
00587       return MISDN_CFG_GROUPNAME;
00588    if (!strcmp(name, "name"))
00589       return MISDN_CFG_FIRST;
00590 
00591    pos = get_cfg_position (name, PORT_CFG);
00592    if (pos >= 0)
00593       return port_spec[pos].elem;
00594    
00595    pos = get_cfg_position (name, GEN_CFG);
00596    if (pos >= 0)
00597       return gen_spec[pos].elem;
00598    
00599    return MISDN_CFG_FIRST;
00600 }

void misdn_cfg_get_name ( enum misdn_cfg_elements  elem,
void *  buf,
int  bufsize 
)

Definition at line 602 of file misdn_config.c.

References gen_spec, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_CFG_PTP, MISDN_GEN_FIRST, MISDN_GEN_LAST, name, and port_spec.

Referenced by complete_show_config(), and show_config_description().

00603 {
00604    struct misdn_cfg_spec *spec = NULL;
00605    int place = map[elem];
00606 
00607    /* the ptp hack */
00608    if (elem == MISDN_CFG_PTP) {
00609       memset(buf, 0, 1);
00610       return;
00611    }
00612    
00613    /* here comes a hack to replace the (not existing) "name" element with the "ports" element */
00614    if (elem == MISDN_CFG_GROUPNAME) {
00615       if (!snprintf(buf, bufsize, "ports"))
00616          memset(buf, 0, 1);
00617       return;
00618    }
00619    
00620    if ((elem > MISDN_CFG_FIRST) && (elem < MISDN_CFG_LAST))
00621       spec = (struct misdn_cfg_spec *)port_spec;
00622    else if ((elem > MISDN_GEN_FIRST) && (elem < MISDN_GEN_LAST))
00623       spec = (struct misdn_cfg_spec *)gen_spec;
00624 
00625    if (!spec || !memccpy(buf, spec[place].name, 0, bufsize))
00626       memset(buf, 0, 1);
00627 }

int misdn_cfg_get_next_port ( int  port  ) 

Definition at line 858 of file misdn_config.c.

References map, max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), and port_cfg.

Referenced by complete_show_config(), load_module(), misdn_cfg_get_next_port_spin(), misdn_check_l2l1(), misdn_new(), misdn_request(), misdn_show_config(), misdn_show_ports_stats(), misdn_show_stacks(), and update_name().

00859 {
00860    int p = -1;
00861    int gn = map[MISDN_CFG_GROUPNAME];
00862    
00863    misdn_cfg_lock();
00864    for (port++; port <= max_ports; port++) {
00865       if (port_cfg[port][gn].str) {
00866          p = port;
00867          break;
00868       }
00869    }
00870    misdn_cfg_unlock();
00871 
00872    return p;
00873 }

int misdn_cfg_get_next_port_spin ( int  port  ) 

Definition at line 875 of file misdn_config.c.

References misdn_cfg_get_next_port().

Referenced by misdn_request().

00876 {
00877    int p = misdn_cfg_get_next_port(port);
00878    return (p > 0) ? p : misdn_cfg_get_next_port(0);
00879 }

void misdn_cfg_get_ports_string ( char *  ports  ) 

Generate a comma separated list of all active ports.

Definition at line 729 of file misdn_config.c.

References map, max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), port_cfg, and ptp.

Referenced by load_module().

00730 {
00731    char tmp[16];
00732    int l, i;
00733    int gn = map[MISDN_CFG_GROUPNAME];
00734 
00735    *ports = 0;
00736 
00737    misdn_cfg_lock();
00738    for (i = 1; i <= max_ports; i++) {
00739       if (port_cfg[i][gn].str) {
00740          if (ptp[i])
00741             sprintf(tmp, "%dptp,", i);
00742          else
00743             sprintf(tmp, "%d,", i);
00744          strcat(ports, tmp);
00745       }
00746    }
00747    misdn_cfg_unlock();
00748 
00749    if ((l = strlen(ports))) {
00750       /* Strip trailing ',' */
00751       ports[l-1] = 0;
00752    }
00753 }

int misdn_cfg_init ( int  this_max_ports  ) 

Definition at line 1110 of file misdn_config.c.

References _build_general_config(), _build_port_config(), _enum_array_map(), _fill_defaults(), _free_general_cfg(), _free_port_cfg(), ast_category_browse(), AST_DESTROY_CFG, AST_LOAD_CFG, ast_log(), ast_mutex_init(), ast_variable_browse(), calloc, config, config_mutex, default_jbconf, general_cfg, global_jbconf, LOG_WARNING, map, max_ports, misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_LAST, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, port_cfg, and ptp.

Referenced by load_module(), and misdn_cfg_reload().

01111 {
01112    char config[] = "misdn.conf";
01113    char *cat, *p;
01114    int i;
01115    struct ast_config *cfg;
01116    struct ast_variable *v;
01117 
01118    if (!(cfg = AST_LOAD_CFG(config))) {
01119       ast_log(LOG_WARNING, "missing file: misdn.conf\n");
01120       return -1;
01121    }
01122 
01123    ast_mutex_init(&config_mutex);
01124 
01125    /* Copy the default jb config over global_jbconf */
01126    memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
01127 
01128    misdn_cfg_lock();
01129 
01130    if (this_max_ports) {
01131       /* this is the first run */
01132       max_ports = this_max_ports;
01133       map = (int *)calloc(MISDN_GEN_LAST + 1, sizeof(int));
01134       if (_enum_array_map())
01135          return -1;
01136       p = (char *)calloc(1, (max_ports + 1) * sizeof(union misdn_cfg_pt *)
01137                      + (max_ports + 1) * NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt));
01138       port_cfg = (union misdn_cfg_pt **)p;
01139       p += (max_ports + 1) * sizeof(union misdn_cfg_pt *);
01140       for (i = 0; i <= max_ports; ++i) {
01141          port_cfg[i] = (union misdn_cfg_pt *)p;
01142          p += NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt);
01143       }
01144       general_cfg = (union misdn_cfg_pt *)calloc(1, sizeof(union misdn_cfg_pt *) * NUM_GEN_ELEMENTS);
01145       ptp = (int *)calloc(max_ports + 1, sizeof(int));
01146    }
01147    else {
01148       /* misdn reload */
01149       _free_port_cfg();
01150       _free_general_cfg();
01151       memset(port_cfg[0], 0, NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt) * (max_ports + 1));
01152       memset(general_cfg, 0, sizeof(union misdn_cfg_pt *) * NUM_GEN_ELEMENTS);
01153       memset(ptp, 0, sizeof(int) * (max_ports + 1));
01154    }
01155 
01156    cat = ast_category_browse(cfg, NULL);
01157 
01158    while(cat) {
01159       v = ast_variable_browse(cfg, cat);
01160       if (!strcasecmp(cat, "general")) {
01161          _build_general_config(v);
01162       } else {
01163          _build_port_config(v, cat);
01164       }
01165       cat = ast_category_browse(cfg, cat);
01166    }
01167 
01168    _fill_defaults();
01169 
01170    misdn_cfg_unlock();
01171    AST_DESTROY_CFG(cfg);
01172 
01173    return 0;
01174 }

int misdn_cfg_is_group_method ( char *  group,
enum misdn_cfg_method  meth 
)

Definition at line 694 of file misdn_config.c.

References map, max_ports, METHOD_ROUND_ROBIN, METHOD_STANDARD, METHOD_STANDARD_DEC, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), MISDN_CFG_METHOD, misdn_cfg_unlock(), port_cfg, and misdn_cfg_pt::str.

Referenced by misdn_request().

00695 {
00696    int i, re = 0;
00697    char *method ;
00698 
00699    misdn_cfg_lock();
00700 
00701    method = port_cfg[0][map[MISDN_CFG_METHOD]].str;
00702 
00703    for (i = 1; i <= max_ports; i++) {
00704       if (port_cfg[i] && port_cfg[i][map[MISDN_CFG_GROUPNAME]].str) {
00705          if (!strcasecmp(port_cfg[i][map[MISDN_CFG_GROUPNAME]].str, group))
00706             method = (port_cfg[i][map[MISDN_CFG_METHOD]].str ? 
00707                     port_cfg[i][map[MISDN_CFG_METHOD]].str : port_cfg[0][map[MISDN_CFG_METHOD]].str);
00708       }
00709    }
00710 
00711    if (method) {
00712       switch (meth) {
00713       case METHOD_STANDARD:      re = !strcasecmp(method, "standard");
00714                            break;
00715       case METHOD_ROUND_ROBIN:   re = !strcasecmp(method, "round_robin");
00716                            break;
00717       case METHOD_STANDARD_DEC:  re = !strcasecmp(method, "standard_dec");
00718                            break;
00719       }
00720    }
00721    misdn_cfg_unlock();
00722 
00723    return re;
00724 }

int misdn_cfg_is_msn_valid ( int  port,
char *  msn 
)

Definition at line 662 of file misdn_config.c.

References ast_extension_match(), ast_log(), LOG_WARNING, misdn_cfg_is_port_valid(), misdn_cfg_lock(), MISDN_CFG_MSNS, misdn_cfg_pt::ml, msn_list::msn, msn_list::next, and port_cfg.

Referenced by cb_events().

00663 {
00664    int re = 0;
00665    struct msn_list *iter;
00666 
00667    if (!misdn_cfg_is_port_valid(port)) {
00668       ast_log(LOG_WARNING, "Invalid call to misdn_cfg_is_msn_valid! Port number %d is not valid.\n", port);
00669       return 0;
00670    }
00671 
00672    misdn_cfg_lock();
00673    if (port_cfg[port][map[MISDN_CFG_MSNS]].ml)
00674       iter = port_cfg[port][map[MISDN_CFG_MSNS]].ml;
00675    else
00676       iter = port_cfg[0][map[MISDN_CFG_MSNS]].ml;
00677    for (; iter; iter = iter->next) 
00678       if (*(iter->msn) == '*' || ast_extension_match(iter->msn, msn)) {
00679          re = 1;
00680          break;
00681       }
00682    misdn_cfg_unlock();
00683 
00684    return re;
00685 }

int misdn_cfg_is_port_valid ( int  port  ) 

Definition at line 687 of file misdn_config.c.

References map, max_ports, MISDN_CFG_GROUPNAME, and port_cfg.

Referenced by misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_is_msn_valid(), misdn_cfg_update_ptp(), and misdn_show_config().

00688 {
00689    int gn = map[MISDN_CFG_GROUPNAME];
00690 
00691    return (port >= 1 && port <= max_ports && port_cfg[port][gn].str);
00692 }

static void misdn_cfg_lock ( void   )  [inline, static]

Definition at line 463 of file misdn_config.c.

References ast_mutex_lock().

Referenced by misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), misdn_cfg_is_msn_valid(), and misdn_cfg_update_ptp().

00464 {
00465    ast_mutex_lock(&config_mutex);
00466 }

void misdn_cfg_reload ( void   ) 

Definition at line 1089 of file misdn_config.c.

References misdn_cfg_init().

Referenced by reload_config().

01090 {
01091    misdn_cfg_init (0);
01092 }

static void misdn_cfg_unlock ( void   )  [inline, static]

Definition at line 468 of file misdn_config.c.

References ast_mutex_unlock().

Referenced by misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), and misdn_cfg_update_ptp().

00469 {
00470    ast_mutex_unlock(&config_mutex);
00471 }

void misdn_cfg_update_ptp ( void   ) 

Definition at line 1020 of file misdn_config.c.

References ast_log(), ast_strlen_zero(), BUFFERSIZE, errno, LOG_WARNING, max_ports, misdn_cfg_get(), misdn_cfg_is_port_valid(), misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_MISDN_INIT, and ptp.

Referenced by load_module(), and reload_config().

01021 {
01022 #ifndef MISDN_1_2
01023    char misdn_init[BUFFERSIZE];
01024    char line[BUFFERSIZE];
01025    FILE *fp;
01026    char *tok, *p, *end;
01027    int port;
01028 
01029    misdn_cfg_get(0, MISDN_GEN_MISDN_INIT, &misdn_init, sizeof(misdn_init));
01030 
01031    if (!ast_strlen_zero(misdn_init)) {
01032       fp = fopen(misdn_init, "r");
01033       if (fp) {
01034          while(fgets(line, sizeof(line), fp)) {
01035             if (!strncmp(line, "nt_ptp", 6)) {
01036                for (tok = strtok_r(line,",=", &p);
01037                    tok;
01038                    tok = strtok_r(NULL,",=", &p)) {
01039                   port = strtol(tok, &end, 10);
01040                   if (end != tok && misdn_cfg_is_port_valid(port)) {
01041                      misdn_cfg_lock();
01042                      ptp[port] = 1;
01043                      misdn_cfg_unlock();
01044                   }
01045                }
01046             }
01047          }
01048          fclose(fp);
01049       } else {
01050          ast_log(LOG_WARNING,"Couldn't open %s: %s\n", misdn_init, strerror(errno));
01051       }
01052    }
01053 #else
01054    int i;
01055    int proto;
01056    char filename[128];
01057    FILE *fp;
01058 
01059    for (i = 1; i <= max_ports; ++i) {
01060       snprintf(filename, sizeof(filename), "/sys/class/mISDN-stacks/st-%08x/protocol", i << 8);
01061       fp = fopen(filename, "r");
01062       if (!fp) {
01063          ast_log(LOG_WARNING, "Could not open %s: %s\n", filename, strerror(errno));
01064          continue;
01065       }
01066       if (fscanf(fp, "0x%08x", &proto) != 1)
01067          ast_log(LOG_WARNING, "Could not parse contents of %s!\n", filename);
01068       else
01069          ptp[i] = proto & 1<<5 ? 1 : 0;
01070       fclose(fp);
01071    }
01072 #endif
01073 }

struct ast_jb_conf* misdn_get_global_jbconf ( void   ) 

Definition at line 1176 of file misdn_config.c.

References global_jbconf.

Referenced by misdn_new().

01176                                               {
01177    return &global_jbconf;
01178 }


Variable Documentation

ast_mutex_t config_mutex [static]

Definition at line 398 of file misdn_config.c.

Referenced by misdn_cfg_destroy(), and misdn_cfg_init().

struct ast_jb_conf default_jbconf [static]

Global jitterbuffer configuration - by default, jb is disabled

Definition at line 60 of file misdn_config.c.

struct misdn_cfg_spec gen_spec[] [static]

Definition at line 349 of file misdn_config.c.

Referenced by _build_general_config(), _enum_array_map(), _fill_defaults(), get_cfg_position(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_desc(), misdn_cfg_get_elem(), and misdn_cfg_get_name().

union misdn_cfg_pt* general_cfg [static]

Definition at line 392 of file misdn_config.c.

Referenced by _build_general_config(), _fill_defaults(), _free_general_cfg(), misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), and misdn_cfg_init().

struct ast_jb_conf global_jbconf [static]

Definition at line 68 of file misdn_config.c.

int* map [static]

Definition at line 396 of file misdn_config.c.

Referenced by append_mapping(), build_mapping(), build_translators(), clear_config_maps(), config_command(), destroy_map(), dundi_lookup_local(), dundi_show_mappings(), find_engine(), find_transcoders(), mark_mappings(), misdn_cfg_destroy(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), misdn_cfg_is_port_valid(), and prune_mappings().

int max_ports [static]

Definition at line 390 of file misdn_config.c.

union misdn_cfg_pt** port_cfg [static]

Definition at line 388 of file misdn_config.c.

Referenced by _fill_defaults(), _free_port_cfg(), misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), misdn_cfg_is_msn_valid(), and misdn_cfg_is_port_valid().

struct misdn_cfg_spec port_spec[] [static]

Definition at line 105 of file misdn_config.c.

Referenced by _build_port_config(), _enum_array_map(), _fill_defaults(), _free_port_cfg(), get_cfg_position(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_desc(), misdn_cfg_get_elem(), and misdn_cfg_get_name().

const char ports_description[] [static]

Initial value:

   "Define your ports, e.g. 1,2 (depends on mISDN-driver loading order)."

Definition at line 102 of file misdn_config.c.

int* ptp [static]

Definition at line 394 of file misdn_config.c.

Referenced by _build_port_config(), misdn_cfg_destroy(), misdn_cfg_get_config_string(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_update_ptp(), and misdn_lib_init().


Generated on Wed Feb 11 12:00:26 2009 for Asterisk - the Open Source PBX by  doxygen 1.4.7