List Info

Thread: bkruse: branch 1.4 r1637 - in /branches/1.4: config/ scripts/




bkruse: branch 1.4 r1637 - in /branches/1.4: config/ scripts/
user name
2007-10-05 12:35:14
Author: bkruse
Date: Fri Oct  5 12:35:13 2007
New Revision: 1637

URL: http://svn.digium.com/view/asterisk-gui?view=rev&am
p;rev=1637
Log:
Pari is rewriting the digital page, so I figured i would
give him what I have so far...

Added:
    branches/1.4/scripts/editzap.sh
Modified:
    branches/1.4/config/digital.html

Modified: branches/1.4/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/
config/digital.html?view=diff&rev=1637&r1=1636&r
2=1637
============================================================
==================
--- branches/1.4/config/digital.html (original)
+++ branches/1.4/config/digital.html Fri Oct  5 12:35:13
2007
 -135,6
+135,7 
 var widgets = {};
 var zap_settings = [ 'switchtype', 'signalling',
'echocancel', 'echocancelwhenbridged', 'rxgain', 'txgain',
'group' ]; 
 var fieldnames_clickable = [ 'fac', 'lbo', 'syncsrc',
'totchans' ]; 
+var fieldnames_clickable_zap = [ 'fac', 'syncsrc',
'totchans' ]; 
 var fieldnames = [ 'alarms', 'syncsrc', 'description',
'totchans', 'fac', 'lbo' ]; 
 var fieldnames_proper = [ 'Alarms:', 'Sync Source:', 'Card
Description:', 'Total Channels:', 'Framing/Coding:',
'Options:' ]; 
 var fieldnames_zap_opts = [ 'loadzone', 'defaultzone'];
 -409,10
+410,10 
 	for(var i=1; i <= total_spans; i++ ){
 		ZAPTEL[i] = new Object;
 		ZAPTEL[i].en = new Array;
-		for(var x=0; x < fieldnames_clickable.length; x++) {
-			var tmp_id = i+'-'+fieldnames_clickable[x]+'-sel';
+		for(var x=0; x < fieldnames_clickable_zap.length; x++)
{
+			var tmp_id = i+'-'+fieldnames_clickable_zap[x]+'-sel';
 			var tmp_b = _$(tmp_id);
-			ZAPTEL[i].en[fieldnames_clickable[x]] =
tmp_b.options[tmp_b.selectedIndex].value;
+			ZAPTEL[i].en[fieldnames_clickable_zap[x]] =
tmp_b.options[tmp_b.selectedIndex].value;
 		//	alert("showing val for span " + i + "
for val: " + fieldnames_clickable[x] + " is :
" + ZAPTEL[i].en[fieldnames_clickable[x]]);
 		}
 		ZAPTEL[i].en['config'] =
"span="+i+","+ZAPTEL[i].en['syncsrc']+&q
uot;,"+ZAPTEL[i].en['lbo']+","+ZAPTEL[i].en['
fac'];

Added: branches/1.4/scripts/editzap.sh
URL: http://svn.digium.
com/view/asterisk-gui/branches/1.4/scripts/editzap.sh?view=a
uto&rev=1637
============================================================
==================
--- branches/1.4/scripts/editzap.sh (added)
+++ branches/1.4/scripts/editzap.sh Fri Oct  5 12:35:13
2007
 -1,0
+1,47 
+#!/bin/bash
+
+###########################################################
#########
+####	Copyright Brandon Kruse <bkrusedigium.com> && Digium	####
+###########################################################
#########
+
+# Quick script for applying zaptel settings from the GUI.
+
+ZAPCONF="/etc/zaptel.conf"
+ZTCFG_OUTPUT="/var/lib/asterisk/static-http/config/ztc
fg_output.html"
+
+# Note: Changing modules requires sed
+if [ $(which sed) == "" ] ; then
+	error_out("Sed not installed, needed to reload
modules, you can do it manually by forcing the modules in
via t1e1override")
+fi
+
+case $ in
+	changemodes)
+		type=$
+		$(for i in `lsmod | grep zap| sed 's/,/ /g'`; do rmmod $i
>> /dev/null; done; rmmod zaptel) 
+		case $ in
+			e1)
+				t1e1override=0
+				$(modprobe zaptel; modprobe zttranscode; modprobe
wct4xxp t1e1override=0; modprobe wcte11xp t1e1override=0;
modprobe wct1xxp t1e1override=0; ztcfg)
+			;;
+			t1)
+				t1e1override=1		
+				$(modprobe zaptel; modprobe zttranscode; modprobe
wct4xxp t1e1override=1; modprobe wcte11xp t1e1override=1;
modprobe wct1xxp t1e1override=1; ztcfg)
+			;;
+			*)
+				error_out("No mode to change specified!")
+			;;
+		esac	
+		;;
+	applysettings)	
+		# Split based on ||| delimeter, and apply to zaptel.
+		blob=`echo $ | sed 's/|||/n/g'`
+		mv $ $.b4editzap
+		cmd=`zapscan`
+		echo "$" >> /etc/zaptel.conf
+		ztcfg -vv 2> $ZTCFG_OUTPUT
+		;;
+esac
+
+function error_out() {
+	echo "$" > $
+}


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.c
om--

asterisk-gui-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-g
ui-commits

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )