pari: branch 2.0 r3976 - in /branches/2.0/config: js/pbx.js trunks_voip.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Mon Oct 20 10:54:37 CDT 2008
Author: pari
Date: Mon Oct 20 10:54:37 2008
New Revision: 3976
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3976
Log:
Fix for : Cannot add multiple trunks with same username using version 2.0 of GUI
http://bugs.digium.com/view.php?id=13497
Fix: use tr.username as trunk name when no trunk exists by tr.username, else use trunk_x
Modified:
branches/2.0/config/js/pbx.js
branches/2.0/config/trunks_voip.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=3976&r1=3975&r2=3976
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Mon Oct 20 10:54:37 2008
@@ -891,7 +891,9 @@
// add some default values for any IAXTrunk
// var trunk = astgui_managetrunks.misc.nextAvailableTrunk_x();
- var trunk = tr.username ;
+ var tmp_trunksList = astgui_managetrunks.listofAllTrunks();
+ var trunk = ( tmp_trunksList.contains(tr.username) ) ? astgui_managetrunks.misc.nextAvailableTrunk_x() : tr.username ;
+
sessionData.pbxinfo.trunks.iax[trunk] = new ASTGUI.customObject; // add new/reset iax trunk info in sessionData
tr.hasiax = 'yes' ;
@@ -959,7 +961,9 @@
tr.allow = 'all';
//var trunk = astgui_managetrunks.misc.nextAvailableTrunk_x();
- var trunk = tr.username ;
+ var tmp_trunksList = astgui_managetrunks.listofAllTrunks();
+ var trunk = ( tmp_trunksList.contains(tr.username) ) ? astgui_managetrunks.misc.nextAvailableTrunk_x() : tr.username ;
+
var ct = ASTGUI.contexts.TrunkDIDPrefix + trunk;
var x = new listOfActions();
Modified: branches/2.0/config/trunks_voip.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/trunks_voip.html?view=diff&rev=3976&r1=3975&r2=3976
==============================================================================
--- branches/2.0/config/trunks_voip.html (original)
+++ branches/2.0/config/trunks_voip.html Mon Oct 20 10:54:37 2008
@@ -228,10 +228,10 @@
if( isNewTrunk == true ) {
// New Trunk
var tmp_ttype = parent.astgui_managetrunks.misc.getTrunkType( DOM_edit_VOIPTrunk_Username.value );
- if( tmp_ttype ){
- ASTGUI.highlightField( DOM_edit_VOIPTrunk_Username , "Another trunk exists with this name !!" );
- return;
- }
+ //if( tmp_ttype ){
+ // ASTGUI.highlightField( DOM_edit_VOIPTrunk_Username , "Another trunk exists with this name !!" );
+ // return;
+ //}
var ttv = DOM_edit_VOIPTrunk_Type.value;
var trp = {
More information about the asterisk-gui-commits
mailing list