diff options
author | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-15 10:52:30 +0000 |
---|---|---|
committer | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-15 10:52:30 +0000 |
commit | dddee33fc2d7d081a4c148e1eb16ba3d07c8bb65 (patch) | |
tree | 38c5205acaaa4eab9c7451cdc3e24c5ac2baee58 /channels/chan_misdn_config.c | |
parent | ff1128542c5d971c4bf896d904e204f2cf762ad9 (diff) |
* Added mISDN/mISDNuser Echo cancel Patch
* Fixed Makefiles so that chan_misdn can be compiled again
* added some hints, that mISDN cannot be compiled against gcc-4, SMP, Spinlock Debug
* fixed some Minor issues in chan_misdn, regarding Type Of Number and Presentation
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7490 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn_config.c')
-rw-r--r-- | channels/chan_misdn_config.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/channels/chan_misdn_config.c b/channels/chan_misdn_config.c index f8e494127..26598717c 100644 --- a/channels/chan_misdn_config.c +++ b/channels/chan_misdn_config.c @@ -29,6 +29,7 @@ #include <stdlib.h> #include <stdio.h> +#include <string.h> #include "chan_misdn_config.h" @@ -59,7 +60,8 @@ struct port_config { char *language; char *callerid; char *method; - int *dialplan; + int *dialplan; + int *localdialplan; char *nationalprefix; char *internationalprefix; int *pres; @@ -151,6 +153,7 @@ static void free_port_cfg (void) { FREE_ELEM(callerid); FREE_ELEM(method); FREE_ELEM(dialplan); + FREE_ELEM(localdialplan); FREE_ELEM(nationalprefix); FREE_ELEM(internationalprefix); FREE_ELEM(pres); @@ -277,6 +280,8 @@ void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void *buf, int bufsiz break; case MISDN_CFG_DIALPLAN: GET_PORTCFG_MEMCPY(dialplan); break; + case MISDN_CFG_LOCALDIALPLAN: GET_PORTCFG_MEMCPY(localdialplan); + break; case MISDN_CFG_NATPREFIX: GET_PORTCFG_STRCPY(nationalprefix); break; case MISDN_CFG_INTERNATPREFIX: @@ -534,6 +539,8 @@ void misdn_cfg_get_config_string(int port, enum misdn_cfg_elements elem, char* b break; case MISDN_CFG_DIALPLAN: GET_CFG_INT(DIALPLAN, dialplan); break; + case MISDN_CFG_LOCALDIALPLAN: GET_CFG_INT(LOCALDIALPLAN, localdialplan); + break; case MISDN_CFG_NATPREFIX: GET_CFG_STRING(NATIONALPREFIX, nationalprefix); break; case MISDN_CFG_INTERNATPREFIX: @@ -812,6 +819,7 @@ static void build_port_config(struct ast_variable *v, char *cat) { } PARSE_CFG_STR(context); PARSE_CFG_INT(dialplan); + PARSE_CFG_INT(localdialplan); PARSE_CFG_STR(nationalprefix); PARSE_CFG_STR(internationalprefix); PARSE_CFG_STR(language); @@ -963,6 +971,8 @@ static void fill_defaults (void) { } if (!port_cfg[0]->dialplan) port_cfg[0]->dialplan = (int *)calloc(1, sizeof(int)); + if (!port_cfg[0]->localdialplan) + port_cfg[0]->localdialplan = (int *)calloc(1, sizeof(int)); if (!port_cfg[0]->nationalprefix) { port_cfg[0]->nationalprefix = (char *)malloc(2 * sizeof(char)); sprintf(port_cfg[0]->nationalprefix, "0"); |