List Info

Thread: pari: branch asterisknow r2040 - /branches/asterisknow/config/digital.html




pari: branch asterisknow r2040 - /branches/asterisknow/config/digital.htm l
user name
2007-12-26 15:30:36
Author: pari
Date: Wed Dec 26 15:30:36 2007
New Revision: 2040

URL: http://svn.digium.com/view/asterisk-gui?view=rev&am
p;rev=2040
Log:
now that should detect if the card is switched between T1/E1
modes

Modified:
    branches/asterisknow/config/digital.html

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branc
hes/asterisknow/config/digital.html?view=diff&rev=2040&a
mp;r1=2039&r2=2040
============================================================
==================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Wed Dec 26
15:30:36 2007
 -146,11
+146,11 
 	var configured_devices = [];
 	var detected_devices = [];
 	for( var l in CONFIGUREDHARDWARE ){
if(CONFIGUREDHARDWARE.hasOwnProperty(l)){ 
-		configured_devices.push( CONFIGUREDHARDWARE[l]['device']
+ '::' + CONFIGUREDHARDWARE[l]['basechan'] ); 
-		// this way we can check for whether both device and the
basechan are matching in one go
+		configured_devices.push( CONFIGUREDHARDWARE[l]['device']
+ '::' + CONFIGUREDHARDWARE[l]['basechan'] + '::' +
CONFIGUREDHARDWARE[l]['type'] ); 
+		// this way we can check for whether 'device' and
'basechan' and 'type' all matched in one go
 	}}
 	for( var l in DETECTEDHARDWARE ){
if(DETECTEDHARDWARE.hasOwnProperty(l)){ 
-		detected_devices.push( DETECTEDHARDWARE[l]['device'] +
'::' + DETECTEDHARDWARE[l]['basechan']  ); 
+		detected_devices.push( DETECTEDHARDWARE[l]['device'] +
'::' + DETECTEDHARDWARE[l]['basechan'] + '::' +
DETECTEDHARDWARE[l]['type']  ); 
 	}}
 	configured_devices.sort(); detected_devices.sort();
 	if( !configured_devices.length &&
!detected_devices.length){ return false; }
 -458,8
+458,10 
 					DETECTEDHARDWARE[ n[l]['location'] ] = {};
 					DETECTEDHARDWARE[ n[l]['location'] ]['device'] =
n[l]['devicetype'];
 					DETECTEDHARDWARE[ n[l]['location'] ]['basechan'] =
n[l]['basechan'];
+					DETECTEDHARDWARE[ n[l]['location'] ]['type'] =
n[l]['type'] ;
 					continue;
-				} // in this page, we care only about digital spans
+				} // in this page, we care only about digital spans 
+				//  note: function detectHwChanges checks if there are
any changes in analog ports detected
 				SPANS[l] = {};
 				for( var k in n[l] ){ if(n[l].hasOwnProperty(k)){ 
 					SPANS[l][k] = n[l][k]; // store all the other fields
in spans[l]
 -467,6
+469,7 
 						DETECTEDHARDWARE[ n[l]['location'] ] = {};
 						DETECTEDHARDWARE[ n[l]['location'] ]['device'] =
n[l]['devicetype'];
 						DETECTEDHARDWARE[ n[l]['location'] ]['basechan'] =
n[l]['basechan'];
+						DETECTEDHARDWARE[ n[l]['location'] ]['type'] =
n[l]['type'];
 					}
 					if( k == 'totchans' ){
 						SPANS[l]['spantype'] = n[l]['type'].split('-')[1]; //
part after '-' in 'digital-T1' or 'digital-E1'
 -663,6
+666,7 
 				uri += build_action('newcat', c, g , "",
""); c++;
 				uri += build_action('update', c, g ,
"device", DETECTEDHARDWARE[g]['device'] ); c++;
 				uri += build_action('update', c, g ,
"basechan", DETECTEDHARDWARE[g]['basechan'] );
c++;
+				uri += build_action('update', c, g , "type",
DETECTEDHARDWARE[g]['type'] ); c++;
 			}}
 
 			makerequest('u', hwcfgfile, uri , function(t) {


_______________________________________________
--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 )