pari: branch 2.0 r4398 - in /branches/2.0/config: ./ js/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Jan 7 14:15:49 CST 2009
Author: pari
Date: Wed Jan 7 14:15:49 2009
New Revision: 4398
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4398
Log:
patch by thias - Prevent redirect not editable in ring groups
(closes issue #13773)
Modified:
branches/2.0/config/js/pbx.js
branches/2.0/config/js/ringgroups.js
branches/2.0/config/ringgroups.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=4398&r1=4397&r2=4398
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Wed Jan 7 14:15:49 2009
@@ -1635,6 +1635,7 @@
rg.NAME = '';
rg.members = [];
rg.strategy = '';
+ rg.ignore = true ;
if( cxt[0].contains('exten=s,1') && cxt[0].toLowerCase().contains('noop(') ){
rg.NAME = cxt[0].betweenXY( '(' , ')' );
@@ -1658,6 +1659,7 @@
rg.members.push( args[0] );
}
rg.ringtime = ( args[1] );
+ rg.ignore = ( args[2] && args[2].contains('i') ) ? true : false ;
}
});
@@ -1704,6 +1706,7 @@
if( !rg.fallback ){
rg.fallback = 'Hangup'
}
+ var tmp_ignore = (rg.ignore) ? '${DIALOPTIONS}i' : '${DIALOPTIONS}' ;
var x = new listOfActions();
x.filename('extensions.conf');
x.new_action('newcat', newrg , '', '');
@@ -1711,12 +1714,12 @@
if( rg.strategy == 'ringinorder' ){
rg.members.each(
function(member){
- x.new_action('append', newrg, 'exten', 's,n,Dial(' + member +',' + rg.ringtime + ',${DIALOPTIONS}i)' );
+ x.new_action('append', newrg, 'exten', 's,n,Dial(' + member +',' + rg.ringtime + ','+ tmp_ignore + ')' );
}
);
}else{
if(rg.members.length){
- x.new_action('append', newrg, 'exten', 's,n,Dial(' + rg.members.join('&') +',' + rg.ringtime + ',${DIALOPTIONS}i)' );
+ x.new_action('append', newrg, 'exten', 's,n,Dial(' + rg.members.join('&') +',' + rg.ringtime + ',' + tmp_ignore + ')');
}
}
x.new_action( 'append', newrg, 'exten', 's,n,' + rg.fallback );
Modified: branches/2.0/config/js/ringgroups.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/ringgroups.js?view=diff&rev=4398&r1=4397&r2=4398
==============================================================================
--- branches/2.0/config/js/ringgroups.js (original)
+++ branches/2.0/config/js/ringgroups.js Wed Jan 7 14:15:49 2009
@@ -51,7 +51,7 @@
DOM_text_rgExten = _$('text_rgExten');
DOM_text_ringTime = _$('text_ringTime');
DOM_rg_fb_select = _$('rg_fb_select');
-
+ DOM_edit_ignoreRedir = _$('edit_ignoreRedir');
};
var ringGroupExistsbyThisName = function( thisName ){
@@ -114,7 +114,9 @@
members : TEMP_members,
extension : RG_EXTEN ,
ringtime : DOM_text_ringTime.value ,
- fallback : ''
+ fallback : '',
+ ignore : _$('edit_ignoreRedir').checked
+
};
tmp_obj = ASTGUI.toCustomObject(tmp_obj);
@@ -134,6 +136,7 @@
if(isNewRG){
_$('rgedit_form_caption').innerHTML = 'New RingGroup';
DOM_text_rgname.value = '';
+ DOM_edit_ignoreRedir.checked = true;
//DOM_select_strategy.selectedIndex = -1 ;
ASTGUI.selectbox.clear( DOM_select_ringthesechannels );
ASTGUI.selectbox.clear( DOM_select_fromlistofchannels );
@@ -222,6 +225,7 @@
}});
DOM_text_rgExten.value = (c['extension'])?c['extension']:'' ;
DOM_text_ringTime.value = (c['ringtime'])?c['ringtime']:'' ;
+ DOM_edit_ignoreRedir.checked = (c['ignore']==true) ;
// select value from select box DOM_rg_fb_select
var destinations = parent.miscFunctions.getAllDestinations() ;
Modified: branches/2.0/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/ringgroups.html?view=diff&rev=4398&r1=4397&r2=4398
==============================================================================
--- branches/2.0/config/ringgroups.html (original)
+++ branches/2.0/config/ringgroups.html Wed Jan 7 14:15:49 2009
@@ -104,7 +104,6 @@
<select id="select_fromlistofchannels" style="width: 240px" size=8></select>
</td>
</tr>
-
<tr> <td colspan=3>
<fieldset>
<legend> Ring Group Options : </legend>
@@ -122,6 +121,9 @@
<tr> <td align="right" class="field_text">If not answered Goto : </td>
<td><select id='rg_fb_select' dfalt='Hangup' required='yes'></select></td>
</tr>
+ <tr> <td align="right" class="field_text">Ignore redirections : </td>
+ <td><input type='checkbox' id='edit_ignoreRedir'></td>
+ </tr>
<tr> <td align="right" colspan=2 height=10></td>
</tr>
<tr> <td align=right colspan=2>
More information about the asterisk-gui-commits
mailing list