pari: branch 2.0 r3852 - in /branches/2.0/config: js/astman.js menus.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Sep 22 13:28:04 CDT 2008


Author: pari
Date: Mon Sep 22 13:28:03 2008
New Revision: 3852

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

 * Add 'AGI' in Voicemenus, Load list of available AGI scripts from agi-bin directory

 * Add 'Ringing' application in voicemenus



Modified:
    branches/2.0/config/js/astman.js
    branches/2.0/config/menus.html

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=3852&r1=3851&r2=3852
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Mon Sep 22 13:28:03 2008
@@ -1704,6 +1704,10 @@
 
 			if( all_LC == "playback" ){
 				return 'Play ' + (args[0] || '???') + ' & Donot Listen for KeyPress events' ;
+			}
+
+			if( all_LC == "agi" ){
+				return (args[0])? 'Execute AGI script <b>' + args[0] + '</b>' :  'Execute AGI script <font color=red>!</font>' ;
 			}
 
 			if( all_LC == "waitexten" ){
@@ -2659,7 +2663,7 @@
 ASTGUI.paths['ConfigBkp'] = '/var/lib/asterisk/gui_backups/';
 ASTGUI.paths['ConfigBkp_AA50'] = '/var/lib/asterisk/sounds/backups/'; // AA50 bkp path on C.F
 ASTGUI.paths['ConfigBkp_dldPath'] = ASTGUI.paths['guiInstall'] + 'private/bkps/'; // path for keeping the bkp files for download
-
+ASTGUI.paths['AGIBIN'] = '/var/lib/asterisk/agi-bin/';
 ASTGUI.paths['Sounds'] = '/var/lib/asterisk/sounds/';
 ASTGUI.paths['MOH'] = '/var/lib/asterisk/moh/' ; // path for music on hold files
 ASTGUI.paths['menusRecord'] = ASTGUI.paths['Sounds'] + 'record/' ;

Modified: branches/2.0/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/menus.html?view=diff&rev=3852&r1=3851&r2=3852
==============================================================================
--- branches/2.0/config/menus.html (original)
+++ branches/2.0/config/menus.html Mon Sep 22 13:28:03 2008
@@ -130,6 +130,7 @@
 var EDIT_VMENU ;
 var CURRENT_ACTIONS = [] ;
 var LISTOFSOUNDFILES = [];
+var AGI_FILES = [];
 
 var chop_Extension = function(a){
 	if( !a ){ return ''; }
@@ -190,8 +191,17 @@
 					LISTOFSOUNDFILES.push(CURRENT_FILE);
 				}
 			});
+			ASTGUI.COMBOBOX.call( _$('newstep_sound') , LISTOFSOUNDFILES, 450 );
+			VoiceMenus_miscFunctions.load_aig_files();
+		});
+	},
+
+	load_aig_files : function(){
+		parent.ASTGUI.dialog.waitWhile('loading list of AIG scripts ..');
+		ASTGUI.listSystemFiles( ASTGUI.paths.AGIBIN , function(recfiles) {
+			AGI_FILES = recfiles;
 			parent.ASTGUI.dialog.hide();
-			ASTGUI.COMBOBOX.call( _$('newstep_sound') , LISTOFSOUNDFILES, 450 );
+			ASTGUI.COMBOBOX.call( _$('newstep_agi') , AGI_FILES, 450 );
 		});
 	},
 
@@ -209,6 +219,17 @@
 					lbl('Answer');
 					tip_chosenStep.innerHTML = 'Answer a channel if ringing';
 					break;
+				case 'AGI':
+					lbl('AGI');
+					$('#newstep_agi').show();
+					ASTGUI.updateFieldToValue('newstep_agi','');
+					tip_chosenStep.innerHTML = 'Executes an AGI compliant application';
+					break;
+
+				case 'Ringing':
+					lbl('Ringing');
+					tip_chosenStep.innerHTML = 'Indicate ringing tone';
+					break;
 				case 'Authenticate':
 					lbl('Authenticate');
 					$('#newstep_pwd').show();
@@ -355,6 +376,9 @@
 			case 'Answer':
 				newstep = 'Answer()';
 				break;
+			case 'Ringing':
+				newstep = 'Ringing()';
+				break;
 			case 'Authenticate':
 				newstep = 'Authenticate(' + ASTGUI.getFieldValue('newstep_pwd') + ')';
 				break;
@@ -390,6 +414,9 @@
 				break;
 			case 'Wait':
 				newstep = 'Wait(' + ASTGUI.getFieldValue('newstep_seconds') + ')';
+				break;
+			case 'AGI':
+				newstep = 'AGI(' + ASTGUI.getFieldValue('newstep_agi') + ')';
 				break;
 			case 'WaitExten':
 				newstep = 'WaitExten(' + ASTGUI.getFieldValue('newstep_seconds') + ')';
@@ -846,6 +873,7 @@
 							<option value="DISA">DISA</option>
 							<option value="ResponseTimeout">ResponseTimeout</option>
 							<option value="Playback">Playback</option>
+							<option value="Ringing">Ringing</option>
 							<option value="SetMusicOnHold">Set MusicOhHold Class</option>
 							<option value="SayAlpha">SayAlpha</option>
 							<option value="SayDigits">SayDigits</option>
@@ -856,6 +884,7 @@
 							<option value="setLanguage">Set Language</option>
 							<option value="GotoDirecotry">Goto Directory</option>
 							<option value="DialViaTrunk">Dial a Number via Trunk</option>
+							<option value="AGI">AGI</option>
 							<option value="CustomApp">Custom App</option>
 							<option value="UserEvent">User Event</option>
 <!--							<option value="CheckOwnVoiceMail">Check Voicemail for Own Extension</option>-->
@@ -878,6 +907,7 @@
 							<option value='fr'>French</option>
 						</select>
 						<input  class='class_newStep_details_td' id="newstep_custom" size=24>
+						<input  class='class_newStep_details_td' id="newstep_agi" size=16>
 						<input class='class_newStep_details_td' id="newstep_dial_ThisNumber" size=10>
 						<select class='class_newStep_details_td' id="newstep_dial_ViaTrunk"></select>
 						<input class='class_newStep_details_td' id="newstep_UserEvent_eventname" size=5>




More information about the asterisk-gui-commits mailing list