pari: branch pari/dahdi_support r4319 - /team/pari/dahdi_support/config/js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Dec 9 12:44:54 CST 2008


Author: pari
Date: Tue Dec  9 12:44:53 2008
New Revision: 4319

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4319
Log:

 more progress on DAHDI support


Modified:
    team/pari/dahdi_support/config/js/index.js
    team/pari/dahdi_support/config/js/ringgroups.js
    team/pari/dahdi_support/config/js/trunks_analog.js
    team/pari/dahdi_support/config/js/trunks_digital.js
    team/pari/dahdi_support/config/js/users.js

Modified: team/pari/dahdi_support/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/index.js?view=diff&rev=4319&r1=4318&r2=4319
==============================================================================
--- team/pari/dahdi_support/config/js/index.js (original)
+++ team/pari/dahdi_support/config/js/index.js Tue Dec  9 12:44:53 2008
@@ -418,10 +418,13 @@
 			op = op.toLowerCase();
 
 			sessionData.DahdiChannelString = 'dahdichan' ;
+			sessionData.DahdiDeviceString = 'DAHDI' ;
+
 			sessionData.directories.app_DahdiScan = 'dahdi_scan > ' + sessionData.directories.asteriskConfig + ASTGUI.globals.dahdiScanOutput ;
 
 			if( op.contains('zaptel') ){
 				sessionData.DahdiChannelString = 'zapchan' ;
+				sessionData.DahdiDeviceString = 'Zap' ;
 				sessionData.directories.app_DahdiScan = 'ztscan > ' + sessionData.directories.asteriskConfig + ASTGUI.globals.dahdiScanOutput ;
 			} // else if( op.contains('dahdi') ){ }else if( op.contains('none') ){}
 

Modified: team/pari/dahdi_support/config/js/ringgroups.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/ringgroups.js?view=diff&rev=4319&r1=4318&r2=4319
==============================================================================
--- team/pari/dahdi_support/config/js/ringgroups.js (original)
+++ team/pari/dahdi_support/config/js/ringgroups.js Tue Dec  9 12:44:53 2008
@@ -126,6 +126,12 @@
 		window.location.reload();
 	};
 	parent.astgui_manageRingGroups.createNewRg( tmp_obj, later, RG_EDITING ) ;
+};
+
+
+var GetDevice_UserName( device ){ // device = SIP/6002 or Zap/1, or DAHDI/1 or IAX2/6001
+
+
 };
 
 

Modified: team/pari/dahdi_support/config/js/trunks_analog.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/trunks_analog.js?view=diff&rev=4319&r1=4318&r2=4319
==============================================================================
--- team/pari/dahdi_support/config/js/trunks_analog.js (original)
+++ team/pari/dahdi_support/config/js/trunks_analog.js Tue Dec  9 12:44:53 2008
@@ -21,7 +21,7 @@
 var zapchan_Before = '';
 var FXOS = [];
 var isNew ;
-var EDIT_TRUNK;
+var EDIT_TRUNK, DAHDICHANNELSTRING ;
 var VOLSETTINGS = {};
 var Electrical_Fields = ['busydetect', 'busycount', 'busypattern', 'ringtimeout', 'answeronpolarityswitch', 'hanguponpolarityswitch' , 'callprogress', 'progzone', 'usecallerid', 'cidstart', 'pulsedial', 'cidsignalling', 'flash', 'rxflash', 'mailbox'];
 
@@ -45,7 +45,7 @@
 	var c = parent.astgui_managetrunks.listOfAnalogTrunks();
 	c.each(function(item){
 		if(trunk && trunk == item ) return;
-		used = used.concat( ASTGUI.miscFunctions.chanStringToArray(parent.sessionData.pbxinfo['trunks']['analog'][item]['zapchan']) ) ;
+		used = used.concat( ASTGUI.miscFunctions.chanStringToArray(parent.sessionData.pbxinfo['trunks']['analog'][item][DAHDICHANNELSTRING]) ) ;
 	});
 	ASTGUI.domActions.unCheckAll( ch_chkbxClass );
 	ASTGUI.domActions.disableSelected(ch_chkbxClass, used);
@@ -78,8 +78,8 @@
 	_$('new_ATRNK_DIV_title').innerHTML = 'Edit Analog Trunk';
 	_$('new_ATRNK_addUpdateButton').innerHTML = 'Update';
 	disable_usedChannels(EDIT_TRUNK);
-	checkChannels( parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['zapchan'] );
-	zapchan_Before = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['zapchan'];
+	checkChannels( parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK][DAHDICHANNELSTRING] );
+	zapchan_Before = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK][DAHDICHANNELSTRING];
 	var ct = ASTGUI.contexts.TrunkDIDPrefix + EDIT_TRUNK ;
 	ASTGUI.updateFieldToValue( 'edit_trunkName' ,  parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK].getProperty('trunkname') );
 	getPreviousVolumeForChannelsofThisTrunk( EDIT_TRUNK );
@@ -151,7 +151,10 @@
 			window.location.reload();
 		};
 
-		var tmp_object = {'zapchan':scs , trunkname: trunk_name } ;
+		var tmp_object = {};
+		tmp_object[DAHDICHANNELSTRING] =  scs ;
+		tmp_object[trunkname] = trunk_name ;
+
 		Electrical_Fields.each(function(fld){
 			tmp_object[fld] = ASTGUI.getFieldValue( _$(fld) );
 		});
@@ -162,7 +165,7 @@
 	// just update the selected channels
 	(function(){
 		var x = new listOfSynActions('users.conf');
-			x.new_action('update', EDIT_TRUNK , 'zapchan', scs );
+			x.new_action('update', EDIT_TRUNK , DAHDICHANNELSTRING, scs );
 			x.new_action('delete', EDIT_TRUNK , 'gui_volume', '' );
 			x.new_action('delete', EDIT_TRUNK , 'gui_fxooffset', '' );
 			x.new_action('delete', EDIT_TRUNK , 'rxgain', '' );
@@ -191,7 +194,7 @@
 	var variablename =  ASTGUI.globals.obcidUsrPrefix + EDIT_TRUNK ;
 	ASTGUI.updateaValue({ file: 'extensions.conf', context: 'globals', variable: variablename , value: ASTGUI.getFieldValue('trunk_obcid') }) ;
 
-	parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['zapchan'] = scs;
+	parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK][DAHDICHANNELSTRING] = scs;
 	ASTGUI.feedback({msg:'Updated Analog trunk ', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
 	save_audioLevels( save_electrical );
 };
@@ -229,7 +232,7 @@
 			var newRow = DOM_table_ATRUNKS_list.insertRow(-1);
 			newRow.className = ((DOM_table_ATRUNKS_list.rows.length)%2==1)?'odd':'even';
 			addCell( newRow , { html: parent.sessionData.pbxinfo['trunks']['analog'][item]['trunkname'] });
-			addCell( newRow , { html: parent.sessionData.pbxinfo['trunks']['analog'][item]['zapchan'] } );
+			addCell( newRow , { html: parent.sessionData.pbxinfo['trunks']['analog'][item][DAHDICHANNELSTRING] } );
 			addCell( newRow , { html: tmp} );
 		});
 
@@ -253,6 +256,7 @@
 };
 
 var localajaxinit = function(){
+	DAHDICHANNELSTRING = parent.sessionData.DahdiChannelString;
 	if( parent.sessionData.PLATFORM.AA50_SKU.contains('800') ){
 		window.location.href= 'trunks_sps.html';
 		return;
@@ -309,7 +313,7 @@
 
 var getPreviousVolumeForChannelsofThisTrunk = function( trunk ){
 	var c = context2json({ filename:'users.conf' , context : trunk, usf:0 });
-	var channels = ASTGUI.miscFunctions.chanStringToArray( parent.sessionData.pbxinfo.trunks.analog[trunk]['zapchan'] ) ;
+	var channels = ASTGUI.miscFunctions.chanStringToArray( parent.sessionData.pbxinfo.trunks.analog[trunk][DAHDICHANNELSTRING] ) ;
 	if ( !channels.length ) return ;
 
 	VOLSETTINGS = {} ;
@@ -387,7 +391,7 @@
 
 
 var reset_calibration = function(){
-	var zc = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['zapchan'].split(',') ;
+	var zc = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK][DAHDICHANNELSTRING].split(',') ;
 	var x = new listOfActions('users.conf');
 		x.new_action('delete', EDIT_TRUNK , 'gui_volume', '' );
 		x.new_action('delete', EDIT_TRUNK , 'gui_fxooffset', '' );
@@ -427,7 +431,7 @@
 			ASTGUI.dialog.alertmsg('Finished Calibrating !! <BR> Click "Apply Changes" and restart your appliance ');
 		}
 	};
-	var zc = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['zapchan'] ;
+	var zc = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK][DAHDICHANNELSTRING] ;
 	var k = zc.split(',').join(' ') ;
 	parent.ASTGUI.dialog.waitWhile('Starting Calibration script ..');
 	var st = setTimeout(

Modified: team/pari/dahdi_support/config/js/trunks_digital.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/trunks_digital.js?view=diff&rev=4319&r1=4318&r2=4319
==============================================================================
--- team/pari/dahdi_support/config/js/trunks_digital.js (original)
+++ team/pari/dahdi_support/config/js/trunks_digital.js Tue Dec  9 12:44:53 2008
@@ -39,7 +39,7 @@
 			addCell( newRow , { html:'', width:'15px' });
 			addCell( newRow , { html: c[d]['trunkname'] });
 			addCell( newRow , { html: c[d]['signalling'] }); // 
-			addCell( newRow , { html: c[d]['zapchan'] });
+			addCell( newRow , { html: c[d][top.sessionData.DahdiChannelString] });
 			addCell( newRow , { html:''} );
 		}}
 

Modified: team/pari/dahdi_support/config/js/users.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/users.js?view=diff&rev=4319&r1=4318&r2=4319
==============================================================================
--- team/pari/dahdi_support/config/js/users.js (original)
+++ team/pari/dahdi_support/config/js/users.js Tue Dec  9 12:44:53 2008
@@ -192,7 +192,7 @@
 			addCell( newRow , { html: "<input type=checkbox  class='selected_extensions' value='"+ user +"'>" } );
 			addCell( newRow , { html: user } );
 			addCell( newRow , { html: ud.getProperty('fullname') || '--' } );
-			addCell( newRow , { html: ud.getProperty('zapchan') || '--' } );
+			addCell( newRow , { html: ud.getProperty(top.sessionData.DahdiChannelString) || '--' } );
 			addCell( newRow , { html: ( ud.getProperty('hassip').isAstTrue() ) ? 'Yes' : '--' , align:'center'} );
 			addCell( newRow , { html: ( ud.getProperty('hasiax').isAstTrue() ) ? 'Yes' : '--' , align:'center'} );
 
@@ -236,7 +236,7 @@
 			ASTGUI.updateFieldToValue( 'edit_email', uinfo.getProperty('email') );
 			ASTGUI.updateFieldToValue( 'edit_hasSip', uinfo.getProperty('hassip') );
 			ASTGUI.updateFieldToValue( 'edit_hasIax', uinfo.getProperty('hasiax') );
-			ASTGUI.updateFieldToValue( 'edit_fxs', uinfo.getProperty('zapchan') );
+			ASTGUI.updateFieldToValue( 'edit_fxs', uinfo.getProperty(top.sessionData.DahdiChannelString) );
 			ASTGUI.updateFieldToValue( 'edit_flash', uinfo.getProperty('flash') );
 			ASTGUI.updateFieldToValue( 'edit_rxflash', uinfo.getProperty('rxflash') );
 			// CODECS
@@ -270,7 +270,7 @@
 			ASTGUI.updateFieldToValue( 'edit_cti', uinfo.getProperty('hasmanager') );
 			ASTGUI.updateFieldToValue( 'edit_isagent', uinfo.getProperty('hasagent') );
 			ASTGUI.updateFieldToValue( 'edit_pickupgroup', uinfo.getProperty('pickupgroup') );
-			zapchan_Before = uinfo.getProperty('zapchan');
+			zapchan_Before = uinfo.getProperty(top.sessionData.DahdiChannelString);
 		}else{
 			_$('new_ext').disabled = false;
 			ASTGUI.updateFieldToValue( 'codec_one', 'ulaw' );
@@ -516,10 +516,10 @@
 					x.new_action('update', u, 'signalling', sg) ;					tmp_obj['signalling'] = sg ;
 					x.new_action('update', u, 'flash',  tmp_flash) ;				tmp_obj['flash'] = tmp_flash ;
 					x.new_action('update', u, 'rxflash', tmp_rxflash ) ;				tmp_obj['rxflash'] = tmp_rxflash ;
-					x.new_action('delete', u, 'zapchan', '') ;
-					x.new_action('append', u, 'zapchan', fs );					tmp_obj['zapchan'] = fs ;
+					x.new_action('delete', u, top.sessionData.DahdiChannelString , '' ) ;
+					x.new_action('append', u, top.sessionData.DahdiChannelString, fs );					tmp_obj[top.sessionData.DahdiChannelString] = fs ;
 				}else{
-					x.new_action('delete', u, 'zapchan', '') ;					tmp_obj['zapchan'] = '' ;
+					x.new_action('delete', u, top.sessionData.DahdiChannelString, '') ;					tmp_obj[top.sessionData.DahdiChannelString] = '' ;
 				}
 
 				var codecs = '';




More information about the asterisk-gui-commits mailing list