aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-12 19:08:20 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-12 19:08:20 +0000
commitf84b02a71d0968338c22758b24cc14e15e3864a4 (patch)
tree464a2032e05934a867493f45e5a2605929fceb8a /pbx
parentac54a25ad7440165f775131b2859ab56aa3c5a92 (diff)
Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should continue working. Release announcement to follow.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122314 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_config.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index 3d4a08c29..63f6c04f1 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -2361,7 +2361,7 @@ 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];
@@ -2397,11 +2397,21 @@ 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));
+ 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(zapcopy, dahdichan, sizeof(zapcopy));
c = zapcopy;
chan = strsep(&c, ",");
while (chan) {