rbrindley: branch rbrindley/vmenus_revamp r4416 - in /team/rbrindley/vmenus_r...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Jan 13 11:11:25 CST 2009
Author: rbrindley
Date: Tue Jan 13 11:11:25 2009
New Revision: 4416
URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4416
Log:
- merged from 4381:HEAD of branches/2.0/
Modified:
team/rbrindley/vmenus_revamp/config/js/astman.js
team/rbrindley/vmenus_revamp/config/js/index.js
team/rbrindley/vmenus_revamp/config/js/pbx.js
team/rbrindley/vmenus_revamp/config/js/ringgroups.js
team/rbrindley/vmenus_revamp/config/js/tooltip.js
team/rbrindley/vmenus_revamp/config/js/trunks_analog.js
team/rbrindley/vmenus_revamp/config/ringgroups.html
team/rbrindley/vmenus_revamp/config/users.html
Modified: team/rbrindley/vmenus_revamp/config/js/astman.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/astman.js?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/astman.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/astman.js Tue Jan 13 11:11:25 2009
@@ -379,8 +379,10 @@
},
ASTDB:{
- updateKey : function( k ){ // ASTGUI.ASTDB.updateKey( { dbname: 'astgui', key : 'keyname', keyvalue : 'keyvalue' } );
- // k = { dbname: 'astgui', key : 'keyname', keyvalue : 'keyvalue' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ updateKey : function( k ){
+ // ASTGUI.ASTDB.updateKey( { dbname: 'astgui', key : 'keyname', keyvalue : 'keyvalue' } );
+ // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ // returns true if success, false otherwise
if( !k.hasOwnProperty('dbname') ){
k.dbname = ASTGUI.globals.GUI_DB ;
}
@@ -390,8 +392,10 @@
return false;
},
- deleteKey : function( k ){ // ASTGUI.ASTDB.deleteKey( { dbname: 'astgui', key : 'keyname' } );
- // k = { dbname: 'astgui', key : 'keyname' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ deleteKey : function( k ){
+ // ASTGUI.ASTDB.deleteKey( { dbname: 'astgui', key : 'keyname' } );
+ // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ // returns true if success, false otherwise
if( !k.hasOwnProperty('dbname') ){
k.dbname = ASTGUI.globals.GUI_DB ;
}
@@ -402,8 +406,10 @@
},
- getKey : function(k){ // ASTGUI.ASTDB.getKey( { dbname: 'astgui', key : 'keyname' } );
- // k = { dbname: 'astgui', key : 'keyname' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ getKey : function(k){
+ // ASTGUI.ASTDB.getKey( { dbname: 'astgui', key : 'keyname' } );
+ // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ // returns null if key is not found, otherwise returns the key-value
if( !k.hasOwnProperty('dbname') ){
k.dbname = ASTGUI.globals.GUI_DB ;
}
@@ -416,8 +422,12 @@
return op.trim();
},
- getAllKeys : function(k){ // ASTGUI.ASTDB.getAllKeys( { dbname: 'astgui' } );
- // k = { dbname: 'astgui' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ getAllKeys : function(k){
+ // ASTGUI.ASTDB.getAllKeys( { dbname: 'astgui' } );
+ // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+ // returns an object with all the keys in the database as properties and key-values as propertyvalues
+ // returns a null if database not found
+
if( !k.hasOwnProperty('dbname') ){
k.dbname = ASTGUI.globals.GUI_DB ;
}
@@ -1372,13 +1382,13 @@
empty_context: function( ct ){ // ASTGUI.miscFunctions.empty_context({ filename:'somefile.conf', context : 'context_x', cb : fn })
try{
- if( parent.sessionData.PLATFORM.isAST_1_6 ){
- var u = new listOfSynActions(ct.filename);
- u.new_action('emptycat', ct.context , '', '' ) ;
- u.callActions();
- ct.cb();
- return;
- }else{
+ //if( parent.sessionData.PLATFORM.isAST_1_6 ){
+ // var u = new listOfSynActions(ct.filename);
+ // u.new_action('emptycat', ct.context , '', '' ) ;
+ // u.callActions();
+ // ct.cb();
+ // return;
+ //}else{
var sel_cxt = context2json({ filename: ct.filename , context : ct.context , usf:0 });
var x = new listOfActions(ct.filename);
sel_cxt.each(function(line){
@@ -1387,7 +1397,7 @@
x.new_action('delete', ct.context , var_name, '', var_value);
});
x.callActions(ct.cb);
- }
+ //}
}catch(err){
ASTGUI.Log.Error(err.description);
}
Modified: team/rbrindley/vmenus_revamp/config/js/index.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/index.js?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/index.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/index.js Tue Jan 13 11:11:25 2009
@@ -208,6 +208,23 @@
u.new_action('delcat', rand , '', '') ;
u.callActions();
ASTGUI.cookies.setCookie( 'rwaccess' , 'yes' );
+
+ if( sessionData.PLATFORM.isAST_1_6 ){
+ // make sure originate privilege is defined in asterisk 1.6
+ // This was introduced in Asterisk 1.6 and users upgrading from 1.4 do not have this
+ var tmp_managerUser = ASTGUI.cookies.getCookie('username') ;
+ var manager_conf = config2json({ filename:'manager.conf', usf:1 });
+ if( manager_conf[tmp_managerUser].hasOwnProperty('write') ){
+ var write_value = manager_conf[tmp_managerUser]['write'];
+ if( !write_value.contains('originate') ){
+ var u = new listOfSynActions('manager.conf');
+ u.new_action( 'update', tmp_managerUser, 'write', write_value + ',originate' , write_value );
+ u.callActions();
+ return 'manager_updated'; // about to reload
+ }
+ }
+ }
+
return true;
},
@@ -287,10 +304,14 @@
ASTGUI.dialog.alertmsg('The GUI does not have necessary privileges. <BR> Please check the manager permissions for the user !');
return;
}
- if( crwp == 'postmappings_updated' ){
+ if( crwp == 'postmappings_updated' || crwp == 'manager_updated' ){
parent.ASTGUI.dialog.waitWhile(' reloading asterisk ... ');
var t = ASTGUI.cliCommand('reload') ;
setTimeout( function(){
+ if( sessionData.PLATFORM.isAST_1_6 ){
+ alert(' Config files updated. '
+ + '\n' + ' Please stop Asterisk and Start over for the changes to take effect' );
+ }
if( sessionData.DEBUG_MODE ){
alert('postmappings updated in http.conf' + '\n' + 'Click OK to reload');
}
@@ -597,6 +618,9 @@
},
applyChanges : function(cb){
+ if( sessionData.hasOwnProperty('gui_version') && sessionData.gui_version.trim() ){
+ ASTGUI.updateaValue({ file: ASTGUI.globals.configfile , context :'general', variable :'config_gui_version', value : sessionData.gui_version });
+ }
var u = _$('applyChanges_Button');
if (sessionData.PLATFORM.isAST_1_4) {
var t = ASTGUI.cliCommand('reload') ;
@@ -606,10 +630,6 @@
u.style.display = 'none';
ASTGUI.cookies.removeCookie('configFilesChanged');
ASTGUI.feedback({msg:'Asterisk Reloaded !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
-
- if( sessionData.hasOwnProperty('gui_version') && sessionData.gui_version.trim() ){
- ASTGUI.updateaValue({ file: ASTGUI.globals.configfile , context :'general', variable :'config_gui_version', value : sessionData.gui_version });
- }
if(sessionData.PLATFORM.isAA50 ){
//TODO - Save Changes
Modified: team/rbrindley/vmenus_revamp/config/js/pbx.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/pbx.js?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/pbx.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/pbx.js Tue Jan 13 11:11:25 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: team/rbrindley/vmenus_revamp/config/js/ringgroups.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/ringgroups.js?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/ringgroups.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/ringgroups.js Tue Jan 13 11:11:25 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: team/rbrindley/vmenus_revamp/config/js/tooltip.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/tooltip.js?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/tooltip.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/tooltip.js Tue Jan 13 11:11:25 2009
@@ -66,6 +66,8 @@
tooltips['users'] .en[30] = "<B>Flash</B> sets the amount of time, in milliseconds, that must have passed since the last hook-flash event received by asterisk before it will recognize a second event. If a second event occurs in less time than defined for Flash, then asterisk will ignore the event. The default value of Flash is 750 ms, and it can be configured in 1ms increments." ;
tooltips['users'] .en[31] = "<B>RXFlash</B> sets the amount of time, in milliseconds, that the hook-flash must remain depressed in order for asterisk to consider such an event a valid flash event. The default value of RXFlash is 1250ms and it can be configured in 1ms increments." ;
+
+ tooltips['users'] .en[94] = "Line Keys is the number of lines that are tied to this SIP registration.";
tooltips['users'] .en[95] = "<B>Codecs</B> A codec is a compression or decompression algorithm run against voice as it is moved between analog (speaking) and digital (VoIP). <B>u-law</B> A PSTN standard codec, used in North America, that provides very good voice quality and consumes 64kbit/s for each direction (receiving and transmitting) of a VoIP call. u-law should be supported by all VoIP phones. <B>a-law</B> A PSTN standard codec, used outside of North America, that provides very good voice quality and consumes 64kbit/s for each direction (receiving and transmitting) of a VoIP call. a-law should be supported by all VoIP phones. <B>GSM</B> A wireless standard codec, used worldwide, that provides okay voice quality and consumes 13.3kbit/s for each direction (receiving and transmitting) of a VoIP call. GSM is supported by many VoIP phones. <B>G.726</B> A PSTN codec, used worldwide, that provides good voice quality and consumes 32kbit/s for each direction (receiving and transmitting) of a VoIP call. G.726 is supported by some VoIP phones. <B>G.722</B> A high-fidelity codec for VoIP calls that provides excellent voice quality and consumes 64kbit/s for each direction (receiving and transmitting) of a VoIP call. At present, G.722 is only supported by a limited number of VoIP phones.";
Modified: team/rbrindley/vmenus_revamp/config/js/trunks_analog.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/trunks_analog.js?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/trunks_analog.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/trunks_analog.js Tue Jan 13 11:11:25 2009
@@ -151,7 +151,7 @@
window.location.reload();
};
- var tmp_object = {'zapchan':scs , trunkname: trunk_name } ;
+ var tmp_object = {'zapchan':scs , 'trunkname': trunk_name } ;
Electrical_Fields.each(function(fld){
tmp_object[fld] = ASTGUI.getFieldValue( _$(fld) );
});
Modified: team/rbrindley/vmenus_revamp/config/ringgroups.html
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/ringgroups.html?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/ringgroups.html (original)
+++ team/rbrindley/vmenus_revamp/config/ringgroups.html Tue Jan 13 11:11:25 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>
Modified: team/rbrindley/vmenus_revamp/config/users.html
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/users.html?view=diff&rev=4416&r1=4415&r2=4416
==============================================================================
--- team/rbrindley/vmenus_revamp/config/users.html (original)
+++ team/rbrindley/vmenus_revamp/config/users.html Tue Jan 13 11:11:25 2009
@@ -184,7 +184,7 @@
<option value='5'>5</option>
<option value='6'>6</option>
</select>
- <img src="images/tooltip_info.gif" tip="en,users,2" class='tooltipinfo'>
+ <img src="images/tooltip_info.gif" tip="en,users,94" class='tooltipinfo'>
SIP/IAX Password: <input id="edit_secret" size=6>
<img src="images/tooltip_info.gif" tip="en,users,2" class='tooltipinfo'>
More information about the asterisk-gui-commits
mailing list