pari: branch asterisknow r2837 - /branches/asterisknow/config/digital.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Apr 11 16:43:11 CDT 2008


Author: pari
Date: Fri Apr 11 16:43:10 2008
New Revision: 2837

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=2837
Log:
  * added 'E&M' signalling types - ABE-1449



Modified:
    branches/asterisknow/config/digital.html

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/digital.html?view=diff&rev=2837&r1=2836&r2=2837
==============================================================================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Fri Apr 11 16:43:10 2008
@@ -177,7 +177,7 @@
 
 function verify_priChLimit(){
 	var l = String(CURRENT_SPAN);
-	if(_$('editspan_signalling').value.beginsWith('fx')){ return true;}
+	if( !_$('editspan_signalling').value.beginsWith('pri')){ return true;}
 	var y = Number(_$('edit_DefinedChans').value);
 	if( Number(SPANS[l]['totchans'] ) <= 24 && y ==24){return false;}//alert("You should leave atleast 1 channel for PRI signalling");
 	if( Number(SPANS[l]['totchans'] ) > 24 && y ==31){return false;}//alert("You should leave atleast 1 channel for PRI signalling");
@@ -189,9 +189,8 @@
 	var z = Number(SPANS[l]['definedchans']);
 	if(z==1){return String(y);}
 
-	if( SPANS[l]['signalling'] && SPANS[l]['signalling'].beginsWith('fx') ){
-
-		return y + "-" + String(y+z-1);
+	if( SPANS[l]['signalling'] && !SPANS[l]['signalling'].beginsWith('pri') ){ // if is an fxo/fxs or e&m
+		return y + "-" + String(y+z);
 	}else{
 		if(SPANS[l]['totchans'] <= 24){ // if T1
 			return y + "-" + String(y+z-1);
@@ -320,7 +319,7 @@
 			ntd.innerHTML = '<B>' + SPANS[span]['location'] + ' --> ' + SPANS[span]['devicetype'] + '</B>';
 			newRow.appendChild(ntd);
 		}
-
+		var singalling_defs = {pri_net: 'PRI - Net', pri_cpe: 'PRI - CPE', em: 'E & M',em_w: 'E & M -- Wink', featd:'E & M -- featd(DTMF)', fxo_ks:'FXOKS', fxo_ls:'FXOLS'  };
 		var sno = tbl.rows.length + 1;
 		var newRow = tbl.insertRow(-1);
 		newRow.className = ((tbl.rows.length)%2==1)?"odd":"even";
@@ -350,7 +349,7 @@
 		newCell3.align = "center";
 
 		var newCell4 = newRow.insertCell(4);
-		newCell4.innerHTML = (SPANS[span]['signalling'])?SPANS[span]['signalling'] : "<font color=red>NOT DEFINED</font>" ;
+		newCell4.innerHTML = (SPANS[span]['signalling'])? singalling_defs[ SPANS[span]['signalling'] ] : "<font color=red>NOT DEFINED</font>" ;
 		newCell4.align = "center";
 
 
@@ -693,7 +692,7 @@
 function reloadpage(){ window.location.href="digital.html"; }
 
 function disablEnable_sc() {
-	if( _$('editspan_signalling').value.beginsWith('fx') ){
+	if( !_$('editspan_signalling').value.beginsWith('pri') ){
 		_$('editspan_switchtype').disabled =  true;
 		_$('editspan_switchtype').selectedIndex = -1;
 
@@ -838,7 +837,7 @@
 				e = asterisk_guiTDPrefix + d ;
 				uri += build_action('delcat', c, d , "", ""); c++;
 				uri += build_action('newcat', c, d , "", ""); c++;
-				if ( !SPANS[k]['signalling'].beginsWith('fx') ){ 
+				if ( SPANS[k]['signalling'].beginsWith('pri') ){ 
 					// we do not want a switchtype to be set for channelized T1/E1 interfaces
 					uri += build_action('update', c, d , "switchtype", SPANS[k]['switchtype']); c++;
 				}
@@ -847,6 +846,7 @@
 				uri += build_action('update', c, d , "trunkstyle", 'digital'); c++;
 				uri += build_action('update', c, d , "hassip", 'no'); c++;
 				uri += build_action('update', c, d , "hasiax", 'no'); c++;
+				uri += build_action('update', c, d , "hasexten", 'no'); c++;
 				uri += build_action('update', c, d , "group", NEWGROUPNUMBER ); c++;
 				if ( !SPANS[k]['signalling'].beginsWith('fxo') ){ 
 					// we do not want a context to be set for user stations
@@ -917,8 +917,12 @@
 				tmp3 = (dchanstring)? ",":"";
 
 				var ppp = calc_bchan_fxx(k);
-				if ( SPANS[k]['signalling'].beginsWith('fx') ){ 
-					var qqq = (SPANS[k]['signalling']).replace('_',''); // zaptel.conf uses fxoks instead of fxo_ks
+				if ( !SPANS[k]['signalling'].beginsWith('pri') ){
+					if(SPANS[k]['signalling'].beginsWith('fx')){
+						var qqq = (SPANS[k]['signalling']).replace('_',''); // zaptel.conf uses fxoks instead of fxo_ks
+					}else{
+						var qqq = 'e&m'; // if not a pri and not a fxo/s - assume e&m
+					}
 					if(fxx[ qqq ]){
 						fxx[ qqq ] = fxx[ qqq ] + "," + ppp;
 					}else{
@@ -1076,6 +1080,9 @@
 		<TD>	<select id="editspan_signalling" onChange="disablEnable_sc();">
 			<option value="pri_net">PRI - Net</option>
 			<option value="pri_cpe">PRI - CPE</option>
+			<option value="em">E & M</option>
+			<option value="em_w">E & M -- Wink</option>
+			<option value="featd">E & M -- featd(DTMF)</option>
 			<option value="fxo_ks">FXOKS</option>
 			<option value="fxo_ls">FXOLS</option>
 			<!--<option value="fxs_ks">FXSKS</option>




More information about the asterisk-gui-commits mailing list