summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2008-06-12 17:27:55 +0000
committerJeff Peeler <jpeeler@digium.com>2008-06-12 17:27:55 +0000
commitef3b21472889eff8e88f7e83afb2251ef54722ce (patch)
tree4732aea57767a39cd0efe083ba0119911ee976a3 /pbx
parent6ac8ccaba45c9c11fefe853d0c83a92e881c2abf (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: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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, ",");