bkruse: branch bkruse/dahdi_integration r4111 - in /team/bkruse/dahdi_integra...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Nov 14 17:03:20 CST 2008


Author: bkruse
Date: Fri Nov 14 17:03:20 2008
New Revision: 4111

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4111
Log:
Updating with 2.0 again, going to start working on dahdi_integration again. The real way (using global vars instead of if statements)

Added:
    team/bkruse/dahdi_integration/cdr.html
      - copied unchanged from r4110, branches/2.0/config/cdr.html
    team/bkruse/dahdi_integration/config/js/jquery.fixedheader.js
      - copied unchanged from r4110, branches/2.0/config/js/jquery.fixedheader.js
Removed:
    team/bkruse/dahdi_integration/config/js/guiversion.js
Modified:
    team/bkruse/dahdi_integration/config/js/index.js
    team/bkruse/dahdi_integration/config/js/tooltip.js
    team/bkruse/dahdi_integration/config/queues.html
    team/bkruse/dahdi_integration/config/trunks_voip.html

Modified: team/bkruse/dahdi_integration/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/js/index.js?view=diff&rev=4111&r1=4110&r2=4111
==============================================================================
--- team/bkruse/dahdi_integration/config/js/index.js (original)
+++ team/bkruse/dahdi_integration/config/js/index.js Fri Nov 14 17:03:20 2008
@@ -542,8 +542,12 @@
 	},
 
 	applyChanges : function(cb){
-		var t = ASTGUI.cliCommand('reload') ;
 		var u = _$('applyChanges_Button');
+		if (sessionData.PLATFORM.isAST_1_4) {
+			var t = ASTGUI.cliCommand('reload') ;
+		} else {
+			var t = ASTGUI.cliCommand('module reload');
+		}
 		u.style.display = 'none';
 		ASTGUI.cookies.removeCookie('configFilesChanged');
 		ASTGUI.feedback({msg:'Asterisk Reloaded !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;

Modified: team/bkruse/dahdi_integration/config/js/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/js/tooltip.js?view=diff&rev=4111&r1=4110&r2=4111
==============================================================================
--- team/bkruse/dahdi_integration/config/js/tooltip.js (original)
+++ team/bkruse/dahdi_integration/config/js/tooltip.js Fri Nov 14 17:03:20 2008
@@ -499,4 +499,13 @@
 	tooltips['paging'] = { en: [] };
 	tooltips['paging'].en[0] = "<B>Alert-Info Header:</B> This is the value that is sent to the phone for an intercom call in the alert info header. It is not recommended that this valued be changed from the default of Intercom. ";
 	tooltips['paging'].en[1] = "Dial sequence that is used to prefix an extension to dial it as a Page. For instance setting this value to ** would allow to page the extension 6000 by dialing **6000.";
-	tooltips['paging'].en[2] = "Dial sequence that is used to prefix an extension to dial it as Intercom. For instance setting this value to *# would allow to initiate an intercom call with extension 6000 by dialing *#6000.";
+	tooltips['paging'].en[2] = "Dial sequence that is used to prefix an extension to dial it as Intercom. For instance setting this value to *# would allow to initiate an intercom call with extension 6000 by dialing *#6000.";
+
+// Tooltips for "CDR Viewer" in english
+	tooltips['CDR'] = { en: [] };
+	tooltips['CDR'].en[0] = "<B>System calls</B> are internal calls triggered by the Asterisk GUI and flagged with a destination context of <I>asterisk_guitools</I>. Select this option to include them in the CDR list. This also includes calls with the same major unique ID as the actual <I>asterisk_guitools</I> call.";
+	tooltips['CDR'].en[1] = "<B>Inbound calls</B> are calls originating from a non-internal source (like a VoIP trunk) and sent to an internal extension";
+	tooltips['CDR'].en[2] = "<B>Outbound calls</B> are calls sent to a non-internal source (like a VoIP trunk) from an internal extension";
+	tooltips['CDR'].en[3] = "<B>Internal calls</B> are calls from one user extension to another and are not sent over a trunk";
+	tooltips['CDR'].en[4] = "<B>External calls</B> are calls from one trunk to another trunk and are not sent to any internal extension";
+	tooltips['CDR'].en[5] = "<B>All fields.</B> Select this option to display all fields recorded in the <I>Master.csv</I> CDR file.";

Modified: team/bkruse/dahdi_integration/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/queues.html?view=diff&rev=4111&r1=4110&r2=4111
==============================================================================
--- team/bkruse/dahdi_integration/config/queues.html (original)
+++ team/bkruse/dahdi_integration/config/queues.html Fri Nov 14 17:03:20 2008
@@ -222,7 +222,7 @@
 		return;
 	}
 
-	if( isNewQueue == true ){
+	if( isNewQueue == true ){ // new QUEUE
 		if(!ASTGUI.miscFunctions.isExtensionInRange( cat ,'qe_start','qe_end')){
 			ASTGUI.highlightField(DOM_Queue_Ext, 'Extension is not in preferred range');
 			parent.ASTGUI.dialog.hide();
@@ -255,8 +255,7 @@
 		x.new_action('append', cat, 'musicclass', ASTGUI.getFieldValue(DOM_edit_musicclass));
 		var s = ASTGUI.getFieldValue(DOM_edit_voicemenuclass); 
 		if (s != '') x.new_action('append', cat, 'context', s);
-
-	}else{
+	}else{ // Edit existing QUEUE
 		if( parent.sessionData.pbxinfo.queues[cat].hasOwnProperty('isOLDGUI') && parent.sessionData.pbxinfo.queues[cat].isOLDGUI == true ){
 			var u = new listOfSynActions('extensions.conf');
 			u.new_action( 'delete', 'default', 'exten', '' , parent.sessionData.pbxinfo.queues[cat].configLine );
@@ -286,7 +285,7 @@
 	ags.each( function(ag){
 		x.new_action('append', cat, 'member', ag );
 	});
-	
+
 	var after = function(){
 		if( isNewQueue == true ){
 			parent.sessionData.pbxinfo.queues[cat] = new ASTGUI.customObject ;
@@ -296,7 +295,15 @@
 		ASTGUI.feedback({ msg:'Changes Saved !', showfor:2 , color:'green', bgcolor:'#FFFFFF' });
 		window.location.reload();
 	};
-	x.callActions(after);
+
+	if( isNewQueue == true ){
+		x.callActions(after);
+	}else{
+		ASTGUI.miscFunctions.delete_LinesLike({ context_name : cat , beginsWithArr: ['member=Agent'] , filename: 'queues.conf', cb:function(){
+			x.callActions(after);
+		} });
+	}
+
 };
 
 

Modified: team/bkruse/dahdi_integration/config/trunks_voip.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/trunks_voip.html?view=diff&rev=4111&r1=4110&r2=4111
==============================================================================
--- team/bkruse/dahdi_integration/config/trunks_voip.html (original)
+++ team/bkruse/dahdi_integration/config/trunks_voip.html Fri Nov 14 17:03:20 2008
@@ -132,7 +132,7 @@
 
 	if( isNewTrunk == true ) {
 		DOM_edit_VOIPTrunk_DIV_Title.innerHTML = 'Create New SIP/IAX trunk';
-		ASTGUI.resetTheseFields([ DOM_edit_VOIPTrunk_Type, DOM_edit_VOIPTrunk_Hostname , DOM_edit_VOIPTrunk_Username ,  DOM_edit_VOIPTrunk_Password , 'trunk_obcid' , 'edit_VOIPTrunk_Providername' ]);
+		ASTGUI.resetTheseFields([ DOM_edit_VOIPTrunk_Type, DOM_edit_VOIPTrunk_Hostname , DOM_edit_VOIPTrunk_Username ,  DOM_edit_VOIPTrunk_Password , 'trunk_obcid' , 'edit_VOIPTrunk_Providername','trunk_fromdomain', 'trunk_fromuser', 'trunk_insecure' ]);
 		DOM_edit_VOIPTrunk_Type.disabled = false;
 		ASTGUI.feedback( { msg: 'Create New Trunk', showfor:2 });
 		$('#TR_trunktype').show();
@@ -148,6 +148,9 @@
 		ASTGUI.updateFieldToValue( DOM_edit_VOIPTrunk_Username , tinfo.getProperty('username') );
 		ASTGUI.updateFieldToValue( DOM_edit_VOIPTrunk_Password , tinfo.getProperty('secret') );
 		ASTGUI.updateFieldToValue( 'edit_VOIPTrunk_Providername' , tinfo.getProperty('trunkname') );
+		ASTGUI.updateFieldToValue( 'trunk_fromdomain' , tinfo.getProperty('fromdomain') );
+		ASTGUI.updateFieldToValue( 'trunk_fromuser' , tinfo.getProperty('fromuser') );
+		ASTGUI.updateFieldToValue( 'trunk_insecure' , tinfo.getProperty('insecure') );
 
 		if( tinfo.getProperty('allow') == 'all'){
 			ASTGUI.updateFieldToValue( 'codec_one', 'ulaw' );
@@ -271,6 +274,35 @@
 
 		x.new_action('update', EDIT_TRUNK , 'host', ASTGUI.getFieldValue(DOM_edit_VOIPTrunk_Hostname) );
 			parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['host'] = ASTGUI.getFieldValue(DOM_edit_VOIPTrunk_Hostname) ;
+
+
+		(function(){
+			var tmp_fromdomain = ASTGUI.getFieldValue('trunk_fromdomain') ;
+			if( tmp_fromdomain ){
+				x.new_action('update', EDIT_TRUNK , 'fromdomain', tmp_fromdomain );
+				parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['fromdomain'] = tmp_fromdomain ;
+			}else{
+				if( parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK].hasOwnProperty('fromdomain') ){
+					delete parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['fromdomain'] ;
+				}
+			}
+	
+			var tmp_fromuser = ASTGUI.getFieldValue('trunk_fromuser') ;
+			if( tmp_fromuser ){
+				x.new_action('update', EDIT_TRUNK , 'fromuser', tmp_fromuser );
+				parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['fromuser'] = tmp_fromuser ;
+			}else{
+				if( parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK].hasOwnProperty('fromuser') ){
+					delete parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['fromuser'] ;
+				}
+			}
+
+			var tmp_insecure = ASTGUI.getFieldValue('trunk_insecure') ;
+			x.new_action('update', EDIT_TRUNK , 'insecure', tmp_insecure );
+			parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['insecure'] = tmp_insecure ;
+		})();
+
+
 		x.new_action('update', EDIT_TRUNK , 'secret', ASTGUI.getFieldValue(DOM_edit_VOIPTrunk_Password) );
 			parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['secret'] = ASTGUI.getFieldValue(DOM_edit_VOIPTrunk_Password) ;
 		x.new_action('update', EDIT_TRUNK , 'username', ASTGUI.getFieldValue(DOM_edit_VOIPTrunk_Username) );
@@ -522,7 +554,7 @@
 
 	<TR class='editTrunk_Field'>
 		<TD align="right" valign=top>Codecs :</TD>
-		<TD align="left" colspan=2>
+		<TD align="left">
 			First : <select id='codec_one'></select>
 			Second : <select id='codec_two'></select>
 			Third : <select id='codec_three'></select><BR>
@@ -533,7 +565,22 @@
 
 	<TR  class='editTrunk_Field'>
 		<TD align="right" valign=top>CallerID <img src="images/tooltip_info.gif" tip="en,trunks,36" class='tooltipinfo'> :</TD>
-		<TD align="left" colspan=2>	<input id="trunk_obcid" size=16>	</TD>
+		<TD align="left">	<input id="trunk_obcid" size=16>	</TD>
+	</TR>
+
+	<TR class='editTrunk_Field'>
+		<TD align="right" valign=top>FromDomain :</TD>
+		<TD align="left"> <input id="trunk_fromdomain" size=16> </TD>
+	</TR>
+
+	<TR class='editTrunk_Field'>
+		<TD align="right" valign=top>FromUser :</TD>
+		<TD align="left"> <input id="trunk_fromuser" size=16> </TD>
+	</TR>
+
+	<TR class='editTrunk_Field'>
+		<TD align="right" valign=top>insecure :</TD>
+		<TD align="left"> <select id="trunk_insecure" dfalt='no' class="input8"><option value='port'>port</option><option value='port,invite'>very</option><option value='no'>no</option></select> </TD>
 	</TR>
 
 	<TR class='editTrunk_Field_ermwi'>




More information about the asterisk-gui-commits mailing list