44 #define NO_DEFAULT "<>" 49 #define NUM_GEN_ELEMENTS (sizeof(gen_spec) / sizeof(struct misdn_cfg_spec)) 50 #define NUM_PORT_ELEMENTS (sizeof(port_spec) / sizeof(struct misdn_cfg_spec)) 58 .resync_threshold = 1000,
100 "Define your ports, e.g. 1,2 (depends on mISDN-driver loading order).";
104 "Name of the portgroup." },
106 "Here you can list which bearer capabilities should be allowed:\n" 107 "\t all - allow any bearer capability\n" 108 "\t speech - allow speech\n" 109 "\t 3_1khz - allow 3.1KHz audio\n" 110 "\t digital_unrestricted - allow unrestricted digital\n" 111 "\t digital_restricted - allow restricted digital\n" 112 "\t video - allow video" },
114 "Set this between -8 and 8 to change the RX Gain." },
116 "Set this between -8 and 8 to change the TX Gain." },
118 "Some telcos especially in NL seem to need this set to yes,\n" 119 "\talso in Switzerland this seems to be important." },
121 "If we should generate ringing for chan_sip and others." },
123 "This option defines, if chan_misdn should check the L1 on a PMP\n" 124 "\tbefore making a group call on it. The L1 may go down for PMP Ports\n" 125 "\tso we might need this.\n" 126 "\tBut be aware! a broken or plugged off cable might be used for a group call\n" 127 "\tas well, since chan_misdn has no chance to distinguish if the L1 is down\n" 128 "\tbecause of a lost Link or because the Provider shut it down..." },
130 "Block this port if we have an alarm on it." },
132 "Set this to yes, if you want to bridge a mISDN data channel to\n" 133 "\tanother channel type or to an application." },
135 "Context to use for incoming calls." },
139 "Sets the musiconhold class." },
141 "Set the outgoing caller id to the value." },
143 "Set the incoming caller id string tag to the value." },
145 "Automatically appends incoming or outgoing MSN to the incoming caller\n" 146 "\tid string tag. An underscore '_' is used as delimiter. Incoming calls\n" 147 "\twill have the dialed number appended, and outgoing calls will have the\n" 148 "\tcaller number appended to the tag." },
150 "Set the method to use for channel selection:\n" 151 "\t standard - Use the first free channel starting from the lowest number.\n" 152 "\t standard_dec - Use the first free channel starting from the highest number.\n" 153 "\t round_robin - Use the round robin algorithm to select a channel. Use this\n" 154 "\t if you want to balance your load." },
156 "Dialplan means Type Of Number in ISDN Terms\n" 157 "\tThere are different types of the dialplan:\n" 159 "\tdialplan -> for outgoing call's dialed number\n" 160 "\tlocaldialplan -> for outgoing call's callerid\n" 161 "\t (if -1 is set use the value from the asterisk channel)\n" 162 "\tcpndialplan -> for incoming call's connected party number sent to caller\n" 163 "\t (if -1 is set use the value from the asterisk channel)\n" 165 "\tdialplan options:\n" 168 "\t1 - International\n" 170 "\t4 - Subscriber" },
172 "Dialplan means Type Of Number in ISDN Terms\n" 173 "\tThere are different types of the dialplan:\n" 175 "\tdialplan -> for outgoing call's dialed number\n" 176 "\tlocaldialplan -> for outgoing call's callerid\n" 177 "\t (if -1 is set use the value from the asterisk channel)\n" 178 "\tcpndialplan -> for incoming call's connected party number sent to caller\n" 179 "\t (if -1 is set use the value from the asterisk channel)\n" 181 "\tdialplan options:\n" 184 "\t1 - International\n" 186 "\t4 - Subscriber" },
188 "Dialplan means Type Of Number in ISDN Terms\n" 189 "\tThere are different types of the dialplan:\n" 191 "\tdialplan -> for outgoing call's dialed number\n" 192 "\tlocaldialplan -> for outgoing call's callerid\n" 193 "\t (if -1 is set use the value from the asterisk channel)\n" 194 "\tcpndialplan -> for incoming call's connected party number sent to caller\n" 195 "\t (if -1 is set use the value from the asterisk channel)\n" 197 "\tdialplan options:\n" 200 "\t1 - International\n" 202 "\t4 - Subscriber" },
204 "Prefix for unknown numbers, this is put before an incoming number\n" 205 "\tif its type-of-number is unknown." },
207 "Prefix for international numbers, this is put before an incoming number\n" 208 "\tif its type-of-number is international." },
210 "Prefix for national numbers, this is put before an incoming number\n" 211 "\tif its type-of-number is national." },
213 "Prefix for network-specific numbers, this is put before an incoming number\n" 214 "\tif its type-of-number is network-specific." },
216 "Prefix for subscriber numbers, this is put before an incoming number\n" 217 "\tif its type-of-number is subscriber." },
219 "Prefix for abbreviated numbers, this is put before an incoming number\n" 220 "\tif its type-of-number is abbreviated." },
222 "These (presentation and screen) are the exact isdn screening and presentation\n" 224 "\tIf -1 is given for either value, the presentation indicators are used from\n" 225 "\tAsterisk's CALLERPRES function.\n" 227 "\tscreen=0, presentation=0 -> callerid presented\n" 228 "\tscreen=1, presentation=1 -> callerid restricted (the remote end doesn't see it!)" },
230 "These (presentation and screen) are the exact isdn screening and presentation\n" 232 "\tIf -1 is given for either value, the presentation indicators are used from\n" 233 "\tAsterisk's CALLERPRES function.\n" 235 "\tscreen=0, presentation=0 -> callerid presented\n" 236 "\tscreen=1, presentation=1 -> callerid restricted (the remote end doesn't see it!)" },
238 "Select what to do with outgoing COLP information on this port.\n" 240 "\t0 - Send out COLP information unaltered.\n" 241 "\t1 - Force COLP to restricted on all outgoing COLP information.\n" 242 "\t2 - Do not send COLP information." },
244 "Put a display ie in the CONNECT message containing the following\n" 245 "\tinformation if it is available (nt port only):\n" 247 "\t0 - Do not put the connected line information in the display ie.\n" 248 "\t1 - Put the available connected line name in the display ie.\n" 249 "\t2 - Put the available connected line number in the display ie.\n" 250 "\t3 - Put the available connected line name and number in the display ie." },
252 "Put a display ie in the SETUP message containing the following\n" 253 "\tinformation if it is available (nt port only):\n" 255 "\t0 - Do not put the caller information in the display ie.\n" 256 "\t1 - Put the available caller name in the display ie.\n" 257 "\t2 - Put the available caller number in the display ie.\n" 258 "\t3 - Put the available caller name and number in the display ie." },
260 "Enable this to get into the s dialplan-extension.\n" 261 "\tThere you can use DigitTimeout if you can't or don't want to use\n" 262 "\tisdn overlap dial.\n" 263 "\tNOTE: This will jump into the s extension for every exten!" },
265 "Enable this to prevent chan_misdn to generate the dialtone\n" 266 "\tThis makes only sense together with the always_immediate=yes option\n" 267 "\tto generate your own dialtone with Playtones or so." },
269 "Enable this if you want callers which called exactly the base\n" 270 "\tnumber (so no extension is set) to jump into the s extension.\n" 271 "\tIf the user dials something more, it jumps to the correct extension\n" 274 "Enable this if we should produce DTMF Tones ourselves." },
276 "Enable this if you want to use the Asterisk dtmf detector\n" 277 "instead of the mISDN_dsp/hfcmulti one." 280 "Enable this to have support for hold and retrieve." },
282 "Disable this if you don't mind correct handling of Progress Indicators." },
284 "Turn this on if you like to send Tone Indications to a Incoming\n" 285 "\tisdn channel on a TE Port. Rarely used, only if the Telco allows\n" 286 "\tyou to send indications by yourself, normally the Telco sends the\n" 287 "\tindications to the remote party." },
289 "This enables echo cancellation with the given number of taps.\n" 290 "\tBe aware: Move this setting only to outgoing portgroups!\n" 291 "\tA value of zero turns echo cancellation off.\n" 293 "\tPossible values are: 0,32,64,128,256,yes(=128),no(=0)" },
296 "Set the configuration string for the mISDN dsp pipeline.\n" 298 "\tExample for enabling the mg2 echo cancellation module with deftaps\n" 300 "\t\tmg2ec(deftaps=128)" },
304 "echotail in ms (1-200)" },
308 "Nonlinear Processing (much faster adaption)" },
314 "Adaption mode (0=no,1=full,2=fast)" },
317 "Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING),\n" 318 "\tthis requests additional Infos, so we can waitfordigits without much\n" 319 "\tissues. This works only for PTP Ports" },
321 "Do not send SETUP_ACKNOWLEDGE or PROCEEDING automatically to the calling Party.\n" 322 "Instead we directly jump into the dialplan. This might be useful for fast call\n" 323 "rejection, or for some broken switches, that need hangup causes like busy in the.\n" 324 "RELEASE_COMPLETE Message, instead of the DISCONNECT Message."},
326 "The jitterbuffer." },
328 "Change this threshold to enable dejitter functionality." },
334 "Named callgroup." },
336 "Named pickupgroup." },
338 "Defines the maximum amount of incoming calls per port for this group.\n" 339 "\tCalls which exceed the maximum will be marked with the channel variable\n" 340 "\tMAX_OVERFLOW. It will contain the amount of overflowed calls" },
342 "Defines the maximum amount of outgoing calls per port for this group\n" 343 "\texceeding calls will be rejected" },
346 "Defines the cause with which a 3. call is rejected on PTMP BRI."},
348 "Setup fax detection:\n" 349 "\t no - no fax detection\n" 350 "\t incoming - fax detection for incoming calls\n" 351 "\t outgoing - fax detection for outgoing calls\n" 352 "\t both - fax detection for incoming and outgoing calls\n" 353 "\tAdd +nojump to your value (i.e. faxdetect=both+nojump) if you don't want to jump into the\n" 354 "\tfax-extension but still want to detect the fax and prepare the channel for fax transfer." },
356 "Number of seconds the fax detection should do its job. After the given period of time,\n" 357 "\twe assume that it's not a fax call and save some CPU time by turning off fax detection.\n" 358 "\tSet this to 0 if you don't want a timeout (never stop detecting)." },
360 "Context to jump into if we detect a fax. Don't set this if you want to stay in the current context." },
362 "Monitors L1 of the port. If L1 is down it tries\n" 363 "\tto bring it up. The polling timeout is given in seconds.\n" 364 "\tSetting the value to 0 disables monitoring L1 of the port.\n" 366 "\tThis option is only read at chan_misdn loading time.\n" 367 "\tYou need to unload and load chan_misdn to change the\n" 368 "\tvalue. An asterisk restart will also do the trick." },
370 "Enables overlap dial for the given amount of seconds.\n" 371 "\tPossible values are positive integers or:\n" 372 "\t yes (= 4 seconds)\n" 373 "\t no (= 0 seconds = disabled)" },
375 "Set this to yes if you want calls disconnected in overlap mode\n" 376 "\twhen a timeout happens." },
378 "Set this to yes/no, default is yes.\n" 379 "This can be used to have bridging enabled in general and to\n" 380 "disable it for specific ports. It makes sense to disable\n" 381 "bridging on NT Port where you plan to use the HOLD/RETRIEVE\n" 382 "features with ISDN phones." },
384 "MSN's for TE ports, listen on those numbers on the above ports, and\n" 385 "\tindicate the incoming calls to Asterisk.\n" 386 "\tHere you can give a comma separated list, or simply an '*' for any msn." },
388 "Enable/Disable call-completion request retention support (ptp)." },
393 "Sets the debugging flag:\n" 395 "\t1 - mISDN Messages and * - Messages, and * - State changes\n" 396 "\t2 - Messages + Message specific Informations (e.g. bearer capability)\n" 397 "\t3 - very Verbose, the above + lots of Driver specific infos\n" 398 "\t4 - even more Verbose than 3" },
401 "Set the path to the misdn-init.conf (for nt_ptp mode checking)." },
404 "Set the path to the massively growing trace file, if you want that." },
406 "Set this to yes if you want mISDN_dsp to bridge the calls in HW." },
408 "Stops dialtone after getting first digit on NT Port." },
410 "Whether to append overlapdialed Digits to Extension or not." },
412 "Whether to look out for dynamic crypting attempts." },
414 "What is used for crypting Protocol." },
416 "Keys for cryption, you reference them in the dialplan\n" 417 "\tLater also in dynamic encr." },
419 "avoid dropping calls if the L2 goes down. some Nortel pbx\n" 420 "do put down the L2/L1 for some milliseconds even if there\n" 421 "are running calls. with this option you can avoid dropping them" },
423 "No description yet."},
425 "No description yet." }
442 #define CLI_ERROR(name, value, section) ({ \ 443 ast_log(LOG_WARNING, "misdn.conf: \"%s=%s\" (section: %s) invalid or out of range. " \ 444 "Please edit your misdn.conf and then do a \"misdn reload\".\n", name, value, section); \ 456 if (port_spec[j].elem == i) {
463 ast_log(
LOG_WARNING,
"Enum element %d in misdn_cfg_elements (port section) has no corresponding element in the config struct!\n", i);
470 if (gen_spec[j].elem == i) {
477 ast_log(
LOG_WARNING,
"Enum element %d in misdn_cfg_elements (general section) has no corresponding element in the config struct!\n", i);
491 if (!strcasecmp(name, port_spec[i].name))
497 if (!strcasecmp(name, gen_spec[i].name))
530 memset(free_list, 0,
sizeof(free_list));
531 free_list[0] = port_cfg[0];
533 if (port_cfg[i][gn].
str) {
536 if (free_list[j] && free_list[j][gn].str == port_cfg[i][gn].str)
538 else if (!free_list[j]) {
539 free_list[j] = port_cfg[i];
545 for (j = 0; free_list[j]; ++j) {
547 if (free_list[j][i].
any) {
565 if (general_cfg[i].
any)
574 memset(buf, 0, bufsize);
575 ast_log(
LOG_WARNING,
"Invalid call to misdn_cfg_get! Port number %d is not valid.\n", port);
581 if (!memcpy(buf, &
ptp[port], (bufsize >
ptp[port]) ?
sizeof(
ptp[port]) : bufsize))
582 memset(buf, 0, bufsize);
584 if ((place =
map[elem]) < 0) {
585 memset(buf, 0, bufsize);
586 ast_log(
LOG_WARNING,
"Invalid call to misdn_cfg_get! Invalid element (%d) requested.\n", elem);
589 switch (port_spec[place].
type) {
591 if (port_cfg[port][place].
str) {
593 }
else if (port_cfg[0][place].str) {
596 memset(buf, 0, bufsize);
599 if (bufsize >=
sizeof(
struct ast_namedgroups *)) {
600 if (port_cfg[port][place].
namgrp) {
601 *(
struct ast_namedgroups **)buf = port_cfg[port][place].namgrp;
602 }
else if (port_cfg[0][place].namgrp) {
603 *(
struct ast_namedgroups **)buf = port_cfg[0][place].namgrp;
605 *(
struct ast_namedgroups **)buf =
NULL;
610 if (port_cfg[port][place].any)
611 memcpy(buf, port_cfg[port][place].any, bufsize);
612 else if (port_cfg[0][place].any)
613 memcpy(buf, port_cfg[0][place].any, bufsize);
615 memset(buf, 0, bufsize);
618 switch (gen_spec[place].
type) {
623 if (general_cfg[place].any)
624 memcpy(buf, general_cfg[place].any, bufsize);
626 memset(buf, 0, bufsize);
639 if (!strcmp(name,
"ports"))
641 if (!strcmp(name,
"name"))
646 return port_spec[pos].
elem;
650 return gen_spec[pos].
elem;
668 if (!snprintf(buf, bufsize,
"ports"))
689 if (buf_default && bufsize_default)
690 memset(buf_default, 0, 1);
703 if (buf_default && bufsize) {
705 memset(buf_default, 0, 1);
718 ast_log(
LOG_WARNING,
"Invalid call to misdn_cfg_is_msn_valid! Port number %d is not valid.\n", port);
727 for (; iter; iter = iter->
next)
741 return (port >= 1 && port <=
max_ports && port_cfg[port][gn].
str);
789 if (port_cfg[i][gn].
str) {
791 sprintf(tmp,
"%dptp,", i);
793 sprintf(tmp,
"%d,", i);
799 if ((l = strlen(ports))) {
813 ast_log(
LOG_WARNING,
"Invalid call to misdn_cfg_get_config_string! Port number %d is not valid.\n", port);
821 snprintf(buf, bufsize,
" -> ptp: %s",
ptp[port] ?
"yes" :
"no");
824 switch (port_spec[place].
type) {
827 if (port_cfg[port][place].num)
828 snprintf(buf, bufsize,
" -> %s: %d", port_spec[place].
name, *port_cfg[port][place].num);
829 else if (port_cfg[0][place].num)
830 snprintf(buf, bufsize,
" -> %s: %d", port_spec[place].name, *port_cfg[0][place].num);
832 snprintf(buf, bufsize,
" -> %s:", port_spec[place].name);
835 if (port_cfg[port][place].num)
836 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name, *port_cfg[port][place].num ?
"yes" :
"no");
837 else if (port_cfg[0][place].num)
838 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name, *port_cfg[0][place].num ?
"yes" :
"no");
840 snprintf(buf, bufsize,
" -> %s:", port_spec[place].name);
843 if (port_cfg[port][place].grp)
844 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name,
845 ast_print_group(tempbuf,
sizeof(tempbuf), *port_cfg[port][place].grp));
846 else if (port_cfg[0][place].grp)
847 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name,
850 snprintf(buf, bufsize,
" -> %s:", port_spec[place].name);
853 if (port_cfg[port][place].namgrp) {
856 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name,
860 }
else if (port_cfg[0][place].namgrp) {
863 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name,
868 snprintf(buf, bufsize,
" -> %s:", port_spec[place].name);
872 if (port_cfg[port][place].ml)
873 iter = port_cfg[port][place].
ml;
875 iter = port_cfg[0][place].
ml;
877 for (; iter; iter = iter->
next) {
878 strncat(tempbuf, iter->
msn,
sizeof(tempbuf) - strlen(tempbuf) - 1);
880 if (strlen(tempbuf) > 1) {
881 tempbuf[strlen(tempbuf)-2] = 0;
884 snprintf(buf, bufsize,
" -> msns: %s", *tempbuf ? tempbuf :
"none");
887 if ( port_cfg[port][place].
str) {
888 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name, port_cfg[port][place].str);
889 }
else if (port_cfg[0][place].str) {
890 snprintf(buf, bufsize,
" -> %s: %s", port_spec[place].name, port_cfg[0][place].str);
892 snprintf(buf, bufsize,
" -> %s:", port_spec[place].name);
897 switch (gen_spec[place].
type) {
900 if (general_cfg[place].num)
901 snprintf(buf, bufsize,
" -> %s: %d", gen_spec[place].
name, *general_cfg[place].num);
903 snprintf(buf, bufsize,
" -> %s:", gen_spec[place].name);
906 if (general_cfg[place].num)
907 snprintf(buf, bufsize,
" -> %s: %s", gen_spec[place].name, *general_cfg[place].num ?
"yes" :
"no");
909 snprintf(buf, bufsize,
" -> %s:", gen_spec[place].name);
912 if ( general_cfg[place].
str) {
913 snprintf(buf, bufsize,
" -> %s: %s", gen_spec[place].name, general_cfg[place].str);
915 snprintf(buf, bufsize,
" -> %s:", gen_spec[place].name);
919 snprintf(buf, bufsize,
" -> type of %s not handled yet", gen_spec[place].name);
924 ast_log(
LOG_WARNING,
"Invalid call to misdn_cfg_get_config_string! Invalid config element (%d) requested.\n", elem);
935 for (port++; port <=
max_ports; port++) {
936 if (port_cfg[port][gn].
str) {
964 if ((len = strlen(value))) {
966 strncpy(dest->
str, value, len);
977 if (strchr(value,
'x')) {
978 res = sscanf(value,
"%30x", &tmp);
980 res = sscanf(value,
"%30d", &tmp);
986 memcpy(dest->
num, &tmp,
sizeof(
int));
1001 if (sscanf(value,
"%30d", &tmp)) {
1002 memcpy(dest->
num, &tmp,
sizeof(
int));
1004 *(dest->
num) = (
ast_true(value) ? boolint_def : 0);
1008 for (valtmp =
strsep(&tmp2,
","); valtmp; valtmp =
strsep(&tmp2,
",")) {
1009 if ((len = strlen(valtmp))) {
1012 strncpy(ml->
msn, valtmp, len);
1036 for (; v; v = v->
next) {
1054 memset(cfg_tmp, 0,
sizeof(cfg_tmp));
1055 memset(cfg_for_ports, 0,
sizeof(cfg_for_ports));
1057 if (!strcasecmp(cat,
"default")) {
1058 cfg_for_ports[0] = 1;
1062 (
_parse(&cfg_tmp[pos], cat, port_spec[pos].
type, port_spec[pos].boolint_def) < 0)) {
1067 for (; v; v = v->
next) {
1068 if (!strcasecmp(v->
name,
"ports")) {
1072 for (token =
strsep(&tmp,
","); token; token =
strsep(&tmp,
","), *ptpbuf = 0) {
1075 if (sscanf(token,
"%30d-%30d%511s", &start, &end, ptpbuf) >= 2) {
1076 for (; start <=
end; start++) {
1077 if (start <= max_ports && start > 0) {
1078 cfg_for_ports[start] = 1;
1079 ptp[start] = (strstr(ptpbuf,
"ptp")) ? 1 : 0;
1084 if (sscanf(token,
"%30d%511s", &start, ptpbuf)) {
1085 if (start <= max_ports && start > 0) {
1086 cfg_for_ports[start] = 1;
1087 ptp[start] = (strstr(ptpbuf,
"ptp")) ? 1 : 0;
1102 if (i > 0 && cfg_for_ports[0]) {
1105 memset(cfg_tmp, 0,
sizeof(cfg_tmp));
1107 if (cfg_for_ports[i]) {
1108 memcpy(port_cfg[i], cfg_tmp,
sizeof(cfg_tmp));
1119 char *tok, *p, *
end;
1125 fp = fopen(misdn_init,
"r");
1127 while(fgets(line,
sizeof(line), fp)) {
1128 if (!strncmp(line,
"nt_ptp", 6)) {
1129 for (tok = strtok_r(line,
",=", &p);
1131 tok = strtok_r(
NULL,
",=", &p)) {
1132 port = strtol(tok, &end, 10);
1153 snprintf(filename,
sizeof(filename),
"/sys/class/mISDN-stacks/st-%08x/protocol", i << 8);
1154 fp = fopen(filename,
"r");
1159 if (fscanf(fp,
"0x%08x", &proto) != 1)
1162 ptp[i] = proto & 1<<5 ? 1 : 0;
1173 if (!port_cfg[0][i].
any && strcasecmp(port_spec[i].def,
NO_DEFAULT))
1174 _parse(&(port_cfg[0][i]), (
char *)port_spec[i].def, port_spec[i].
type, port_spec[i].boolint_def);
1177 if (!general_cfg[i].
any && strcasecmp(gen_spec[i].def,
NO_DEFAULT))
1178 _parse(&(general_cfg[i]), (
char *)gen_spec[i].def, gen_spec[i].
type, gen_spec[i].boolint_def);
1205 char config[] =
"misdn.conf";
1225 if (this_max_ports) {
1255 if (!strcasecmp(cat,
"general")) {
struct ast_variable * next
unsigned long long ast_group_t
void misdn_cfg_destroy(void)
static int _parse(union misdn_cfg_pt *dest, const char *value, enum misdn_cfg_type type, int boolint_def)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
static union misdn_cfg_pt ** port_cfg
int misdn_cfg_init(int this_max_ports, int reload)
static void _fill_defaults(void)
int misdn_cfg_is_msn_valid(int port, char *msn)
String manipulation functions.
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category_name)
#define NUM_PORT_ELEMENTS
enum misdn_cfg_elements misdn_cfg_get_elem(const char *name)
static struct ast_jb_conf default_jbconf
int ast_jb_read_conf(struct ast_jb_conf *conf, const char *varname, const char *value)
Sets jitterbuffer configuration property.
#define CONFIG_STATUS_FILEINVALID
struct ast_config * ast_config_load2(const char *filename, const char *who_asked, struct ast_flags flags)
Load a config file.
Structure for variables, used for configurations and for channel variables.
int misdn_cfg_is_group_method(char *group, enum misdn_cfg_method meth)
#define ast_mutex_lock(a)
void misdn_cfg_reload(void)
int misdn_cfg_get_next_port(int port)
char * ast_category_browse(struct ast_config *config, const char *prev_name)
Browse categories.
static const struct misdn_cfg_spec gen_spec[]
static struct ast_jb_conf global_jbconf
static void _build_port_config(struct ast_variable *v, char *cat)
char * ast_print_group(char *buf, int buflen, ast_group_t group)
Print call and pickup groups into buffer.
#define ast_strlen_zero(foo)
static void _free_port_cfg(void)
Configuration File Parser.
static int get_cfg_position(const char *name, int type)
void misdn_cfg_get_name(enum misdn_cfg_elements elem, void *buf, int bufsize)
struct ast_namedgroups * namgrp
struct ast_jb_conf * misdn_get_global_jbconf()
General Asterisk PBX channel definitions.
void misdn_cfg_get_desc(enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default)
static int _enum_array_map(void)
static union misdn_cfg_pt * general_cfg
static void _free_msn_list(struct msn_list *iter)
void ast_config_destroy(struct ast_config *config)
Destroys a config.
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_malloc(len)
A wrapper for malloc()
ast_group_t ast_get_group(const char *s)
Core PBX routines and definitions.
#define CONFIG_STATUS_FILEUNCHANGED
enum misdn_cfg_elements elem
int misdn_cfg_get_next_port_spin(int port)
struct ast_namedgroups * ast_get_namedgroups(const char *s)
Create an ast_namedgroups set with group names from comma separated string.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define ast_calloc(num, len)
A wrapper for calloc()
int ast_extension_match(const char *pattern, const char *extension)
Determine if a given extension matches a given pattern (in NXX format)
void misdn_cfg_update_ptp(void)
unsigned int flags
Combination of the AST_JB_ENABLED, AST_JB_FORCED and AST_JB_LOG flags.
static const char ports_description[]
static void misdn_cfg_unlock(void)
Structure used to handle boolean flags.
static const struct misdn_cfg_spec port_spec[]
void misdn_cfg_get_ports_string(char *ports)
Generate a comma separated list of all active ports.
static void _free_general_cfg(void)
char * strsep(char **str, const char *delims)
void misdn_cfg_get_config_string(int port, enum misdn_cfg_elements elem, char *buf, int bufsize)
static void _build_general_config(struct ast_variable *v)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void *buf, int bufsize)
static void misdn_cfg_lock(void)
#define ast_mutex_init(pmutex)
struct ast_namedgroups * ast_unref_namedgroups(struct ast_namedgroups *groups)
Interface to mISDN - Config.
#define ast_mutex_destroy(a)
int misdn_cfg_is_port_valid(int port)
char * ast_print_namedgroups(struct ast_str **buf, struct ast_namedgroups *groups)
Print named call groups and named pickup groups.
#define CLI_ERROR(name, value, section)
static ast_mutex_t config_mutex
General jitterbuffer configuration.
Structure for mutex and tracking information.
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
#define ast_mutex_unlock(a)