rbrindley: branch 2.0 r4845 - /branches/2.0/config/js/hardware_dahdi.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jun 9 16:33:42 CDT 2009


Author: rbrindley
Date: Tue Jun  9 16:33:39 2009
New Revision: 4845

URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4845
Log:

- fixed an issue where the gui didn't read in framing/coding from system.conf


Modified:
    branches/2.0/config/js/hardware_dahdi.js

Modified: branches/2.0/config/js/hardware_dahdi.js
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/js/hardware_dahdi.js?view=diff&rev=4845&r1=4844&r2=4845
==============================================================================
--- branches/2.0/config/js/hardware_dahdi.js (original)
+++ branches/2.0/config/js/hardware_dahdi.js Tue Jun  9 16:33:39 2009
@@ -245,7 +245,7 @@
 	}
 
 	if(SPANS[l]['framing'] && SPANS[l]['coding']) {
-		if( SPANS[l]['framing'] == 'CCS/CRC4' ){
+		if( SPANS[l]['framing'] == 'CCS/HDB3' ){
 			ASTGUI.selectbox.selectOption( _$('editspan_fac') , 'CCS/HDB3/CRC4' );
 		}else{
 			ASTGUI.selectbox.selectOption( _$('editspan_fac') , SPANS[l]['framing'] + '/' + SPANS[l]['coding'] );
@@ -616,6 +616,41 @@
 						var y = ASTGUI.parseContextLine.read(line)[1] ;
 						var span_no = y.split(',')[0];
 						var src_span = y.split(',')[1];
+						switch(true) {
+						case y.contains('ccs,hdb3,crc4'):
+							var framing = 'CCS';
+							var coding = 'HDB3/CRC4';
+							break;
+						case (y.contains('ccs,hdb3') && !y.contains('ccs,hdb3,crc4')):
+							var framing = 'CCS';
+							var coding = 'HDB3';
+							break;
+						case y.contains('ccs,ami'):
+							var framing = 'CCS';
+							var coding = 'AMI';
+							break;
+						case y.contains('d4,b8zs'):
+							var framing = 'D4';
+							var coding = 'B8ZS';
+							break;
+						case y.contains('esf,ami'):
+							var framing = 'ESF';
+							var coding = 'AMI';
+							break;
+						case y.contains('d4,ami'):
+							var framing = 'D4';
+							var coding = 'AMI';
+							break;
+						case y.contains('esf,b8zs'):
+							var framing = 'esf';
+							var coding = 'b8zs';
+							break;
+						default:
+							var framing = '';
+							var coding = '';
+						}
+						SPANS[span_no]['framing'] = framing;
+						SPANS[span_no]['coding'] = coding;
 						if(SPANS[span_no]){ SPANS[span_no]['syncsrc'] = src_span; }
 					}
 					}catch(err){}




More information about the asterisk-gui-commits mailing list