pari: branch 2.0 r4263 - /branches/2.0/config/js/menus.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Dec 2 16:13:12 CST 2008


Author: pari
Date: Tue Dec  2 16:13:12 2008
New Revision: 4263

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

  Add option in voice menus to 'Dial via Skype'



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

Modified: branches/2.0/config/js/menus.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/menus.js?view=diff&rev=4263&r1=4262&r2=4263
==============================================================================
--- branches/2.0/config/js/menus.js (original)
+++ branches/2.0/config/js/menus.js Tue Dec  2 16:13:12 2008
@@ -302,6 +302,12 @@
 					$('#newstep_custom').show();
 					tip_chosenStep.innerHTML = 'Add a <i>Custom Step</i> to the VoiceMenu';
 					break;
+				case 'DialViaSkype':
+					lbl('Dial via Skype');
+					$('#newstep_dial_ThisNumber').show();
+					_$('newstep_dial_ThisNumber').value = '';
+					tip_chosenStep.innerHTML = 'Dial a number/buddy using the default skype account';
+					break;
 				case 'Macro':
 					lbl('Macro');
 					$('#newstep_custom').show();
@@ -412,6 +418,9 @@
 				break;
 			case 'CustomApp':
 				newstep = ASTGUI.getFieldValue('newstep_custom') ;
+				break;
+			case 'DialViaSkype':
+				newstep = 'Dial(Skype/' + ASTGUI.getFieldValue('newstep_dial_ThisNumber') + ')' ;
 				break;
 			case 'Macro':
 				newstep = 'Macro(' + ASTGUI.getFieldValue('newstep_custom') + ')' ;
@@ -689,6 +698,14 @@
 	if(parent.sessionData.advancedmode == true ){
 		ASTGUI.selectbox.append('newStep_select_action', 'Custom App', 'CustomApp');
 	}
+
+	setTimeout( function(){
+		var modules_show = ASTGUI.cliCommand('module show');
+		if( modules_show.contains('res_skypeforasterisk') && modules_show.contains('chan_skype') ){
+			ASTGUI.selectbox.append('newStep_select_action', 'Dial via Skype', 'DialViaSkype');
+		}
+	}, 1000);
+
 	if( !ASTGUI.miscFunctions.alertIfRangeisNotdefined('vme_start','vme_end', 'VoiceMenus') ){
 		$('.top_buttons').hide();
 		return;




More information about the asterisk-gui-commits mailing list