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
This commit is contained in:
Jeff Peeler
2008-06-12 17:27:55 +00:00
parent 6ac8ccaba4
commit ef3b214728
77 changed files with 2424 additions and 6049 deletions

View File

@@ -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, ",");