Wed Jan 8 2020 09:50:03

Asterisk developer's documentation


chan_misdn_config.h File Reference

Interface to mISDN - Config. More...

Go to the source code of this file.

Macros

#define BUFFERSIZE   512
 

Enumerations

enum  misdn_cfg_elements {
  MISDN_CFG_FIRST = 0, MISDN_CFG_GROUPNAME, MISDN_CFG_ALLOWED_BEARERS, MISDN_CFG_FAR_ALERTING,
  MISDN_CFG_RXGAIN, MISDN_CFG_TXGAIN, MISDN_CFG_TE_CHOOSE_CHANNEL, MISDN_CFG_PMP_L1_CHECK,
  MISDN_CFG_REJECT_CAUSE, MISDN_CFG_ALARM_BLOCK, MISDN_CFG_HDLC, MISDN_CFG_CONTEXT,
  MISDN_CFG_LANGUAGE, MISDN_CFG_MUSICCLASS, MISDN_CFG_CALLERID, MISDN_CFG_INCOMING_CALLERID_TAG,
  MISDN_CFG_APPEND_MSN_TO_CALLERID_TAG, MISDN_CFG_METHOD, MISDN_CFG_DIALPLAN, MISDN_CFG_LOCALDIALPLAN,
  MISDN_CFG_CPNDIALPLAN, MISDN_CFG_TON_PREFIX_UNKNOWN, MISDN_CFG_TON_PREFIX_INTERNATIONAL, MISDN_CFG_TON_PREFIX_NATIONAL,
  MISDN_CFG_TON_PREFIX_NETWORK_SPECIFIC, MISDN_CFG_TON_PREFIX_SUBSCRIBER, MISDN_CFG_TON_PREFIX_ABBREVIATED, MISDN_CFG_PRES,
  MISDN_CFG_SCREEN, MISDN_CFG_DISPLAY_CONNECTED, MISDN_CFG_DISPLAY_SETUP, MISDN_CFG_ALWAYS_IMMEDIATE,
  MISDN_CFG_NODIALTONE, MISDN_CFG_IMMEDIATE, MISDN_CFG_SENDDTMF, MISDN_CFG_ASTDTMF,
  MISDN_CFG_HOLD_ALLOWED, MISDN_CFG_EARLY_BCONNECT, MISDN_CFG_INCOMING_EARLY_AUDIO, MISDN_CFG_ECHOCANCEL,
  MISDN_CFG_CC_REQUEST_RETENTION, MISDN_CFG_OUTGOING_COLP, MISDN_CFG_NEED_MORE_INFOS, MISDN_CFG_NOAUTORESPOND_ON_SETUP,
  MISDN_CFG_NTTIMEOUT, MISDN_CFG_BRIDGING, MISDN_CFG_JITTERBUFFER, MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD,
  MISDN_CFG_CALLGROUP, MISDN_CFG_PICKUPGROUP, MISDN_CFG_MAX_IN, MISDN_CFG_MAX_OUT,
  MISDN_CFG_L1_TIMEOUT, MISDN_CFG_OVERLAP_DIAL, MISDN_CFG_MSNS, MISDN_CFG_FAXDETECT,
  MISDN_CFG_FAXDETECT_CONTEXT, MISDN_CFG_FAXDETECT_TIMEOUT, MISDN_CFG_PTP, MISDN_CFG_LAST,
  MISDN_GEN_FIRST, MISDN_GEN_MISDN_INIT, MISDN_GEN_DEBUG, MISDN_GEN_TRACEFILE,
  MISDN_GEN_BRIDGING, MISDN_GEN_STOP_TONE, MISDN_GEN_APPEND_DIGITS2EXTEN, MISDN_GEN_DYNAMIC_CRYPT,
  MISDN_GEN_CRYPT_PREFIX, MISDN_GEN_CRYPT_KEYS, MISDN_GEN_NTKEEPCALLS, MISDN_GEN_NTDEBUGFLAGS,
  MISDN_GEN_NTDEBUGFILE, MISDN_GEN_LAST
}
 
enum  misdn_cfg_method { METHOD_STANDARD = 0, METHOD_ROUND_ROBIN, METHOD_STANDARD_DEC }
 

Functions

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 (const 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. More...
 
int misdn_cfg_init (int max_ports, int reload)
 
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)
 
void misdn_cfg_reload (void)
 
void misdn_cfg_update_ptp (void)
 
struct ast_jb_confmisdn_get_global_jbconf (void)
 

Detailed Description

Interface to mISDN - Config.

Author
Christian Richter crich.nosp@m.@ber.nosp@m.onet..nosp@m.com

Definition in file chan_misdn_config.h.

Macro Definition Documentation

Enumeration Type Documentation

Enumerator
MISDN_CFG_FIRST 
MISDN_CFG_GROUPNAME 
MISDN_CFG_ALLOWED_BEARERS 
MISDN_CFG_FAR_ALERTING 
MISDN_CFG_RXGAIN 
MISDN_CFG_TXGAIN 
MISDN_CFG_TE_CHOOSE_CHANNEL 
MISDN_CFG_PMP_L1_CHECK 
MISDN_CFG_REJECT_CAUSE 
MISDN_CFG_ALARM_BLOCK 
MISDN_CFG_HDLC 
MISDN_CFG_CONTEXT 
MISDN_CFG_LANGUAGE 
MISDN_CFG_MUSICCLASS 
MISDN_CFG_CALLERID 
MISDN_CFG_INCOMING_CALLERID_TAG 
MISDN_CFG_APPEND_MSN_TO_CALLERID_TAG 
MISDN_CFG_METHOD 
MISDN_CFG_DIALPLAN 
MISDN_CFG_LOCALDIALPLAN 
MISDN_CFG_CPNDIALPLAN 
MISDN_CFG_TON_PREFIX_UNKNOWN 
MISDN_CFG_TON_PREFIX_INTERNATIONAL 
MISDN_CFG_TON_PREFIX_NATIONAL 
MISDN_CFG_TON_PREFIX_NETWORK_SPECIFIC 
MISDN_CFG_TON_PREFIX_SUBSCRIBER 
MISDN_CFG_TON_PREFIX_ABBREVIATED 
MISDN_CFG_PRES 
MISDN_CFG_SCREEN 
MISDN_CFG_DISPLAY_CONNECTED 
MISDN_CFG_DISPLAY_SETUP 
MISDN_CFG_ALWAYS_IMMEDIATE 
MISDN_CFG_NODIALTONE 
MISDN_CFG_IMMEDIATE 
MISDN_CFG_SENDDTMF 
MISDN_CFG_ASTDTMF 
MISDN_CFG_HOLD_ALLOWED 
MISDN_CFG_EARLY_BCONNECT 
MISDN_CFG_INCOMING_EARLY_AUDIO 
MISDN_CFG_ECHOCANCEL 
MISDN_CFG_CC_REQUEST_RETENTION 
MISDN_CFG_OUTGOING_COLP 
MISDN_CFG_NEED_MORE_INFOS 
MISDN_CFG_NOAUTORESPOND_ON_SETUP 
MISDN_CFG_NTTIMEOUT 
MISDN_CFG_BRIDGING 
MISDN_CFG_JITTERBUFFER 
MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD 
MISDN_CFG_CALLGROUP 
MISDN_CFG_PICKUPGROUP 
MISDN_CFG_MAX_IN 
MISDN_CFG_MAX_OUT 
MISDN_CFG_L1_TIMEOUT 
MISDN_CFG_OVERLAP_DIAL 
MISDN_CFG_MSNS 
MISDN_CFG_FAXDETECT 
MISDN_CFG_FAXDETECT_CONTEXT 
MISDN_CFG_FAXDETECT_TIMEOUT 
MISDN_CFG_PTP 
MISDN_CFG_LAST 
MISDN_GEN_FIRST 
MISDN_GEN_MISDN_INIT 
MISDN_GEN_DEBUG 
MISDN_GEN_TRACEFILE 
MISDN_GEN_BRIDGING 
MISDN_GEN_STOP_TONE 
MISDN_GEN_APPEND_DIGITS2EXTEN 
MISDN_GEN_DYNAMIC_CRYPT 
MISDN_GEN_CRYPT_PREFIX 
MISDN_GEN_CRYPT_KEYS 
MISDN_GEN_NTKEEPCALLS 
MISDN_GEN_NTDEBUGFLAGS 
MISDN_GEN_NTDEBUGFILE 
MISDN_GEN_LAST 

Definition at line 27 of file chan_misdn_config.h.

27  {
28 
29  /* port config items */
30  MISDN_CFG_FIRST = 0,
31  MISDN_CFG_GROUPNAME, /* char[] */
32  MISDN_CFG_ALLOWED_BEARERS, /* char[] */
33  MISDN_CFG_FAR_ALERTING, /* int (bool) */
34  MISDN_CFG_RXGAIN, /* int */
35  MISDN_CFG_TXGAIN, /* int */
36  MISDN_CFG_TE_CHOOSE_CHANNEL, /* int (bool) */
37  MISDN_CFG_PMP_L1_CHECK, /* int (bool) */
38  MISDN_CFG_REJECT_CAUSE, /* int */
39  MISDN_CFG_ALARM_BLOCK, /* int (bool) */
40  MISDN_CFG_HDLC, /* int (bool) */
41  MISDN_CFG_CONTEXT, /* char[] */
42  MISDN_CFG_LANGUAGE, /* char[] */
43  MISDN_CFG_MUSICCLASS, /* char[] */
44  MISDN_CFG_CALLERID, /* char[] */
46  MISDN_CFG_APPEND_MSN_TO_CALLERID_TAG, /* int (bool) */
47  MISDN_CFG_METHOD, /* char[] */
48  MISDN_CFG_DIALPLAN, /* int */
49  MISDN_CFG_LOCALDIALPLAN, /* int */
50  MISDN_CFG_CPNDIALPLAN, /* int */
51  MISDN_CFG_TON_PREFIX_UNKNOWN, /* char[] */
53  MISDN_CFG_TON_PREFIX_NATIONAL, /* char[] */
57  MISDN_CFG_PRES, /* int */
58  MISDN_CFG_SCREEN, /* int */
60  MISDN_CFG_DISPLAY_SETUP, /* int */
61  MISDN_CFG_ALWAYS_IMMEDIATE, /* int (bool) */
62  MISDN_CFG_NODIALTONE, /* int (bool) */
63  MISDN_CFG_IMMEDIATE, /* int (bool) */
64  MISDN_CFG_SENDDTMF, /* int (bool) */
65  MISDN_CFG_ASTDTMF, /* int (bool) */
66  MISDN_CFG_HOLD_ALLOWED, /* int (bool) */
67  MISDN_CFG_EARLY_BCONNECT, /* int (bool) */
68  MISDN_CFG_INCOMING_EARLY_AUDIO, /* int (bool) */
69  MISDN_CFG_ECHOCANCEL, /* int */
71  MISDN_CFG_OUTGOING_COLP, /* int */
72 #ifdef MISDN_1_2
73  MISDN_CFG_PIPELINE, /* char[] */
74 #endif
75 
76 #ifdef WITH_BEROEC
77  MISDN_CFG_BNECHOCANCEL,
78  MISDN_CFG_BNEC_ANTIHOWL,
79  MISDN_CFG_BNEC_NLP,
80  MISDN_CFG_BNEC_ZEROCOEFF,
81  MISDN_CFG_BNEC_TD,
82  MISDN_CFG_BNEC_ADAPT,
83 #endif
84  MISDN_CFG_NEED_MORE_INFOS, /* bool */
86  MISDN_CFG_NTTIMEOUT, /* bool */
87  MISDN_CFG_BRIDGING, /* bool */
88  MISDN_CFG_JITTERBUFFER, /* int */
90  MISDN_CFG_CALLGROUP, /* ast_group_t */
91  MISDN_CFG_PICKUPGROUP, /* ast_group_t */
92  MISDN_CFG_MAX_IN, /* int */
93  MISDN_CFG_MAX_OUT, /* int */
94  MISDN_CFG_L1_TIMEOUT, /* int */
95  MISDN_CFG_OVERLAP_DIAL, /* int (bool)*/
96  MISDN_CFG_MSNS, /* char[] */
97  MISDN_CFG_FAXDETECT, /* char[] */
98  MISDN_CFG_FAXDETECT_CONTEXT, /* char[] */
100  MISDN_CFG_PTP, /* int (bool) */
102 
103  /* general config items */
105 #ifndef MISDN_1_2
106  MISDN_GEN_MISDN_INIT, /* char[] */
107 #endif
108  MISDN_GEN_DEBUG, /* int */
109  MISDN_GEN_TRACEFILE, /* char[] */
110  MISDN_GEN_BRIDGING, /* int (bool) */
111  MISDN_GEN_STOP_TONE, /* int (bool) */
112  MISDN_GEN_APPEND_DIGITS2EXTEN, /* int (bool) */
113  MISDN_GEN_DYNAMIC_CRYPT, /* int (bool) */
114  MISDN_GEN_CRYPT_PREFIX, /* char[] */
115  MISDN_GEN_CRYPT_KEYS, /* char[] */
116  MISDN_GEN_NTKEEPCALLS, /* int (bool) */
117  MISDN_GEN_NTDEBUGFLAGS, /* int */
118  MISDN_GEN_NTDEBUGFILE, /* char[] */
120 };
Enumerator
METHOD_STANDARD 
METHOD_ROUND_ROBIN 
METHOD_STANDARD_DEC 

Definition at line 122 of file chan_misdn_config.h.

Function Documentation

void misdn_cfg_destroy ( void  )

Definition at line 1147 of file misdn_config.c.

References _free_general_cfg(), _free_port_cfg(), ast_free, ast_mutex_destroy, misdn_cfg_lock(), and misdn_cfg_unlock().

Referenced by unload_module().

1148 {
1149  misdn_cfg_lock();
1150 
1151  _free_port_cfg();
1153 
1154  ast_free(port_cfg);
1156  ast_free(ptp);
1157  ast_free(map);
1158 
1159  misdn_cfg_unlock();
1161 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
static void _free_port_cfg(void)
Definition: misdn_config.c:520
static union misdn_cfg_pt * general_cfg
Definition: misdn_config.c:430
#define ast_free(a)
Definition: astmm.h:97
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
static void _free_general_cfg(void)
Definition: misdn_config.c:553
static int * ptp
Definition: misdn_config.c:432
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
#define ast_mutex_destroy(a)
Definition: lock.h:154
static ast_mutex_t config_mutex
Definition: misdn_config.c:436
void misdn_cfg_get ( int  port,
enum misdn_cfg_elements  elem,
void *  buf,
int  bufsize 
)

Definition at line 562 of file misdn_config.c.

References misdn_cfg_pt::any, ast_copy_string(), ast_log(), LOG_WARNING, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_STR, S_OR, str, and type.

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

563 {
564  int place;
565 
566  if ((elem < MISDN_CFG_LAST) && !misdn_cfg_is_port_valid(port)) {
567  memset(buf, 0, bufsize);
568  ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get! Port number %d is not valid.\n", port);
569  return;
570  }
571 
572  misdn_cfg_lock();
573  if (elem == MISDN_CFG_PTP) {
574  if (!memcpy(buf, &ptp[port], (bufsize > ptp[port]) ? sizeof(ptp[port]) : bufsize))
575  memset(buf, 0, bufsize);
576  } else {
577  if ((place = map[elem]) < 0) {
578  memset(buf, 0, bufsize);
579  ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get! Invalid element (%d) requested.\n", elem);
580  } else {
581  if (elem < MISDN_CFG_LAST) {
582  switch (port_spec[place].type) {
583  case MISDN_CTYPE_STR:
584  if (port_cfg[port][place].str) {
585  ast_copy_string(buf, port_cfg[port][place].str, bufsize);
586  } else if (port_cfg[0][place].str) {
587  ast_copy_string(buf, port_cfg[0][place].str, bufsize);
588  } else
589  memset(buf, 0, bufsize);
590  break;
591  default:
592  if (port_cfg[port][place].any)
593  memcpy(buf, port_cfg[port][place].any, bufsize);
594  else if (port_cfg[0][place].any)
595  memcpy(buf, port_cfg[0][place].any, bufsize);
596  else
597  memset(buf, 0, bufsize);
598  }
599  } else {
600  switch (gen_spec[place].type) {
601  case MISDN_CTYPE_STR:
602  ast_copy_string(buf, S_OR(general_cfg[place].str, ""), bufsize);
603  break;
604  default:
605  if (general_cfg[place].any)
606  memcpy(buf, general_cfg[place].any, bufsize);
607  else
608  memset(buf, 0, bufsize);
609  }
610  }
611  }
612  }
614 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
#define LOG_WARNING
Definition: logger.h:144
static struct misdn_cfg_spec port_spec[]
Definition: misdn_config.c:102
const char * str
Definition: app_jack.c:144
static union misdn_cfg_pt * general_cfg
Definition: misdn_config.c:430
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
int port
Logical Layer 1 port associated with this B channel.
Definition: isdn_lib.h:370
static struct misdn_cfg_spec gen_spec[]
Definition: misdn_config.c:387
static const char type[]
Definition: chan_nbs.c:57
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:223
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Definition: strings.h:77
static int * ptp
Definition: misdn_config.c:432
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_is_port_valid(int port)
Definition: misdn_config.c:719
void misdn_cfg_get_config_string ( int  port,
enum misdn_cfg_elements  elem,
char *  buf,
int  bufsize 
)

Definition at line 787 of file misdn_config.c.

References ast_log(), ast_print_group(), BUFFERSIZE, LOG_WARNING, 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, str, and type.

Referenced by handle_cli_misdn_show_config().

788 {
789  int place;
790  char tempbuf[BUFFERSIZE] = "";
791  struct msn_list *iter;
792 
793  if ((elem < MISDN_CFG_LAST) && !misdn_cfg_is_port_valid(port)) {
794  *buf = 0;
795  ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get_config_string! Port number %d is not valid.\n", port);
796  return;
797  }
798 
799  place = map[elem];
800 
801  misdn_cfg_lock();
802  if (elem == MISDN_CFG_PTP) {
803  snprintf(buf, bufsize, " -> ptp: %s", ptp[port] ? "yes" : "no");
804  }
805  else if (elem > MISDN_CFG_FIRST && elem < MISDN_CFG_LAST) {
806  switch (port_spec[place].type) {
807  case MISDN_CTYPE_INT:
808  case MISDN_CTYPE_BOOLINT:
809  if (port_cfg[port][place].num)
810  snprintf(buf, bufsize, " -> %s: %d", port_spec[place].name, *port_cfg[port][place].num);
811  else if (port_cfg[0][place].num)
812  snprintf(buf, bufsize, " -> %s: %d", port_spec[place].name, *port_cfg[0][place].num);
813  else
814  snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
815  break;
816  case MISDN_CTYPE_BOOL:
817  if (port_cfg[port][place].num)
818  snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, *port_cfg[port][place].num ? "yes" : "no");
819  else if (port_cfg[0][place].num)
820  snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, *port_cfg[0][place].num ? "yes" : "no");
821  else
822  snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
823  break;
825  if (port_cfg[port][place].grp)
826  snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name,
827  ast_print_group(tempbuf, sizeof(tempbuf), *port_cfg[port][place].grp));
828  else if (port_cfg[0][place].grp)
829  snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name,
830  ast_print_group(tempbuf, sizeof(tempbuf), *port_cfg[0][place].grp));
831  else
832  snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
833  break;
834  case MISDN_CTYPE_MSNLIST:
835  if (port_cfg[port][place].ml)
836  iter = port_cfg[port][place].ml;
837  else
838  iter = port_cfg[0][place].ml;
839  if (iter) {
840  for (; iter; iter = iter->next) {
841  strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1);
842  }
843  if (strlen(tempbuf) > 1) {
844  tempbuf[strlen(tempbuf)-2] = 0;
845  }
846  }
847  snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none");
848  break;
849  case MISDN_CTYPE_STR:
850  if ( port_cfg[port][place].str) {
851  snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, port_cfg[port][place].str);
852  } else if (port_cfg[0][place].str) {
853  snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, port_cfg[0][place].str);
854  } else {
855  snprintf(buf, bufsize, " -> %s:", port_spec[place].name);
856  }
857  break;
858  }
859  } else if (elem > MISDN_GEN_FIRST && elem < MISDN_GEN_LAST) {
860  switch (gen_spec[place].type) {
861  case MISDN_CTYPE_INT:
862  case MISDN_CTYPE_BOOLINT:
863  if (general_cfg[place].num)
864  snprintf(buf, bufsize, " -> %s: %d", gen_spec[place].name, *general_cfg[place].num);
865  else
866  snprintf(buf, bufsize, " -> %s:", gen_spec[place].name);
867  break;
868  case MISDN_CTYPE_BOOL:
869  if (general_cfg[place].num)
870  snprintf(buf, bufsize, " -> %s: %s", gen_spec[place].name, *general_cfg[place].num ? "yes" : "no");
871  else
872  snprintf(buf, bufsize, " -> %s:", gen_spec[place].name);
873  break;
874  case MISDN_CTYPE_STR:
875  if ( general_cfg[place].str) {
876  snprintf(buf, bufsize, " -> %s: %s", gen_spec[place].name, general_cfg[place].str);
877  } else {
878  snprintf(buf, bufsize, " -> %s:", gen_spec[place].name);
879  }
880  break;
881  default:
882  snprintf(buf, bufsize, " -> type of %s not handled yet", gen_spec[place].name);
883  break;
884  }
885  } else {
886  *buf = 0;
887  ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get_config_string! Invalid config element (%d) requested.\n", elem);
888  }
890 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
#define LOG_WARNING
Definition: logger.h:144
static struct misdn_cfg_spec port_spec[]
Definition: misdn_config.c:102
const char * str
Definition: app_jack.c:144
struct msn_list * next
Definition: misdn_config.c:78
char * ast_print_group(char *buf, int buflen, ast_group_t group)
print call- and pickup groups into buffer
Definition: channel.c:8236
#define BUFFERSIZE
char * msn
Definition: misdn_config.c:77
static union misdn_cfg_pt * general_cfg
Definition: misdn_config.c:430
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
static struct misdn_cfg_spec gen_spec[]
Definition: misdn_config.c:387
static const char name[]
static const char type[]
Definition: chan_nbs.c:57
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
struct msn_list * ml
Definition: misdn_config.c:84
static int * ptp
Definition: misdn_config.c:432
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_is_port_valid(int port)
Definition: misdn_config.c:719
void misdn_cfg_get_desc ( enum misdn_cfg_elements  elem,
void *  buf,
int  bufsize,
void *  buf_default,
int  bufsize_default 
)

Definition at line 663 of file misdn_config.c.

References ast_copy_string(), misdn_cfg_spec::def, desc, misdn_cfg_spec::elem, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_GEN_FIRST, MISDN_GEN_LAST, and NO_DEFAULT.

Referenced by show_config_description().

664 {
665  int place = map[elem];
666  struct misdn_cfg_spec *spec = NULL;
667 
668  /* here comes a hack to replace the (not existing) "name" element with the "ports" element */
669  if (elem == MISDN_CFG_GROUPNAME) {
670  ast_copy_string(buf, ports_description, bufsize);
671  if (buf_default && bufsize_default)
672  memset(buf_default, 0, 1);
673  return;
674  }
675 
676  if ((elem > MISDN_CFG_FIRST) && (elem < MISDN_CFG_LAST))
677  spec = (struct misdn_cfg_spec *)port_spec;
678  else if ((elem > MISDN_GEN_FIRST) && (elem < MISDN_GEN_LAST))
679  spec = (struct misdn_cfg_spec *)gen_spec;
680 
681  if (!spec || !spec[place].desc)
682  memset(buf, 0, 1);
683  else {
684  ast_copy_string(buf, spec[place].desc, bufsize);
685  if (buf_default && bufsize) {
686  if (!strcmp(spec[place].def, NO_DEFAULT))
687  memset(buf_default, 0, 1);
688  else
689  ast_copy_string(buf_default, spec[place].def, bufsize_default);
690  }
691  }
692 }
static int * map
Definition: misdn_config.c:434
static struct misdn_cfg_spec port_spec[]
Definition: misdn_config.c:102
static const char desc[]
Definition: cdr_radius.c:85
enum misdn_cfg_elements elem
Definition: misdn_config.c:91
char def[BUFFERSIZE]
Definition: misdn_config.c:93
static struct misdn_cfg_spec gen_spec[]
Definition: misdn_config.c:387
static const char ports_description[]
Definition: misdn_config.c:99
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:223
#define NO_DEFAULT
Definition: misdn_config.c:46
enum misdn_cfg_elements misdn_cfg_get_elem ( const char *  name)

Definition at line 616 of file misdn_config.c.

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

Referenced by handle_cli_misdn_show_config().

617 {
618  int pos;
619 
620  /* here comes a hack to replace the (not existing) "name" element with the "ports" element */
621  if (!strcmp(name, "ports"))
622  return MISDN_CFG_GROUPNAME;
623  if (!strcmp(name, "name"))
624  return MISDN_CFG_FIRST;
625 
627  if (pos >= 0)
628  return port_spec[pos].elem;
629 
630  pos = get_cfg_position(name, GEN_CFG);
631  if (pos >= 0)
632  return gen_spec[pos].elem;
633 
634  return MISDN_CFG_FIRST;
635 }
#define PORT_CFG
Definition: misdn_config.c:50
static struct misdn_cfg_spec port_spec[]
Definition: misdn_config.c:102
static int get_cfg_position(const char *name, int type)
Definition: misdn_config.c:480
enum misdn_cfg_elements elem
Definition: misdn_config.c:91
static struct misdn_cfg_spec gen_spec[]
Definition: misdn_config.c:387
static const char name[]
#define GEN_CFG
Definition: misdn_config.c:49
void misdn_cfg_get_name ( enum misdn_cfg_elements  elem,
void *  buf,
int  bufsize 
)

Definition at line 637 of file misdn_config.c.

References ast_copy_string(), misdn_cfg_spec::elem, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_CFG_PTP, MISDN_GEN_FIRST, MISDN_GEN_LAST, and name.

Referenced by complete_show_config(), and show_config_description().

638 {
639  struct misdn_cfg_spec *spec = NULL;
640  int place = map[elem];
641 
642  /* the ptp hack */
643  if (elem == MISDN_CFG_PTP) {
644  memset(buf, 0, 1);
645  return;
646  }
647 
648  /* here comes a hack to replace the (not existing) "name" element with the "ports" element */
649  if (elem == MISDN_CFG_GROUPNAME) {
650  if (!snprintf(buf, bufsize, "ports"))
651  memset(buf, 0, 1);
652  return;
653  }
654 
655  if ((elem > MISDN_CFG_FIRST) && (elem < MISDN_CFG_LAST))
656  spec = (struct misdn_cfg_spec *)port_spec;
657  else if ((elem > MISDN_GEN_FIRST) && (elem < MISDN_GEN_LAST))
658  spec = (struct misdn_cfg_spec *)gen_spec;
659 
660  ast_copy_string(buf, spec ? spec[place].name : "", bufsize);
661 }
static int * map
Definition: misdn_config.c:434
static struct misdn_cfg_spec port_spec[]
Definition: misdn_config.c:102
enum misdn_cfg_elements elem
Definition: misdn_config.c:91
static struct misdn_cfg_spec gen_spec[]
Definition: misdn_config.c:387
static const char name[]
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:223
int misdn_cfg_get_next_port ( int  port)

Definition at line 892 of file misdn_config.c.

References max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), and str.

Referenced by complete_show_config(), handle_cli_misdn_show_config(), handle_cli_misdn_show_ports_stats(), handle_cli_misdn_show_stacks(), load_module(), misdn_cfg_get_next_port_spin(), misdn_check_l2l1(), misdn_new(), misdn_request(), and update_name().

893 {
894  int p = -1;
895  int gn = map[MISDN_CFG_GROUPNAME];
896 
897  misdn_cfg_lock();
898  for (port++; port <= max_ports; port++) {
899  if (port_cfg[port][gn].str) {
900  p = port;
901  break;
902  }
903  }
905 
906  return p;
907 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
static int max_ports
Definition: misdn_config.c:428
const char * str
Definition: app_jack.c:144
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_get_next_port_spin ( int  port)

Definition at line 909 of file misdn_config.c.

References misdn_cfg_get_next_port().

Referenced by misdn_request().

910 {
911  int p = misdn_cfg_get_next_port(port);
912  return (p > 0) ? p : misdn_cfg_get_next_port(0);
913 }
int misdn_cfg_get_next_port(int port)
Definition: misdn_config.c:892
void misdn_cfg_get_ports_string ( char *  ports)

Generate a comma separated list of all active ports.

Definition at line 761 of file misdn_config.c.

References max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), and str.

Referenced by load_module().

762 {
763  char tmp[16];
764  int l, i;
765  int gn = map[MISDN_CFG_GROUPNAME];
766 
767  *ports = 0;
768 
769  misdn_cfg_lock();
770  for (i = 1; i <= max_ports; i++) {
771  if (port_cfg[i][gn].str) {
772  if (ptp[i])
773  sprintf(tmp, "%dptp,", i);
774  else
775  sprintf(tmp, "%d,", i);
776  strcat(ports, tmp);
777  }
778  }
780 
781  if ((l = strlen(ports))) {
782  /* Strip trailing ',' */
783  ports[l-1] = 0;
784  }
785 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
static int max_ports
Definition: misdn_config.c:428
const char * str
Definition: app_jack.c:144
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
static int * ptp
Definition: misdn_config.c:432
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_init ( int  max_ports,
int  reload 
)

Definition at line 1163 of file misdn_config.c.

References _build_general_config(), _build_port_config(), _enum_array_map(), _fill_defaults(), _free_general_cfg(), _free_port_cfg(), ast_calloc, ast_category_browse(), ast_config_destroy(), ast_config_load2(), ast_log(), ast_mutex_init, ast_variable_browse(), config, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, global_jbconf, LOG_WARNING, max_ports, misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_LAST, NUM_GEN_ELEMENTS, and NUM_PORT_ELEMENTS.

Referenced by load_module(), and misdn_cfg_reload().

1164 {
1165  char config[] = "misdn.conf";
1166  char *cat, *p;
1167  int i;
1168  struct ast_config *cfg;
1169  struct ast_variable *v;
1170  struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
1171 
1172  if (!(cfg = ast_config_load2(config, "chan_misdn", config_flags)) || cfg == CONFIG_STATUS_FILEINVALID) {
1173  ast_log(LOG_WARNING, "missing or invalid file: misdn.conf\n");
1174  return -1;
1175  } else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
1176  return 0;
1177 
1179 
1180  /* Copy the default jb config over global_jbconf */
1181  memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
1182 
1183  misdn_cfg_lock();
1184 
1185  if (this_max_ports) {
1186  /* this is the first run */
1187  max_ports = this_max_ports;
1188  map = ast_calloc(MISDN_GEN_LAST + 1, sizeof(int));
1189  if (_enum_array_map())
1190  return -1;
1191  p = ast_calloc(1, (max_ports + 1) * sizeof(union misdn_cfg_pt *)
1192  + (max_ports + 1) * NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt));
1193  port_cfg = (union misdn_cfg_pt **)p;
1194  p += (max_ports + 1) * sizeof(union misdn_cfg_pt *);
1195  for (i = 0; i <= max_ports; ++i) {
1196  port_cfg[i] = (union misdn_cfg_pt *)p;
1197  p += NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt);
1198  }
1199  general_cfg = ast_calloc(1, sizeof(union misdn_cfg_pt *) * NUM_GEN_ELEMENTS);
1200  ptp = ast_calloc(max_ports + 1, sizeof(int));
1201  }
1202  else {
1203  /* misdn reload */
1204  _free_port_cfg();
1206  memset(port_cfg[0], 0, NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt) * (max_ports + 1));
1207  memset(general_cfg, 0, sizeof(union misdn_cfg_pt *) * NUM_GEN_ELEMENTS);
1208  memset(ptp, 0, sizeof(int) * (max_ports + 1));
1209  }
1210 
1211  cat = ast_category_browse(cfg, NULL);
1212 
1213  while(cat) {
1214  v = ast_variable_browse(cfg, cat);
1215  if (!strcasecmp(cat, "general")) {
1217  } else {
1218  _build_port_config(v, cat);
1219  }
1220  cat = ast_category_browse(cfg, cat);
1221  }
1222 
1223  _fill_defaults();
1224 
1225  misdn_cfg_unlock();
1226  ast_config_destroy(cfg);
1227 
1228  return 0;
1229 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static const char config[]
Definition: cdr_csv.c:57
static void _fill_defaults(void)
#define NUM_PORT_ELEMENTS
Definition: misdn_config.c:52
static int * map
Definition: misdn_config.c:434
#define NUM_GEN_ELEMENTS
Definition: misdn_config.c:51
#define LOG_WARNING
Definition: logger.h:144
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category)
Goes through variables.
Definition: config.c:597
static struct ast_jb_conf default_jbconf
Definition: misdn_config.c:56
Structure for variables, used for configurations and for channel variables.
Definition: config.h:75
static int max_ports
Definition: misdn_config.c:428
static struct ast_jb_conf global_jbconf
Definition: misdn_config.c:65
struct ast_config * ast_config_load2(const char *filename, const char *who_asked, struct ast_flags flags)
Load a config file.
Definition: config.c:2499
void ast_config_destroy(struct ast_config *config)
Destroys a config.
Definition: config.c:1037
static void _build_port_config(struct ast_variable *v, char *cat)
static void _free_port_cfg(void)
Definition: misdn_config.c:520
static int _enum_array_map(void)
Definition: misdn_config.c:443
char * ast_category_browse(struct ast_config *config, const char *prev)
Goes through categories.
Definition: config.c:810
static union misdn_cfg_pt * general_cfg
Definition: misdn_config.c:430
static int reload(void)
Definition: app_amd.c:497
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
Structure used to handle boolean flags.
Definition: utils.h:200
static void _free_general_cfg(void)
Definition: misdn_config.c:553
static void _build_general_config(struct ast_variable *v)
Definition: misdn_config.c:992
#define ast_calloc(a, b)
Definition: astmm.h:82
static int * ptp
Definition: misdn_config.c:432
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
#define ast_mutex_init(pmutex)
Definition: lock.h:152
#define CONFIG_STATUS_FILEINVALID
Definition: config.h:52
static ast_mutex_t config_mutex
Definition: misdn_config.c:436
General jitterbuffer configuration.
Definition: abstract_jb.h:55
#define CONFIG_STATUS_FILEUNCHANGED
Definition: config.h:51
int misdn_cfg_is_group_method ( char *  group,
enum misdn_cfg_method  meth 
)

Definition at line 726 of file misdn_config.c.

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

Referenced by misdn_request().

727 {
728  int i, re = 0;
729  char *method ;
730 
731  misdn_cfg_lock();
732 
733  method = port_cfg[0][map[MISDN_CFG_METHOD]].str;
734 
735  for (i = 1; i <= max_ports; i++) {
736  if (port_cfg[i] && port_cfg[i][map[MISDN_CFG_GROUPNAME]].str) {
737  if (!strcasecmp(port_cfg[i][map[MISDN_CFG_GROUPNAME]].str, group))
738  method = (port_cfg[i][map[MISDN_CFG_METHOD]].str ?
740  }
741  }
742 
743  if (method) {
744  switch (meth) {
745  case METHOD_STANDARD: re = !strcasecmp(method, "standard");
746  break;
747  case METHOD_ROUND_ROBIN: re = !strcasecmp(method, "round_robin");
748  break;
749  case METHOD_STANDARD_DEC: re = !strcasecmp(method, "standard_dec");
750  break;
751  }
752  }
754 
755  return re;
756 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
static int max_ports
Definition: misdn_config.c:428
const char * str
Definition: app_jack.c:144
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_is_msn_valid ( int  port,
char *  msn 
)

Definition at line 694 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_unlock(), misdn_cfg_pt::ml, msn_list::msn, and msn_list::next.

Referenced by misdn_is_msn_valid().

695 {
696  int re = 0;
697  struct msn_list *iter;
698 
699  if (!misdn_cfg_is_port_valid(port)) {
700  ast_log(LOG_WARNING, "Invalid call to misdn_cfg_is_msn_valid! Port number %d is not valid.\n", port);
701  return 0;
702  }
703 
704  misdn_cfg_lock();
705  if (port_cfg[port][map[MISDN_CFG_MSNS]].ml)
706  iter = port_cfg[port][map[MISDN_CFG_MSNS]].ml;
707  else
708  iter = port_cfg[0][map[MISDN_CFG_MSNS]].ml;
709  for (; iter; iter = iter->next)
710  if (*(iter->msn) == '*' || ast_extension_match(iter->msn, msn)) {
711  re = 1;
712  break;
713  }
715 
716  return re;
717 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
#define LOG_WARNING
Definition: logger.h:144
struct msn_list * next
Definition: misdn_config.c:78
char * msn
Definition: misdn_config.c:77
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
int ast_extension_match(const char *pattern, const char *extension)
Determine if a given extension matches a given pattern (in NXX format)
Definition: pbx.c:2943
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
struct msn_list * ml
Definition: misdn_config.c:84
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_is_port_valid(int port)
Definition: misdn_config.c:719
int misdn_cfg_is_port_valid ( int  port)

Definition at line 719 of file misdn_config.c.

References MISDN_CFG_GROUPNAME, and str.

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

720 {
721  int gn = map[MISDN_CFG_GROUPNAME];
722 
723  return (port >= 1 && port <= max_ports && port_cfg[port][gn].str);
724 }
static union misdn_cfg_pt ** port_cfg
Definition: misdn_config.c:426
static int * map
Definition: misdn_config.c:434
static int max_ports
Definition: misdn_config.c:428
const char * str
Definition: app_jack.c:144
void misdn_cfg_reload ( void  )

Definition at line 1142 of file misdn_config.c.

References misdn_cfg_init().

Referenced by reload_config().

1143 {
1144  misdn_cfg_init(0, 1);
1145 }
int misdn_cfg_init(int this_max_ports, int reload)
void misdn_cfg_update_ptp ( void  )

Definition at line 1073 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(), and MISDN_GEN_MISDN_INIT.

Referenced by load_module(), and reload_config().

1074 {
1075 #ifndef MISDN_1_2
1076  char misdn_init[BUFFERSIZE];
1077  char line[BUFFERSIZE];
1078  FILE *fp;
1079  char *tok, *p, *end;
1080  int port;
1081 
1082  misdn_cfg_get(0, MISDN_GEN_MISDN_INIT, &misdn_init, sizeof(misdn_init));
1083 
1084  if (!ast_strlen_zero(misdn_init)) {
1085  fp = fopen(misdn_init, "r");
1086  if (fp) {
1087  while(fgets(line, sizeof(line), fp)) {
1088  if (!strncmp(line, "nt_ptp", 6)) {
1089  for (tok = strtok_r(line,",=", &p);
1090  tok;
1091  tok = strtok_r(NULL,",=", &p)) {
1092  port = strtol(tok, &end, 10);
1093  if (end != tok && misdn_cfg_is_port_valid(port)) {
1094  misdn_cfg_lock();
1095  ptp[port] = 1;
1096  misdn_cfg_unlock();
1097  }
1098  }
1099  }
1100  }
1101  fclose(fp);
1102  } else {
1103  ast_log(LOG_WARNING,"Couldn't open %s: %s\n", misdn_init, strerror(errno));
1104  }
1105  }
1106 #else
1107  int i;
1108  int proto;
1109  char filename[128];
1110  FILE *fp;
1111 
1112  for (i = 1; i <= max_ports; ++i) {
1113  snprintf(filename, sizeof(filename), "/sys/class/mISDN-stacks/st-%08x/protocol", i << 8);
1114  fp = fopen(filename, "r");
1115  if (!fp) {
1116  ast_log(LOG_WARNING, "Could not open %s: %s\n", filename, strerror(errno));
1117  continue;
1118  }
1119  if (fscanf(fp, "0x%08x", &proto) != 1)
1120  ast_log(LOG_WARNING, "Could not parse contents of %s!\n", filename);
1121  else
1122  ptp[i] = proto & 1<<5 ? 1 : 0;
1123  fclose(fp);
1124  }
1125 #endif
1126 }
#define LOG_WARNING
Definition: logger.h:144
static int max_ports
Definition: misdn_config.c:428
#define BUFFERSIZE
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Definition: strings.h:63
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
int errno
static void misdn_cfg_unlock(void)
Definition: misdn_config.c:506
void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void *buf, int bufsize)
Definition: misdn_config.c:562
static int * ptp
Definition: misdn_config.c:432
static void misdn_cfg_lock(void)
Definition: misdn_config.c:501
int misdn_cfg_is_port_valid(int port)
Definition: misdn_config.c:719
struct ast_jb_conf* misdn_get_global_jbconf ( void  )

Definition at line 1231 of file misdn_config.c.

References global_jbconf.

Referenced by misdn_new().

1231  {
1232  return &global_jbconf;
1233 }
static struct ast_jb_conf global_jbconf
Definition: misdn_config.c:65