Asterisk - The Open Source Telephony Project  18.5.0
chan_misdn_config.h
Go to the documentation of this file.
1 /*
2  * Chan_Misdn -- Channel Driver for Asterisk
3  *
4  * Interface to mISDN
5  *
6  * Copyright (C) 2004, Christian Richter
7  *
8  * Christian Richter <[email protected]>
9  *
10  * This program is free software, distributed under the terms of
11  * the GNU General Public License
12  */
13 
14 /*! \file
15  * \brief Interface to mISDN - Config
16  * \author Christian Richter <[email protected]>
17  */
18 
19 
20 
21 
22 #ifndef CHAN_MISDN_CONFIG_H
23 #define CHAN_MISDN_CONFIG_H
24 
25 #define BUFFERSIZE 512
26 
28 
29  /* port config items */
31  MISDN_CFG_GROUPNAME, /* 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) */
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[] */
47  MISDN_CFG_METHOD, /* char[] */
48  MISDN_CFG_DIALPLAN, /* int */
57  MISDN_CFG_PRES, /* int */
58  MISDN_CFG_SCREEN, /* 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) */
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
86  MISDN_CFG_NTTIMEOUT, /* bool */
87  MISDN_CFG_BRIDGING, /* bool */
90  MISDN_CFG_CALLGROUP, /* ast_group_t */
91  MISDN_CFG_PICKUPGROUP, /* ast_group_t */
92  MISDN_CFG_NAMEDCALLGROUP, /* ast_namedgroups * */
93  MISDN_CFG_NAMEDPICKUPGROUP, /* ast_namedgroups * */
94  MISDN_CFG_MAX_IN, /* int */
95  MISDN_CFG_MAX_OUT, /* int */
97  MISDN_CFG_OVERLAP_DIAL, /* int (bool)*/
98  MISDN_CFG_MSNS, /* char[] */
99  MISDN_CFG_FAXDETECT, /* char[] */
102  MISDN_CFG_PTP, /* int (bool) */
104 
105  /* general config items */
107 #ifndef MISDN_1_2
108  MISDN_GEN_MISDN_INIT, /* char[] */
109 #endif
110  MISDN_GEN_DEBUG, /* int */
111  MISDN_GEN_TRACEFILE, /* char[] */
112  MISDN_GEN_BRIDGING, /* int (bool) */
113  MISDN_GEN_STOP_TONE, /* int (bool) */
115  MISDN_GEN_DYNAMIC_CRYPT, /* int (bool) */
117  MISDN_GEN_CRYPT_KEYS, /* char[] */
118  MISDN_GEN_NTKEEPCALLS, /* int (bool) */
120  MISDN_GEN_NTDEBUGFILE, /* char[] */
122 };
123 
128 };
129 
130 /* you must call misdn_cfg_init before any other function of this header file */
131 int misdn_cfg_init(int max_ports, int reload);
132 void misdn_cfg_reload(void);
133 void misdn_cfg_destroy(void);
134 
135 void misdn_cfg_update_ptp( void );
136 
137 /* if you requst a general config element, the port value is ignored. if the requested
138  * value is not available, or the buffer is too small, the buffer will be nulled (in
139  * case of a char* only its first byte will be nulled). */
140 void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void* buf, int bufsize);
141 
142 /* returns the enum element for the given name, returns MISDN_CFG_FIRST if none was found */
143 enum misdn_cfg_elements misdn_cfg_get_elem (const char *name);
144 
145 /* fills the buffer with the name of the given config element */
146 void misdn_cfg_get_name (enum misdn_cfg_elements elem, void *buf, int bufsize);
147 
148 /* fills the buffer with the description of the given config element */
149 void misdn_cfg_get_desc (enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default);
150 
151 /* fills the buffer with a ',' separated list of all active ports */
152 void misdn_cfg_get_ports_string(char *ports);
153 
154 /* fills the buffer with a nice printable string representation of the config element */
155 void misdn_cfg_get_config_string(int port, enum misdn_cfg_elements elem, char* buf, int bufsize);
156 
157 /* returns the next available port number. returns -1 if the last one was reached. */
158 int misdn_cfg_get_next_port(int port);
159 int misdn_cfg_get_next_port_spin(int port);
160 
161 int misdn_cfg_is_msn_valid(int port, char* msn);
162 int misdn_cfg_is_port_valid(int port);
163 int misdn_cfg_is_group_method(char *group, enum misdn_cfg_method meth);
164 
165 #if 0
166 char *misdn_cfg_get_next_group(char *group);
167 int misdn_cfg_get_next_port_in_group(int port, char *group);
168 #endif
169 
171 
172 #endif
int misdn_cfg_get_next_port_spin(int port)
Definition: misdn_config.c:946
void misdn_cfg_destroy(void)
int misdn_cfg_get_next_port(int port)
Definition: misdn_config.c:929
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
struct ast_jb_conf * misdn_get_global_jbconf(void)
void misdn_cfg_get_config_string(int port, enum misdn_cfg_elements elem, char *buf, int bufsize)
Definition: misdn_config.c:805
misdn_cfg_elements
int misdn_cfg_init(int max_ports, int reload)
int misdn_cfg_is_port_valid(int port)
Definition: misdn_config.c:737
void misdn_cfg_reload(void)
void misdn_cfg_get_name(enum misdn_cfg_elements elem, void *buf, int bufsize)
Definition: misdn_config.c:655
int misdn_cfg_is_group_method(char *group, enum misdn_cfg_method meth)
Definition: misdn_config.c:744
void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void *buf, int bufsize)
Definition: misdn_config.c:569
void misdn_cfg_get_ports_string(char *ports)
Generate a comma separated list of all active ports.
Definition: misdn_config.c:779
static int max_ports
Definition: chan_misdn.c:696
void misdn_cfg_update_ptp(void)
enum misdn_cfg_elements misdn_cfg_get_elem(const char *name)
Definition: misdn_config.c:634
void misdn_cfg_get_desc(enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default)
Definition: misdn_config.c:681
static const char name[]
Definition: cdr_mysql.c:74
static int reload(void)
Definition: cdr_mysql.c:741
misdn_cfg_method
int misdn_cfg_is_msn_valid(int port, char *msn)
Definition: misdn_config.c:712
General jitterbuffer configuration.
Definition: abstract_jb.h:69