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

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Nov 7 13:36:05 CST 2008


Author: pari
Date: Fri Nov  7 13:36:05 2008
New Revision: 4080

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

 new feature: Option to set the global outbound 'CallerId Name'



Modified:
    branches/2.0/config/js/astman.js
    branches/2.0/config/js/pbx.js
    branches/2.0/config/js/tooltip.js
    branches/2.0/config/preferences.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=4080&r1=4079&r2=4080
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Fri Nov  7 13:36:05 2008
@@ -321,6 +321,7 @@
 		app_factoryReset : '/bin/reset_config', // ASTGUI.globals.app_factoryReset
 		fnf : 'ERROR:FNF',
 		obcidstr : 'GLOBAL_OUTBOUNDCID', // ASTGUI.globals.obcidstr
+		obcidNamestr : 'GLOBAL_OUTBOUNDCIDNAME', // ASTGUI.globals.obcidNamestr
 		obcidUsrPrefix : 'CID_', // ASTGUI.globals.obcidUsrPrefix
 		sbcid_1 : 's,1,ExecIf($[ "${CALLERID(num)}"="" ],SetCallerPres,unavailable)', // ASTGUI.globals.sbcid_1
 		sbcid_2 : 's,2,ExecIf($[ "${CALLERID(num)}"="" ],Set,CALLERID(all)=unknown <0000000>)',

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=4080&r1=4079&r2=4080
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Fri Nov  7 13:36:05 2008
@@ -90,10 +90,13 @@
 				check_For_Contexts[ 'macro-' + ASTGUI.contexts.dialtrunks ] = [
 					// "; Macro by =  Brandon Kruse <bkruse at digium.com> & Matthew O'Gorman mogorman at digium.com",
 					'exten=s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)',
-					'exten=s,n,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})',
+					'exten=s,2,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1)',
+					'exten=s,3,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})',
 					'exten=s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)',
 					'exten=s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})',
 					'exten=s,n,Goto(1-dial,1)',
+					'exten=1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})',
+					'exten=1-setgbobname,n,Goto(s,3)',
 					'exten=1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})',
 					'exten=1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})',
 					'exten=1-fmsetcid,n,Goto(1-dial,1)',

Modified: branches/2.0/config/js/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/tooltip.js?view=diff&rev=4080&r1=4079&r2=4080
==============================================================================
--- branches/2.0/config/js/tooltip.js (original)
+++ branches/2.0/config/js/tooltip.js Fri Nov  7 13:36:05 2008
@@ -299,6 +299,7 @@
 
 
 	tooltips['options'].en[13] = "The timeout variable is the number of seconds the phone will wait for each segment of a digit map expressed as an integer.";
+	tooltips['options'].en[14] = "<B>Global OutBound CID Name:</B> This is the global CallerID Name that is used for all outgoing calls. If this value is defined, all out going calls will have a 'CallerId Name' set to this value. This would be usually your company name. Leave this value blank if you want the users 'CallerID Name' to appear on outbound calls." ;
 
 	// Tooltips for Directory
 	tooltips['directory']= new Object;

Modified: branches/2.0/config/preferences.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/preferences.html?view=diff&rev=4080&r1=4079&r2=4080
==============================================================================
--- branches/2.0/config/preferences.html (original)
+++ branches/2.0/config/preferences.html Fri Nov  7 13:36:05 2008
@@ -79,21 +79,23 @@
 	t.push( {url: 'flipadvanced.html', desc:'Advanced Options' } );
 
 	ASTGUI.tabbedOptions( _$('tabbedMenu') , t );
-
 	loadDOMelements();
-	var t = parent.sessionData.pbxinfo.GLOBALS[ASTGUI.globals.obcidstr] ; 
-	DOM_obCid_input.value = (t) ? t : '' ;
+
 	var cusers = parent.astgui_manageusers.listOfUsers();
 	var op_tmp ;
 	cusers.each(function(user){
 		op_tmp = 'Goto(default,' + user + ',1)';
 		ASTGUI.selectbox.append( DOM_op_ext , 'User ' + user , op_tmp);
 	});
-
 	(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{
+			ASTGUI.updateFieldToValue( DOM_obCid_input, c[ASTGUI.globals.obcidstr] || ''  );
+			ASTGUI.updateFieldToValue( 'obCidName_input', c[ASTGUI.globals.obcidNamestr] || ''  );
+		}catch(err){}
+
 	})();
 
 	try{
@@ -180,6 +182,7 @@
 
 	var u = new listOfSynActions('extensions.conf');
 		u.new_action('update', 'globals', ASTGUI.globals.obcidstr, ASTGUI.getFieldValue(DOM_obCid_input) );
+		u.new_action('update', 'globals', ASTGUI.globals.obcidNamestr, ASTGUI.getFieldValue('obCidName_input') );
 		u.new_action('update', 'globals', 'RINGTIME', ASTGUI.getFieldValue('op_ringTimeOut_Voicemail') );
 
 		u.new_action('delete', 'default', 'exten','' ,'o,1,' + OPEXTENSION );
@@ -279,6 +282,9 @@
 	<tr>	<td align=right>Global OutBound CID <img src="images/tooltip_info.gif" tip="en,options,7" class='tooltipinfo'> :</td>
 		<td><input id='obCid_input' size=16></td>
 	</tr>
+	<tr>	<td align=right>Global OutBound CID Name<img src="images/tooltip_info.gif" tip="en,options,14" class='tooltipinfo'> :</td>
+		<td><input id='obCidName_input' size=16></td>
+	</tr>
 	<tr>	<td align=right>Operator Extension <img src="images/tooltip_info.gif" tip="en,options,8" class='tooltipinfo'> :</td>
 		<td><select id='op_ext'></select></td>
 	</tr>




More information about the asterisk-gui-commits mailing list