aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-12 17:27:55 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-12 17:27:55 +0000
commit490730a6b3bd90a5389cac88847e6977bf234f66 (patch)
tree4732aea57767a39cd0efe083ba0119911ee976a3 /pbx
parentb97df61759759251c094187317c450b97088eeaf (diff)
Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122234 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_config.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index a10978b36..dddd8ef5c 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1548,11 +1548,11 @@ static void pbx_load_users(void)
{
struct ast_config *cfg;
char *cat, *chan;
- const char *zapchan;
+ const char *dahdichan;
const char *hasexten;
char tmp[256];
char iface[256];
- char zapcopy[256];
+ char dahdicopy[256];
char *c;
int len;
int hasvoicemail;
@@ -1585,12 +1585,22 @@ static void pbx_load_users(void)
if (hasexten && !ast_true(hasexten))
continue;
hasvoicemail = ast_true(ast_config_option(cfg, cat, "hasvoicemail"));
- zapchan = ast_variable_retrieve(cfg, cat, "zapchan");
- if (!zapchan)
- zapchan = ast_variable_retrieve(cfg, "general", "zapchan");
- if (!ast_strlen_zero(zapchan)) {
- ast_copy_string(zapcopy, zapchan, sizeof(zapcopy));
- c = zapcopy;
+ dahdichan = ast_variable_retrieve(cfg, cat, "dahdichan");
+ if (!dahdichan)
+ dahdichan = ast_variable_retrieve(cfg, "general", "dahdichan");
+ if (!dahdichan) {
+ /* no dahdichan, but look for zapchan too */
+ dahdichan = ast_variable_retrieve(cfg, cat, "zapchan");
+ if (!dahdichan) {
+ dahdichan = ast_variable_retrieve(cfg, "general", "zapchan");
+ }
+ if (!ast_strlen_zero(dahdichan)) {
+ ast_log(LOG_WARNING, "Use of zapchan in users.conf is deprecated. Please update configuration to use dahdichan instead.\n");
+ }
+ }
+ if (!ast_strlen_zero(dahdichan)) {
+ ast_copy_string(dahdicopy, dahdichan, sizeof(dahdicopy));
+ c = dahdicopy;
chan = strsep(&c, ",");
while (chan) {
if (sscanf(chan, "%d-%d", &start, &finish) == 2) {
@@ -1607,7 +1617,7 @@ static void pbx_load_users(void)
start = x;
}
for (x = start; x <= finish; x++) {
- snprintf(tmp, sizeof(tmp), "Zap/%d", x);
+ snprintf(tmp, sizeof(tmp), "DAHDI/%d", x);
append_interface(iface, sizeof(iface), tmp);
}
chan = strsep(&c, ",");