pari: branch 2.0 r3645 - in /branches/2.0/config: js/pbx.js trunks_analog.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Aug 8 18:27:54 CDT 2008
Author: pari
Date: Fri Aug 8 18:27:54 2008
New Revision: 3645
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3645
Log:
ABE-1608
the asterisk-gui builds a group of analog trunks in the following way
signalling = type
zapchan = number
signalling = type
zapchan = number
this is broken as only the last is read in by ast_variable_retrieve
Fix: do it like gui-1.0
signalling = type
channel = number
signalling = type
channel = number
Modified:
branches/2.0/config/js/pbx.js
branches/2.0/config/trunks_analog.html
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=3645&r1=3644&r2=3645
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Fri Aug 8 18:27:54 2008
@@ -789,6 +789,11 @@
sessionData.pbxinfo.trunks.analog[trunk] = new ASTGUI.customObject; // add new/reset analog trunk info in sessionData
x.new_action('append', trunk, 'group', group);
sessionData.pbxinfo.trunks.analog[trunk]['group'] = group;
+ x.new_action('append', trunk, 'zapchan', tr.zapchan);
+ sessionData.pbxinfo.trunks.analog[trunk]['zapchan'] = tr.zapchan ;
+ var zap_channels = ASTGUI.miscFunctions.chanStringToArray(tr.zapchan);
+ delete tr.zapchan ;
+
x.new_action('append', trunk, 'hasexten', 'no');
sessionData.pbxinfo.trunks.analog[trunk]['hasexten'] = 'no';
x.new_action('append', trunk, 'hasiax', 'no');
@@ -799,11 +804,8 @@
sessionData.pbxinfo.trunks.analog[trunk]['trunkstyle'] = 'analog';
x.new_action('append', trunk, 'context', ct);
sessionData.pbxinfo.trunks.analog[trunk]['context'] = ct;
- var zap_channels = ASTGUI.miscFunctions.chanStringToArray(tr.zapchan);
+
// var trunk_name = ( zap_channels.length > 1 ) ? 'Ports ' + tr.zapchan : 'Port ' + tr.zapchan ;
- sessionData.pbxinfo.trunks.analog[trunk]['zapchan'] = tr.zapchan ;
- delete tr.zapchan ;
-
x.new_action('append', trunk, 'trunkname', tr.trunkname.guiMetaData() );
sessionData.pbxinfo.trunks.analog[trunk]['trunkname'] = tr.trunkname;
delete tr.trunkname;
@@ -825,7 +827,7 @@
var temp_ls_List = ASTGUI.cloneObject( parent.sessionData.PORTS_SIGNALLING.ls ) ;
var sg = ( temp_ls_List.contains(channel) ) ? 'fxs_ls':'fxs_ks' ;
x.new_action('append', trunk, 'signalling', sg);
- x.new_action( 'append', trunk , 'zapchan', channel );
+ x.new_action( 'append', trunk , 'channel', channel );
} );
var cb = function(){
Modified: branches/2.0/config/trunks_analog.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/trunks_analog.html?view=diff&rev=3645&r1=3644&r2=3645
==============================================================================
--- branches/2.0/config/trunks_analog.html (original)
+++ branches/2.0/config/trunks_analog.html Fri Aug 8 18:27:54 2008
@@ -174,12 +174,13 @@
// just update the selected channels
(function(){
var x = new listOfSynActions('users.conf');
+ x.new_action('update', EDIT_TRUNK , 'zapchan', scs );
x.new_action('delete', EDIT_TRUNK , 'gui_volume', '' );
x.new_action('delete', EDIT_TRUNK , 'gui_fxooffset', '' );
x.new_action('delete', EDIT_TRUNK , 'rxgain', '' );
x.new_action('delete', EDIT_TRUNK , 'txgain', '' );
x.new_action('delete', EDIT_TRUNK , 'signalling', '' );
- x.new_action('delete', EDIT_TRUNK , 'zapchan', '' );
+ x.new_action('delete', EDIT_TRUNK , 'channel', '' );
x.callActions();
x.clearActions();
@@ -187,10 +188,14 @@
parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK]['trunkname'] = trunk_name ;
var zap_channels = ASTGUI.miscFunctions.chanStringToArray(scs);
+
+ for(var p in VOLSETTINGS){ if ( VOLSETTINGS.hasOwnProperty(p) && !zap_channels.contains(p) ) {
+ delete VOLSETTINGS[p];
+ }}
zap_channels.each( function(channel){
var sg = (parent.sessionData.PORTS_SIGNALLING.ls.contains(channel)) ? 'fxs_ls':'fxs_ks' ;
x.new_action('append', EDIT_TRUNK, 'signalling', sg);
- x.new_action( 'append', EDIT_TRUNK , 'zapchan', channel );
+ x.new_action( 'append', EDIT_TRUNK , 'channel', channel );
} );
x.callActions();
})();
@@ -329,14 +334,14 @@
sel.id='port_' + channel+ '_guivolume' ;
newcell.appendChild(sel);
VOLSETTINGS[channel] = {};
- var t = c.indexOf( 'zapchan=' + channel );
+ var t = c.indexOf( 'channel=' + channel );
if( t == -1 ){
ASTGUI.selectbox.selectOption (sel, '2') ;
VOLSETTINGS[channel].gui_volume = 2 ;
VOLSETTINGS[channel].linestodelete = [];
return;
}
- var s = c.slice(0, t).lastIndexOfLike('zapchan=') ;
+ var s = c.slice(0, t).lastIndexOfLike('channel=') ;
s = (s == -1) ? 0 : s ;
var thisChannelSettings_ConfigArray = c.slice(s,t);
var gvi = thisChannelSettings_ConfigArray.indexOfLike('gui_volume') ;
@@ -356,7 +361,7 @@
x.new_action('delete', EDIT_TRUNK , 'rxgain', '' );
x.new_action('delete', EDIT_TRUNK , 'txgain', '' );
x.new_action('delete', EDIT_TRUNK , 'signalling', '' );
- x.new_action('delete', EDIT_TRUNK , 'zapchan', '' );
+ x.new_action('delete', EDIT_TRUNK , 'channel', '' );
for(var p in VOLSETTINGS){ if ( VOLSETTINGS.hasOwnProperty(p) ) {
var gv = ASTGUI.getFieldValue( _$( 'port_' + p + '_guivolume' ) );
x.new_action('append', EDIT_TRUNK , 'gui_volume', gv.guiMetaData() );
@@ -370,7 +375,7 @@
x.new_action('append', EDIT_TRUNK , 'gui_fxooffset', fx.guiMetaData() );
x.new_action('append', EDIT_TRUNK , 'rxgain', fx + Number(get_guiVolValue[gv]) );
x.new_action('append', EDIT_TRUNK , 'txgain', '0.0' );
- x.new_action('append', EDIT_TRUNK , 'zapchan', p );
+ x.new_action('append', EDIT_TRUNK , 'channel', p );
}}
var after = function(){
@@ -390,7 +395,7 @@
x.new_action('delete', EDIT_TRUNK , 'gui_fxooffset', '' );
x.new_action('delete', EDIT_TRUNK , 'rxgain', '' );
x.new_action('delete', EDIT_TRUNK , 'txgain', '' );
- x.new_action('delete', EDIT_TRUNK , 'zapchan', '' );
+ x.new_action('delete', EDIT_TRUNK , 'channel', '' );
var after = function(){
var f = new listOfSynActions('fxotune.conf');
More information about the asterisk-gui-commits
mailing list