rbrindley: branch 2.0 r4828 - /branches/2.0/config/js/trunks_analog.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jun 2 17:32:05 CDT 2009


Author: rbrindley
Date: Tue Jun  2 17:32:02 2009
New Revision: 4828

URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4828
Log:

- fixed an issue where analog trunks didn't even save/edit/view the callerid
  field (asreceived or custom)


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

Modified: branches/2.0/config/js/trunks_analog.js
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/js/trunks_analog.js?view=diff&rev=4828&r1=4827&r2=4828
==============================================================================
--- branches/2.0/config/js/trunks_analog.js (original)
+++ branches/2.0/config/js/trunks_analog.js Tue Jun  2 17:32:02 2009
@@ -88,6 +88,11 @@
 		ASTGUI.updateFieldToValue( _$(fld) ,  fld_value );
 	} );
 
+	if (parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['callerid'] != 'asreceived') {
+		ASTGUI.updateFieldToValue(_$('dummy_customCid'), parent.sessionData.pbxinfo.trunks.analog[EDIT_TRUNK].callerid);
+		ASTGUI.updateFieldToValue( _$('dummy_callerid'), 'custom');
+	}
+
 	var variablename =  ASTGUI.globals.obcidUsrPrefix + EDIT_TRUNK ;
 	var c = context2json({ filename:'extensions.conf', context: 'globals' , usf: 1 });
 	ASTGUI.updateFieldToValue( 'trunk_obcid', getProperty(c, variablename) );
@@ -155,6 +160,12 @@
 		Electrical_Fields.each(function(fld){
 			tmp_object[fld] = ASTGUI.getFieldValue( _$(fld) );
 		});
+
+		if ($('#dummy_callerid').val() == 'asreceived') {
+			tmp_object['callerid'] = 'asreceived';
+		} else {
+			tmp_object['callerid'] = $('#dummy_customCid').val();
+		}
 
 		parent.pbx.trunks.add('analog', tmp_object , cbf ) ;
 		return;
@@ -291,6 +302,12 @@
 	Electrical_Fields.each(function(fld){
 		x.new_action('update', EDIT_TRUNK , fld , ASTGUI.getFieldValue( _$(fld) ) ) ;
 	});
+
+	if ($('#dummy_callerid').val() == 'asreceived') {
+		x.new_action('update', EDIT_TRUNK, 'callerid', 'asreceived');
+	} else {
+		x.new_action('update', EDIT_TRUNK, 'callerid', $('#dummy_customCid').val());
+	}
 
 	var after = function(){
 		parent.ASTGUI.dialog.hide();




More information about the asterisk-gui-commits mailing list