pari: branch 2.0 r3812 - in /branches/2.0/config: ./ js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Sep 11 22:40:17 CDT 2008


Author: pari
Date: Thu Sep 11 22:40:16 2008
New Revision: 3812

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

 Merging 'Feature Codes & Application Maps' from private branch.



Added:
    branches/2.0/config/features.html
      - copied, made public unchanged from r3811, team/pari/private/tmp_featurecodes/config/features.html
Removed:
    branches/2.0/config/callparking.html
Modified:
    branches/2.0/config/index.html
    branches/2.0/config/js/pbx.js
    branches/2.0/config/networking.html
    branches/2.0/config/preferences.html
    branches/2.0/config/sip.html
    branches/2.0/config/voicemail.html
    branches/2.0/config/welcome.html

Copied: branches/2.0/config/features.html (from r3811, team/pari/private/tmp_featurecodes/config/features.html)
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/features.html?view=diff&rev=3812&p1=team/pari/private/tmp_featurecodes/config/features.html&r1=3811&p2=branches/2.0/config/features.html&r2=3812
==============================================================================
--- team/pari/private/tmp_featurecodes/config/features.html (original)
+++ branches/2.0/config/features.html Thu Sep 11 22:40:16 2008
@@ -1,0 +1,430 @@
+<!--
+ * Asterisk-GUI	- an Asterisk configuration interface
+ *
+ * CallParking Preferences
+ *
+ * Copyright (C) 2007-2008, Digium, Inc.
+ *
+ * Pari Nannapaneni <pari at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
+<script src="js/jquery.js"></script>
+<script src="js/astman.js"></script>
+<script src="js/jquery.tooltip.js"></script>
+<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+<style type="text/css">
+	#Table_applicationMap_definitions {
+		border: 1px solid #666666;
+		margin-top: 5px;
+		margin-bottom:10px;
+		width: 96%;
+		text-align: center;
+		padding : 1px;
+	}
+	#Table_applicationMap_definitions tr.frow { background: #6b79a5; color: #CED7EF; }
+	#Table_applicationMap_definitions tr.frow td{ font-weight:bold; }
+	#Table_applicationMap_definitions tr td{ padding : 3px; }
+	#Table_applicationMap_definitions tr.even { background: #DFDFDF; }
+	#Table_applicationMap_definitions tr.odd{ background: #FFFFFF; }
+	/*#Table_applicationMap_definitions tr.even:hover, #Table_applicationMap_definitions tr.odd:hover {
+		background: #a8b6e5;
+		cursor: default;
+	}*/
+
+</style>
+<script>
+var ct = 'general';
+var FM = 'featuremap';
+var AP_MAP_TRID = 'TR_APMAP_';
+var ENABLED_APPS = [];
+
+var ApplicationMap = {};
+var APPS_LIST = [ "Answer", "Background", "Busy", "Congestion", "DigitTimeout", "DISA", "ResponseTimeout", "Playback" , "Wait", "WaitExten", "Hangup" ];
+
+var do_new_ApplicationMap_row = function(){
+	var TBL = _$('Table_applicationMap_definitions');
+	create_new_AppMap_tr(TBL.rows.length, '');
+};
+
+var create_new_AppMap_tr = function( appNumber , featureName){
+	if(featureName){
+		var tmp_fields = ApplicationMap[featureName].split(',') ;
+	}else{
+		featureName = '';
+		var tmp_fields = [ '','self', '' , ''] ;
+	}
+
+	var TBL = _$('Table_applicationMap_definitions');
+	var newRow = TBL.insertRow(-1);
+	newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
+	newRow.id = AP_MAP_TRID + String(appNumber) ;
+	
+	var C1 = document.createElement('input');
+	C1.type = 'checkbox';
+	C1.className = 'textbox_feature_CheckBox' ;
+	C1.checked = ( ENABLED_APPS.contains(featureName) ) ? true : false ;
+	var newcell = newRow.insertCell( newRow.cells.length );
+	newcell.appendChild( C1 );
+	
+	var CA = document.createElement('input');
+	CA.type = 'text';
+	CA.className = 'textbox_featurename' ;
+	CA.size = 10 ;
+	ASTGUI.updateFieldToValue( CA , featureName );
+	var newcell = newRow.insertCell( newRow.cells.length );
+	newcell.appendChild( CA );
+
+	var CB = document.createElement('input');
+	CB.type = 'text';
+	CB.className = 'textbox_dialstr' ;
+	CB.size = 2 ;
+	ASTGUI.updateFieldToValue( CB , tmp_fields[0] );
+	var newcell = newRow.insertCell( newRow.cells.length );
+	newcell.appendChild( CB );
+
+	var CC = document.createElement('select');
+	CC.className = 'textbox_activeOnBy' ;
+	var newcell = newRow.insertCell( newRow.cells.length );
+	newcell.appendChild( CC );
+	ASTGUI.selectbox.populateArray(CC,[
+		{optionText:'self', optionValue:'self'}, {optionText:'peer', optionValue:'peer'} ,
+		{optionText:'self/caller', optionValue:'self/caller'}, {optionText:'peer/caller', optionValue:'peer/caller'} ,
+		{optionText:'self/callee', optionValue:'self/callee'}, {optionText:'peer/callee', optionValue:'peer/callee'} ,
+		{optionText:'self/both', optionValue:'self/both'}, {optionText:'peer/both', optionValue:'peer/both'}
+	]);
+	ASTGUI.updateFieldToValue( CC , tmp_fields[1] );
+
+	var CD = document.createElement('input');
+	CD.type = 'text';
+	CD.className = 'textbox_appName' ;
+	CD.size = 20 ;
+	ASTGUI.updateFieldToValue( CD , tmp_fields[2] );
+	ASTGUI.COMBOBOX.call( CD , APPS_LIST , 195 );
+
+	var newcell = newRow.insertCell( newRow.cells.length );
+	newcell.appendChild( CD );
+
+	var CE = document.createElement('input');
+	CE.type = 'text';
+	CE.className = 'textbox_appArgs' ;
+	CE.size = 10 ;
+	ASTGUI.updateFieldToValue( CE , tmp_fields[3] );
+	var newcell = newRow.insertCell( newRow.cells.length );
+	newcell.appendChild( CE );
+};
+
+
+var generate_applicationMap_TRs = function(){
+	var TBL = _$('Table_applicationMap_definitions');
+	var addCell = ASTGUI.domActions.tr_addCell;
+	(function(){ // add first row
+		var newRow = TBL.insertRow(-1);
+		newRow.className = "frow";
+		
+		addCell( newRow , { html:'Enabled' } );
+		addCell( newRow , { html:'Feature Name'} );
+		addCell( newRow , { html:'Digits'} );
+		addCell( newRow , { html:'ActiveOn/By'} );
+		addCell( newRow , { html:'App Name'} );
+		addCell( newRow , { html:'Arguments'} );
+	})();
+
+	var apps = 0;
+	for(var featureName in ApplicationMap){
+		if( !ApplicationMap.hasOwnProperty(featureName) ){ continue}
+		create_new_AppMap_tr( TBL.rows.length , featureName);
+	}
+};
+
+
+var load_preferences = function(){
+
+	(function(){
+		var c = context2json({ filename:'extensions.conf' , context: 'globals', usf: 1 });
+		var DIAL_OPS = ( c.hasOwnProperty('DIALOPTIONS') ) ? c['DIALOPTIONS'] : '' ;
+		if( c.hasOwnProperty('FEATURES') && c['FEATURES'].length )
+		ENABLED_APPS = c['FEATURES'].split('#');
+
+		_$('dialoptions_t').checked = (DIAL_OPS.contains('t')) ? true : false ;
+		_$('dialoptions_T').checked = (DIAL_OPS.contains('T')) ? true : false ;
+		_$('dialoptions_h').checked = (DIAL_OPS.contains('h')) ? true : false ;
+		_$('dialoptions_H').checked = (DIAL_OPS.contains('H')) ? true : false ;
+		_$('dialoptions_k').checked = (DIAL_OPS.contains('k')) ? true : false ;
+		_$('dialoptions_K').checked = (DIAL_OPS.contains('K')) ? true : false ;
+		
+	})();
+
+	var c = config2json({filename:'features.conf', usf:1});
+	if( !c.hasOwnProperty(ct) || !c.hasOwnProperty(FM) || !c.hasOwnProperty('applicationmap') ){
+		var u = new listOfSynActions('features.conf');
+		if( !c.hasOwnProperty(ct) ) {
+			u.new_action('newcat', ct, '', '');
+		}
+		if( !c.hasOwnProperty(FM) ) {
+			u.new_action('newcat', FM, '', '');
+		}
+		if( !c.hasOwnProperty('applicationmap') ) {
+			u.new_action('newcat', 'applicationmap', '', '');
+		}
+		u.callActions();
+		window.location.reload();
+		return;
+	}
+
+	ApplicationMap = c['applicationmap'] ;
+
+	ASTGUI.updateFieldToValue( 'featureMap_blindxfer' , c[FM].getProperty('blindxfer') );
+	ASTGUI.updateFieldToValue( 'featureMap_disconnect' , c[FM].getProperty('disconnect') );
+	ASTGUI.updateFieldToValue( 'featureMap_atxfer' , c[FM].getProperty('atxfer') );
+
+	ASTGUI.updateFieldToValue( 'parkext' , c[ct].getProperty('parkext') );
+	ASTGUI.updateFieldToValue( 'parkpos' , c[ct].getProperty('parkpos') );
+	ASTGUI.updateFieldToValue( 'parkingtime' , c[ct].getProperty('parkingtime') );
+
+	ASTGUI.domActions.enableDisableByCheckBox ('chk_featureMap_blindxfer',  'featureMap_blindxfer');
+	ASTGUI.domActions.enableDisableByCheckBox ('chk_featureMap_disconnect', 'featureMap_disconnect');
+	ASTGUI.domActions.enableDisableByCheckBox ('chk_featureMap_atxfer', 'featureMap_atxfer');
+
+	_$('chk_featureMap_blindxfer').checked = ( ASTGUI.getFieldValue('featureMap_blindxfer') ) ? true : false ;
+	_$('chk_featureMap_blindxfer').updateStatus();
+	_$('chk_featureMap_disconnect').checked = ( ASTGUI.getFieldValue('featureMap_disconnect') ) ? true : false ;
+	_$('chk_featureMap_disconnect').updateStatus();
+	_$('chk_featureMap_atxfer').checked = ( ASTGUI.getFieldValue('featureMap_atxfer') ) ? true : false ;
+	_$('chk_featureMap_atxfer').updateStatus();
+
+	generate_applicationMap_TRs();
+
+};
+
+var localajaxinit = function(){
+	top.document.title = 'Call Parking preferences' ;
+
+	ASTGUI.tabbedOptions( _$('tabbedMenu') , [
+		{	url: '#',
+			desc: 'Feature Codes',
+			click_function: function(){ $('.Features_tabs').hide(); $('#featurecode_settings_container').show(); }
+		},{
+			url: '#',
+			desc: 'Call Parking',
+			click_function: function(){ $('.Features_tabs').hide(); $('#callparking_settings_container').show(); }
+		},{
+			url: '#',
+			desc: 'Application Map',
+			click_function: function(){ $('.Features_tabs').hide(); $('#applicationMap_settings_container').show(); }
+		},{
+			url: '#',
+			desc: 'Dial Options',
+			click_function: function(){ $('.Features_tabs').hide(); $('#DialOptions_settings_container').show(); }
+		}
+		
+	]);
+
+	try{
+		load_preferences();
+	}catch(err){
+
+	}finally{
+		$('#tabbedMenu').find('A:eq(0)').click();
+	}
+};
+
+var save_changes = function(){
+
+	var TBL = _$('Table_applicationMap_definitions');
+	var FeatureNames = [];
+
+	var u = new listOfSynActions('features.conf');
+		u.new_action('update', ct , 'parkext', ASTGUI.getFieldValue('parkext') );
+		u.new_action('update', ct , 'parkpos', ASTGUI.getFieldValue('parkpos') );
+		u.new_action('update', ct , 'parkingtime', ASTGUI.getFieldValue('parkingtime') );
+
+		var blindxfer_map = ASTGUI.getFieldValue('featureMap_blindxfer') ;
+		if( _$('chk_featureMap_blindxfer').checked && blindxfer_map ){
+			u.new_action('update', FM , 'blindxfer', blindxfer_map );
+		}else{
+			u.new_action('delete', FM , 'blindxfer', '');
+		}
+
+		var disconnect_map = ASTGUI.getFieldValue('featureMap_disconnect') ;
+		if( _$('chk_featureMap_disconnect').checked && disconnect_map ){
+			u.new_action('update', FM , 'disconnect', disconnect_map );
+		}else{
+			u.new_action('delete', FM , 'disconnect', '');
+		}
+
+		var atxfer_map = ASTGUI.getFieldValue('featureMap_atxfer') ;
+		if( _$('chk_featureMap_atxfer').checked && atxfer_map ){
+			u.new_action('update', FM , 'atxfer', atxfer_map );
+		}else{
+			u.new_action('delete', FM , 'atxfer', '');
+		}
+
+		u.new_action( 'delcat', 'applicationmap' , '', '');
+		u.new_action( 'newcat', 'applicationmap' , '', '');
+
+		for( var R = 1, RL = TBL.rows.length ; R < RL ; R++ ){
+			var thisrow_id = '#' + AP_MAP_TRID + String(R) ;
+			var this_featureName = $(thisrow_id + ' .textbox_featurename')[0].value.trim() ;
+			if( !this_featureName )continue ;
+
+
+			var this_enabled = $(thisrow_id + ' .textbox_feature_CheckBox')[0].checked ;
+			if( this_enabled ) {
+				FeatureNames.push(this_featureName);
+			}
+			var this_digits = $(thisrow_id + ' .textbox_dialstr')[0].value.trim() ;
+			var this_activeOnBy = $(thisrow_id + ' .textbox_activeOnBy')[0].value.trim() ;
+			var this_appName = $(thisrow_id + ' .textbox_appName')[0].value.trim() ;
+			var this_args = $(thisrow_id + ' .textbox_appArgs')[0].value.trim() ;
+			var tmp_arr = [this_digits, this_activeOnBy, this_appName, this_args ];
+
+
+			u.new_action( 'append', 'applicationmap' , this_featureName , tmp_arr.join(',') );
+		}
+
+		u.callActions();
+
+	var DIAL_OPS = '' ;
+
+	if( _$('dialoptions_t').checked ) DIAL_OPS = DIAL_OPS + 't' ;
+	if( _$('dialoptions_T').checked ) DIAL_OPS = DIAL_OPS + 'T' ;
+	if( _$('dialoptions_h').checked ) DIAL_OPS = DIAL_OPS + 'h' ;
+	if( _$('dialoptions_H').checked ) DIAL_OPS = DIAL_OPS + 'H' ;
+	if( _$('dialoptions_k').checked ) DIAL_OPS = DIAL_OPS + 'k' ;
+	if( _$('dialoptions_K').checked ) DIAL_OPS = DIAL_OPS + 'K' ;
+	
+	ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'DIALOPTIONS', value : DIAL_OPS });
+	ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'FEATURES', value : FeatureNames.join('#') });
+
+	ASTGUI.feedback({msg:' Saved !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+
+	window.location.reload();
+};
+
+</script>
+<body bgcolor="EFEFEF">
+<div class="iframeTitleBar"> 
+	Feature Codes & Call Parking Preferences
+	<span class='refresh_icon' onclick="window.location.reload();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
+</div>
+
+<center>
+
+	<div id="tabbedMenu"></div>
+	
+	<div id='featurecode_settings_container' style="display: none" class='Features_tabs'>
+		<div class='lite_Heading' style="margin-top:-10px">Features Codes</div>
+		<table align="center" cellpadding=2 cellspacing=2 border=0>
+			<tr>	<td valign=top align=right> <input type=checkbox id='chk_featureMap_blindxfer'></td>
+				<td> <input size=2 id='featureMap_blindxfer'> Blind Transfer (default is #)</td>
+			</tr>
+
+			<tr><td height=10></td></tr>
+
+			<tr>	<td valign=top align=right> <input type=checkbox id='chk_featureMap_disconnect'></td>
+				<td> <input size=2 id='featureMap_disconnect'> Disconnect (default is *)</td>
+			</tr>
+
+			<tr><td height=10></td></tr>
+
+<!--			<tr>	<td valign=top align=right> <input type=checkbox id='chk_featureMap_automon'></td>
+				<td> <input size=2 id='featureMap_automon'> One Touch Record a.k.a. Touch Monitor </td>
+			</tr>-->
+
+			<tr>	<td valign=top align=right> <input type=checkbox id='chk_featureMap_atxfer'></td>
+				<td> <input size=2 id='featureMap_atxfer'> Attended transfer </td>
+			</tr>
+
+		</table>
+
+	</div>
+	
+	<div id='callparking_settings_container' style="display: none" class='Features_tabs'>
+		<div class='lite_Heading' style="margin-top:-10px">Call Parking Preferences</div>
+		<table align="center" cellpadding=2 cellspacing=2 border=0>
+			<tr>	<td align=right>Extension to Dial to Park a call:</td>
+				<td>&nbsp;<input size=4 type='text' id='parkext'></td>
+			</tr>
+			<tr>	<td align=right>What extensions to park calls on:</td>
+				<td>&nbsp;<input size=10 type='text' id='parkpos'> (Ex: '701-720')</td>
+			</tr>
+			<tr>	<td align=right>Number of seconds a call can be parked for <img src="images/tooltip_info.gif" tip="en,parking,0" class='tooltipinfo'> :</td>
+				<td>&nbsp;<input size=2 type='text' id='parkingtime'></td>
+			</tr>
+		</table>
+	</div>
+
+	<div id='applicationMap_settings_container' style="display: none" class='Features_tabs'>
+		<div class='top_buttons' style='margin-top:-10px;'>
+			<span id='new' class='guiButtonNew' onclick='do_new_ApplicationMap_row();' style='float:left'>New Application Map</span>
+			<span class='lite_Heading' style='margin-left: -150px'>Application Map</span>
+		</div>
+		<table align="center" cellpadding=0 cellspacing=2 border=0 id='Table_applicationMap_definitions'></table>
+	</div>
+
+	<div id='DialOptions_settings_container' style="display: none" class='Features_tabs'>
+		<div class='lite_Heading' style='margin-left: -150px'>Dial Options</div>
+		<table align="center" cellpadding=2 cellspacing=2 border=0>
+		<tr>	<td valign=top align=right> <input type=checkbox id='dialoptions_t'></td>
+			<td> (t) Allow the called party to transfer the calling party <BR>
+				 by sending the DTMF sequence defined in features.conf
+			</td>
+		</tr>
+
+		<tr><td height=10></td></tr>
+
+		<tr>	<td valign=top align=right> <input type=checkbox id='dialoptions_T'></td>
+			<td> (T) Allow the calling party to transfer the called party <BR>
+				 by sending the DTMF sequence defined in features.conf
+			</td>
+		</tr>
+
+		<tr><td height=10></td></tr>
+
+		<tr>	<td valign=top align=right> <input type=checkbox id='dialoptions_h'></td>
+			<td> (h) Allow the called party to hang up by sending the '*' DTMF digit.</td>
+		</tr>
+		
+		<tr><td height=10></td></tr>
+
+		<tr><td valign=top align=right> <input type=checkbox id='dialoptions_H'></td>
+			<td> (H) Allow the calling party to hang up by hitting the '*' DTMF digit.</td>
+		</tr>
+
+		<tr><td height=10></td></tr>
+
+		<tr><td valign=top align=right> <input type=checkbox id='dialoptions_k'></td>
+			<td>(k) Allow the called party to enable parking of the call by sending<BR>
+					the DTMF sequence defined for call parking in features.conf.
+			</td>
+		</tr>
+
+		<tr><td height=10></td></tr>
+
+		<tr><td valign=top align=right> <input type=checkbox id='dialoptions_K'></td>
+			<td>(K) Allow the calling party to enable parking of the call by sending<BR>
+		           the DTMF sequence defined for call parking in features.conf.
+			</td>
+		</tr>
+
+		</table>
+	</div>
+	
+	<div style="margin-top:30px">
+		<span class='guiButtonCancel' id='cancel' onclick='window.location.reload();'>Cancel</span>
+		<span class='guiButtonEdit' id='save' onclick='save_changes();'>Save</span>
+	</div>
+
+</center>
+
+</body>

Modified: branches/2.0/config/index.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/index.html?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/index.html (original)
+++ branches/2.0/config/index.html Thu Sep 11 22:40:16 2008
@@ -186,9 +186,9 @@
 			<div class="ui-accordion-link">Directory</div>
 			<div class="ui-accordion-desc">Preferences for 'Dialing by Name Directory'</div>
 		</div>
-		<div page='callparking.html'>
-			<div class="ui-accordion-link">Call Parking</div>
-			<div class="ui-accordion-desc">Configure call parking features</div>
+		<div page='features.html'>
+			<div class="ui-accordion-link">Call Features</div>
+			<div class="ui-accordion-desc">Feature Codes and Call parking preferences</div>
 		</div>
 		<div page='vmgroups.html'>
 			<div class="ui-accordion-link">VoiceMail Groups</div>

Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Thu Sep 11 22:40:16 2008
@@ -32,6 +32,10 @@
 			var u = new listOfSynActions('extensions.conf');
 			if( !ecnf['globals'] ){
 				u.new_action('newcat', 'globals', '', '');
+				u.new_action('append', 'globals', 'FEATURES', '');
+				u.new_action('append', 'globals', 'DIALOPTIONS', '');
+				u.new_action('append', 'globals', 'RINGTIME', '20');
+				ecnf.globals = {} ;
 			}
 			if( !ecnf['general'] ){
 				u.new_action('newcat', 'general', '', '');
@@ -45,6 +49,28 @@
 			if( parent.sessionData.DEBUG_MODE ){
 				alert('updated general context in extensions.conf' + '\n' + 'Click OK to reload');
 			}
+			window.location.reload();
+			return;
+		}
+
+		if( !ecnf['globals'].hasOwnProperty('FEATURES') ){
+			var u = new listOfSynActions('extensions.conf');
+			u.new_action('append', 'globals', 'FEATURES', '');
+			u.callActions();
+			window.location.reload();
+			return;
+		}
+		if( !ecnf['globals'].hasOwnProperty('DIALOPTIONS') ){
+			var u = new listOfSynActions('extensions.conf');
+			u.new_action('append', 'globals', 'DIALOPTIONS', '');
+			u.callActions();
+			window.location.reload();
+			return;
+		}
+		if( !ecnf['globals'].hasOwnProperty('RINGTIME') ){
+			var u = new listOfSynActions('extensions.conf');
+			u.new_action('append', 'globals', 'RINGTIME', '20');
+			u.callActions();
 			window.location.reload();
 			return;
 		}
@@ -162,7 +188,7 @@
 		}
 
 		var stdextn = 'macro-stdexten' ;
-		if( !ecnf.hasOwnProperty(stdextn) || ( ecnf.hasOwnProperty(stdextn) && !ecnf[stdextn]['exten'].contains('FOLLOWME_') ) ){ // if stdexten does not forward to followme 
+		if( !ecnf.hasOwnProperty(stdextn) || ( ecnf.hasOwnProperty(stdextn) && !ecnf[stdextn]['exten'].contains('DYNAMIC_FEATURES') ) ){ // if stdexten does not forward to followme 
 			sessionData.continueParsing = false;
 			(function(){
 				ASTGUI.dialog.waitWhile('Updating stdexten Macro in extensions.conf');
@@ -178,10 +204,11 @@
 				var x = new listOfActions('extensions.conf');
 				x.new_action( 'delcat', stdextn , '', '');
 				x.new_action( 'newcat', stdextn , '', '');
-				x.new_action( 'append', stdextn , 'exten', 's,1,GotoIf($[${FOLLOWME_${ARG1}} = 1]?4:2)');
-				x.new_action( 'append', stdextn , 'exten', 's,2,Dial(${ARG2},20)');
-				x.new_action( 'append', stdextn , 'exten', 's,3,Goto(s-${DIALSTATUS},1)');
-				x.new_action( 'append', stdextn , 'exten', 's,4,Macro(stdexten-followme,${ARG1},${ARG2})');
+				x.new_action( 'append', stdextn , 'exten', 's,1,Set(__DYNAMIC_FEATURES=${FEATURES})');
+				x.new_action( 'append', stdextn , 'exten', 's,2,GotoIf($[${FOLLOWME_${ARG1}} = 1]?5:3)');
+				x.new_action( 'append', stdextn , 'exten', 's,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})');
+				x.new_action( 'append', stdextn , 'exten', 's,4,Goto(s-${DIALSTATUS},1)');
+				x.new_action( 'append', stdextn , 'exten', 's,5,Macro(stdexten-followme,${ARG1},${ARG2})');
 				x.new_action( 'append', stdextn , 'exten', 's-NOANSWER,1,Voicemail(${ARG1},u)');
 				x.new_action( 'append', stdextn , 'exten', 's-NOANSWER,2,Goto(default,s,1)');
 				x.new_action( 'append', stdextn , 'exten', 's-BUSY,1,Voicemail(${ARG1},b)');
@@ -210,9 +237,9 @@
 
 				var x = new listOfActions('extensions.conf');
 				x.new_action( 'newcat', fmcat , '', '');
-				x.new_action( 'append', fmcat , 'exten', 's,1,Dial(${ARG2},20)' );
+				x.new_action( 'append', fmcat , 'exten', 's,1,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})' );
 				x.new_action( 'append', fmcat , 'exten', 's,2,Followme(${ARG1},a)' );
-				x.new_action( 'append', fmcat , 'exten', 's,3,Voicemail(${ARG1},b)' );
+				x.new_action( 'append', fmcat , 'exten', 's,3,Voicemail(${ARG1},u)' );
 				x.new_action( 'append', fmcat , 'exten', 's-NOANSWER,1,Voicemail(${ARG1},u)' );
 				x.new_action( 'append', fmcat , 'exten', 's-BUSY,1,Voicemail(${ARG1},b)' );
 				x.new_action( 'append', fmcat , 'exten', 's-BUSY,2,Goto(default,s,1)' );

Modified: branches/2.0/config/networking.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/networking.html?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/networking.html (original)
+++ branches/2.0/config/networking.html Thu Sep 11 22:40:16 2008
@@ -78,13 +78,12 @@
 				var tmp = u.callActions();
 			})();
 
-			ASTGUI.dialog.waitWhile('Applying Changes');
 			parent.ASTGUI.systemCmd( cmd1, function(){ 
 				parent.ASTGUI.systemCmd( cmd2, function(){ 
 					parent.ASTGUI.systemCmd( cmd3, function(){ 
-						parent.ASTGUI.systemCmd( cmd4, function(){
-							setTimeout( function(){top.window.location.reload();}, 4000 );
-							parent.ASTGUI.systemCmd( cmd5 + ' &', function(){ });
+						parent.ASTGUI.systemCmd( cmd4, function(){ 
+							setTimeout( function(){ window.location.reload(); }, 3000 );
+							parent.ASTGUI.systemCmd( cmd5, function(){ });
 						});
 					});
 				});

Modified: branches/2.0/config/preferences.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/preferences.html?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/preferences.html (original)
+++ branches/2.0/config/preferences.html Thu Sep 11 22:40:16 2008
@@ -27,7 +27,6 @@
 </style>
 <script>
 var OPEXTENSION = '';
-var STDEXTEN_RINGINTERFACE_LINE ;
 
 var polycom_digitmap_string = '';
 var polycom_digitmap_timeout_string = '';
@@ -91,17 +90,11 @@
 		ASTGUI.selectbox.append( DOM_op_ext , 'User ' + user , op_tmp);
 	});
 
-	try{
-		(function(){
-			var c = context2json ({ filename:'extensions.conf' , context: 'macro-stdexten', usf: 0 });
-			if( !c || !c.length ) return ;
-			if( c[0].contains('s,1,Dial(${ARG2},') ){
-				STDEXTEN_RINGINTERFACE_LINE = c[0].afterChar('=');
-				var args = ASTGUI.parseContextLine.getArgs( c[0] );
-				ASTGUI.updateFieldToValue( 'op_ringTimeOut_Voicemail', args[1] );
-			}
-		})();
-	}catch(err){}
+	(function(){
+		var c = context2json ({ filename:'extensions.conf' , context: 'globals', usf: 1 });
+		var ringtime = ( c.hasOwnProperty('RINGTIME') ) ? c['RINGTIME'] : '20' ;
+		ASTGUI.updateFieldToValue( 'op_ringTimeOut_Voicemail', ringtime );
+	})();
 
 	try{
 		OPEXTENSION  = ( parent.sessionData.pbxinfo.localextensions && parent.sessionData.pbxinfo.localextensions.Operator ) ? parent.sessionData.pbxinfo.localextensions.Operator : '' ;
@@ -177,11 +170,13 @@
 var save_changes = function(){
 	if( !verify_Ranges() ){ return; }
 	parent.sessionData.pbxinfo.GLOBALS[ASTGUI.globals.obcidstr] = DOM_obCid_input.value;
-	ASTGUI.updateaValue({file:'extensions.conf', context :'globals', variable : ASTGUI.globals.obcidstr, value : DOM_obCid_input.value }   );
 
 	var u = new listOfSynActions('extensions.conf');
+		u.new_action('update', 'globals', ASTGUI.globals.obcidstr, ASTGUI.getFieldValue(DOM_obCid_input) );
+		u.new_action('update', 'globals', 'RINGTIME', ASTGUI.getFieldValue('op_ringTimeOut_Voicemail') );
+
 		u.new_action('delete', 'default', 'exten','' ,'o,1,' + OPEXTENSION );
-		u.new_action('append', 'default', 'exten', 'o,1,' + DOM_op_ext.value );
+		u.new_action('append', 'default', 'exten', 'o,1,' + ASTGUI.getFieldValue(DOM_op_ext) );
 		u.new_action('update', 'macro-stdexten', 'exten', 's,1,Dial(${ARG2},' + _$('op_ringTimeOut_Voicemail').value +')' , STDEXTEN_RINGINTERFACE_LINE );
 	u.callActions();
 

Modified: branches/2.0/config/sip.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/sip.html?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/sip.html (original)
+++ branches/2.0/config/sip.html Thu Sep 11 22:40:16 2008
@@ -29,7 +29,7 @@
 <script>
 // Realtime options - 'rtautoclear','rtcachefriends','rtsavesysname','rtupdate','ignoreregexpire'
 
-var fieldnames = ['allowexternaldomains' ,'allowexternalinvites' ,'allowguest' ,'allowoverlap' ,'allowsubscribe' ,'allowtransfer' ,'alwaysauthreject' ,'autodomain' ,'bindaddr' ,'bindport' ,'callevents' ,'canreinvite' ,'checkmwi' ,'compactheaders' ,'context' ,'defaultexpiry', 'domain' ,'dtmfmode' ,'dumphistory' ,'externhost' ,'externip' ,'externrefresh' ,'fromdomain' ,'g726nonstandard','jbenable' ,'jbforce' ,'jbimpl' ,'jblog' ,'jbmaxsize' ,'jbresyncthreshold' ,'language' ,'localnet' ,'maxcallbitrate' ,'maxexpiry' ,'minexpiry' ,'mohinterpret' ,'mohsuggest' ,'nat' ,'notifyringing' ,'pedantic' ,'progressinband' ,'promiscredir' ,'realm' ,'recordhistory' ,'register' ,'registerattempts' ,'registertimeout' ,'relaxdtmf' , 'rtpholdtimeout' ,'rtptimeout' ,'sendrpid' ,'sipdebug' ,'srvlookup' ,'subscribecontext' ,'t1min' ,'t38pt_udptl' ,'tos_audio' ,'tos_sip' ,'tos_video' ,'trustrpid' ,'useragent' ,'usereqphone' ,'videosupport'] ;
+var fieldnames = ['allowexternaldomains' ,'allowexternalinvites' ,'allowguest' ,'allowoverlap' ,'allowsubscribe' ,'allowtransfer' ,'alwaysauthreject' ,'autodomain' ,'bindaddr' ,'bindport' ,'callevents' ,'canreinvite' ,'checkmwi' ,'compactheaders' ,'context' ,'defaultexpiry', 'domain' ,'dtmfmode' ,'dumphistory' ,'externhost' ,'externip' ,'externrefresh' ,'fromdomain' ,'g726nonstandard','jbenable' ,'jbforce' ,'jbimpl' ,'jblog' ,'jbmaxsize' ,'jbresyncthreshold' ,'language' ,'localnet' ,'maxcallbitrate' ,'maxexpiry' ,'minexpiry' ,'mohinterpret' ,'mohsuggest' ,'nat' ,'notifymimetype' ,'notifyringing' ,'pedantic' ,'progressinband' ,'promiscredir' ,'realm' ,'recordhistory' ,'register' ,'registerattempts' ,'registertimeout' ,'relaxdtmf' , 'rtpholdtimeout' ,'rtptimeout' ,'sendrpid' ,'sipdebug' ,'srvlookup' ,'subscribecontext' ,'t1min' ,'t38pt_udptl' ,'tos_audio' ,'tos_sip' ,'tos_video' ,'trustrpid' ,'useragent' ,'usereqphone' ,'videosupport'] ;
 
 
 var localajaxinit = function(){
@@ -366,11 +366,11 @@
 			<img src="images/tooltip_info.gif" tip="en,sip_general,19" class='tooltipinfo'>
 		</td>
 	</tr>
-<!--	<tr>	<td align=right>Override Notify MIME Type:</td>
+	<tr>	<td align=right>Override Notify MIME Type:</td>
 		<td colspan=3>&nbsp;<input type='text'  size=16 id='notifymimetype' class="input8">
 			<img src="images/tooltip_info.gif" tip="en,sip_general,18" class='tooltipinfo'>
 		</td>
-	</tr>-->
+	</tr>
 	</table>
 </div>
 

Modified: branches/2.0/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/voicemail.html?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/voicemail.html (original)
+++ branches/2.0/config/voicemail.html Thu Sep 11 22:40:16 2008
@@ -29,8 +29,7 @@
 </style>
 <script>
 var TODELETE = '';
-var OLD_DVD = '1,VoiceMail(${EXTEN:1}@default' ;
-var DVD = ',1,VoiceMail(${EXTEN:1}@default,s)' ; // direct voicemail dial
+var DVD = ',1,VoiceMail(${EXTEN:1}@default)' ; // direct voicemail dial
 
 var localajaxinit = function( ){
 	(function (){
@@ -111,7 +110,7 @@
 			{ context_name : 'default' ,
 				beginsWithArr: ['exten=_*','exten=_#'] ,
 				filename: 'extensions.conf',
-				hasThisString: OLD_DVD,
+				hasThisString: DVD,
 				cb:function(){}
 			}
 		);

Modified: branches/2.0/config/welcome.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/welcome.html?view=diff&rev=3812&r1=3811&r2=3812
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Thu Sep 11 22:40:16 2008
@@ -117,35 +117,29 @@
 };
 
 managerEvents.parseOutput = function(op){
-	if( parent.sessionData.DEBUG_MODE ){
-		var b = document.createElement('div');
-		b.innerHTML = '<PRE>' + op + '</PRE><HR>';
-		_$('waitevent_Log').appendChild(b);
-	}
-	var op_LC = op.toLowerCase() ;
-
-	try{
-		if( op_LC.contains('event: queuememberstatus') ){
-
-			setTimeout( update_AgentsListing_Table , 1000 );
-
-		} else if ( op_LC.contains('event: extensionstatus') ) {
-
-			var tmp_chunks = ASTGUI.miscFunctions.getChunksFromManagerOutput(op, 1) ;
-			tmp_chunks.each(function(this_chunk){
-				if(this_chunk.hasOwnProperty('Event') && this_chunk.Event == 'ExtensionStatus' ){
-					var tmp_user = this_chunk.Exten ;
-					var new_status = ASTGUI.getUser_DeviceStatus(tmp_user) ;
-					managerEvents.updateUserImage(tmp_user , new_status);
-				}
-			});
-
+	(function(){
+		if( parent.sessionData.DEBUG_MODE ){
+			var b = document.createElement('div');
+			b.innerHTML = '<PRE>' + op + '</PRE><HR>';
+			_$('waitevent_Log').appendChild(b);
 		}
-
-	}finally{
-		this.Watch();
-	}
-
+		var op_LC = op.toLowerCase() ;
+		try{
+			if( op_LC.contains('event: queuememberstatus') ){
+				setTimeout( update_AgentsListing_Table , 1000 );
+			} else if ( op_LC.contains('event: extensionstatus') ) {
+				var tmp_chunks = ASTGUI.miscFunctions.getChunksFromManagerOutput(op, 1) ;
+				tmp_chunks.each(function(this_chunk){
+					if(this_chunk.hasOwnProperty('Event') && this_chunk.Event == 'ExtensionStatus' ){
+						var tmp_user = this_chunk.Exten ;
+						var new_status = ASTGUI.getUser_DeviceStatus(tmp_user) ;
+						managerEvents.updateUserImage(tmp_user , new_status);
+					}
+				});
+			}
+		}catch(err){}
+	})();
+	this.Watch();
 };
 
 managerEvents.Watch = function(){




More information about the asterisk-gui-commits mailing list