]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
document dahdichanname option in doc/asterisk-conf.txt
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 13 Aug 2008 20:33:47 +0000 (20:33 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 13 Aug 2008 20:33:47 +0000 (20:33 +0000)
make chan_dahdi read its configuration from zapata.conf if dahdichanname has been set to 'no'

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137527 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c
doc/asterisk-conf.txt

index b85e0ab38a22e9b8c7e7452d25a3ab4715689882..33a0ccef748349296239bc28e8b4a3f33b4e679e 100644 (file)
@@ -11470,16 +11470,23 @@ static int setup_dahdi(int reload)
 #endif
 
 #ifdef HAVE_ZAPTEL
-       if (!(cfg = ast_config_load("zapata.conf"))) {
-               ast_log(LOG_ERROR, "Unable to load zapata.conf\n");
-               return 0;
-       }
+       int load_from_zapata_conf = 1;
 #else
-       if (!(cfg = ast_config_load("chan_dahdi.conf"))) {
-               ast_log(LOG_ERROR, "Unable to load chan_dahdi.conf\n");
-               return 0;
-       }
+       int load_from_zapata_conf = (dahdi_chan_mode == CHAN_ZAP_MODE);
 #endif
+
+       if (load_from_zapata_conf) {
+               if (!(cfg = ast_config_load("zapata.conf"))) {
+                       ast_log(LOG_ERROR, "Unable to load zapata.conf\n");
+                       return 0;
+               }
+       } else {
+               if (!(cfg = ast_config_load("chan_dahdi.conf"))) {
+                       ast_log(LOG_ERROR, "Unable to load chan_dahdi.conf\n");
+                       return 0;
+               }
+       }
+
        /* It's a little silly to lock it, but we mind as well just to be sure */
        ast_mutex_lock(&iflock);
 #ifdef HAVE_PRI
index 9b4fb3e8b566c6dc135ba884bf970f2ff4b74ae6..93c92d68063c687e6600b13c03729c89bdaacd80 100644 (file)
@@ -68,7 +68,13 @@ systemname = <a_string>                              ; System name. Used to prefix CDR uniqueid and to fil
 languageprefix = yes | no                      ; Should language code be last component of sound file name or first?
                                                ; when off, sound files are searched as <path>/<lang>/<file>
                                                ; when on, sound files are search as <lang>/<path>/<file>
-                                               ; (only affects relative paths for sound files)
+                                               ; (only affects
+                                               relative paths for
+                                               sound files)
+dahdichanname = yes | no                       ; Should channels created by chan_dahdi be called 'DAHDI' or 'Zap';
+                                               ; defaults to 'DAHDI' if built against DAHDI, and 'Zap' if built
+                                               ; against Zaptel; also used by other applications so that they will
+                                               ; know what channel name to expect
 
 [files]
 ; Changing the following lines may compromise your security