[asterisk-commits] kpfleming: branch 1.4 r137527 - in /branches/1.4: channels/ doc/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 13 15:33:48 CDT 2008


Author: kpfleming
Date: Wed Aug 13 15:33:47 2008
New Revision: 137527

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137527
Log:
document dahdichanname option in doc/asterisk-conf.txt

make chan_dahdi read its configuration from zapata.conf if dahdichanname has been set to 'no'


Modified:
    branches/1.4/channels/chan_dahdi.c
    branches/1.4/doc/asterisk-conf.txt

Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=137527&r1=137526&r2=137527
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Wed Aug 13 15:33:47 2008
@@ -11470,16 +11470,23 @@
 #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;
-	}
-#endif
+	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

Modified: branches/1.4/doc/asterisk-conf.txt
URL: http://svn.digium.com/view/asterisk/branches/1.4/doc/asterisk-conf.txt?view=diff&rev=137527&r1=137526&r2=137527
==============================================================================
--- branches/1.4/doc/asterisk-conf.txt (original)
+++ branches/1.4/doc/asterisk-conf.txt Wed Aug 13 15:33:47 2008
@@ -68,7 +68,13 @@
 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




More information about the asterisk-commits mailing list