[svn-commits] tzafrir: branch 1.4 r3566 - /branches/1.4/live_zap

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 27 14:35:27 CST 2007


Author: tzafrir
Date: Thu Dec 27 14:35:26 2007
New Revision: 3566

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3566
Log:
* Some extra hooks to echo canceller modules.
* Give harware modules detection^guessing a chance.

Modified:
    branches/1.4/live_zap

Modified: branches/1.4/live_zap
URL: http://svn.digium.com/view/zaptel/branches/1.4/live_zap?view=diff&rev=3566&r1=3565&r2=3566
==============================================================================
--- branches/1.4/live_zap (original)
+++ branches/1.4/live_zap Thu Dec 27 14:35:26 2007
@@ -13,9 +13,35 @@
 
 # Manual list of modules. They will be loaded by insmod.
 # If reside in a subdir, add it explicitly.
-MODULES_LOAD="zaptel xpp/xpp xpp/xpd_fxs xpp/xpd_fxo xpp/xpp_usb"
+
+MODULES_LOAD="zaptel"
+
+# this one *is* resolved recusively. 
+# the only reason to set a different value is if you use hpec / oslec,
+# as Zaptel depends on them.
+REMOVE_MODULES="zaptel"
 
 if [ -r $DESTDIR/live.conf ]; then . $DESTDIR/live.conf; fi
+
+# Detect the modules used in the system:
+for mod in `xpp/utils/zaptel_modules`; do
+	case "$mod" in
+		xpp_usb) 
+			MODULES_LOAD="$MODULES_LOAD xpp/xpp xpp/xpd_fxs"
+			MODULES_LOAD="$MODULES_LOAD xpp/xpd_fxo xpp/xpd_pri" 
+			MODULES_LOAD="$MODULES_LOAD xpp/xpp_usb"
+			;;
+		wctdm24xxp | wct4xxp | wcte12xp | wctc4xp)
+			MODULES_LOAD="$MODULES_LOAD $mod/$mod"
+			;;
+		wanpipe)
+			: # requires different handling
+			;;
+		*)
+			MODULES_LOAD="$MODULES_LOAD $mod"
+			;;
+	esac
+done
 
 # Initialize the Xorcom Astribank (xpp/) using perl utiliites:
 # intended to replace all the the three functions below if user has 
@@ -102,7 +128,9 @@
 	;;
 unload)
 	$AST_SCRIPT stop
-	unload_module zaptel
+	for mod in $REMOVE_MODULES; do
+		unload_module $mod
+	done
 	;;
 load)
 	# TODO: Find a way to use modprobe.




More information about the svn-commits mailing list