aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 18:08:09 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 18:08:09 +0000
commit2f30a3a6e7ae5721ed086155a63f22c33c495382 (patch)
treef7eb76f243ca169acc08d6d90b25b1c191e421e3 /pbx
parent2ee27fd87f55632e832d749c5fe6739a68aeb913 (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/branches/1.6.0@123332 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 f1e000163..573b88fcb 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1532,11 +1532,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;
@@ -1569,12 +1569,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) {
@@ -1591,7 +1601,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, ",");