pari: branch asterisknow r661 - in /branches/asterisknow: ./ config/
config/s...
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Apr 16 05:54:32 MST 2007
Author: pari
Date: Mon Apr 16 07:54:31 2007
New Revision: 661
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=661
Log:
merging 654 to 658
Added:
branches/asterisknow/scripts/listfiles
- copied unchanged from r658, trunk/scripts/listfiles
branches/asterisknow/scripts/output_path
- copied unchanged from r658, trunk/scripts/output_path
Modified:
branches/asterisknow/ (props changed)
branches/asterisknow/config/backup.html
branches/asterisknow/config/cfgbasic.html
branches/asterisknow/config/feditor.html
branches/asterisknow/config/incoming.html
branches/asterisknow/config/menus.html
branches/asterisknow/config/moh.html
branches/asterisknow/config/numberplan.html
branches/asterisknow/config/record.html
branches/asterisknow/config/scripts/astman.js
branches/asterisknow/scripts/gui_sysinfo
Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Apr 16 07:54:31 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-648,659
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-660
Modified: branches/asterisknow/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/backup.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/backup.html (original)
+++ branches/asterisknow/config/backup.html Mon Apr 16 07:54:31 2007
@@ -30,7 +30,7 @@
setWindowTitle("Backup");
showdiv_statusmessage();
- parent.astmanEngine.run_tool(asterisk_guiSysInfo, callback = function() {
+ parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_ConfigBkpPath, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
_$('sysinfohtml').innerHTML = originalRequest.responseText;
@@ -46,9 +46,8 @@
function showlist_of_files(){
- var k = _$('bkp_files').innerHTML ;
+ var k = _$('list_files').innerHTML ;
var bkpfiles = k.split("\n") ;
-
clear_table();
for( var i =0 ; i < bkpfiles.length ; i++){
@@ -170,7 +169,7 @@
//var seconds =addzero(today.getSeconds());
var bkpfile = _nn.value +"__" + year + month + day +".tar";
- parent.astmanEngine.run_tool("/bin/tar -cf "+ asterisk_ConfigBkpPath + bkpfile +" /etc/asterisk/", callback=function(){
+ parent.astmanEngine.run_tool("/bin/tar -cf "+ asterisk_ConfigBkpPath + bkpfile + " " + asterisk_configfolder, callback=function(){
gui_feedback('Backup Successfull!','blue');
window.location.href = window.location.href ;
}
Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Mon Apr 16 07:54:31 2007
@@ -110,13 +110,13 @@
new PanelDef("sip", "SIP", "accordion-icon.gif", "SIP (Session Initiation Protocol) Configuration"),
- new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration"),
-
- new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
-
- new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
-
- new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration")
+ new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration")
+
+// new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
+
+// new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
+
+// new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration")
);
}
Modified: branches/asterisknow/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/feditor.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/feditor.html (original)
+++ branches/asterisknow/config/feditor.html Mon Apr 16 07:54:31 2007
@@ -87,14 +87,60 @@
function localajaxinit() {
top._$('mainscreen').width= 798;
setWindowTitle("File Editor");
+ load_recordedfiles();
+ add_event( _$('filenames') , 'change' , loadfile ) ;
parent.loadscreen(this);
- setTimeout( function(){ _$('filename').focus();}, 200);
-
-}
+}
+
+function load_recordedfiles(){
+ parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_configfolder, callback = function() {
+ var opt = { method: 'get', asynchronous: true,
+ onComplete: function(originalRequest){
+ // Add config files to the list of files
+ _$('sysinfohtml').innerHTML = originalRequest.responseText;
+ var k = _$('list_files').innerHTML ;
+ var recfiles = k.split("\n") ;
+
+ New_OPTION = document.createElement('option');
+ New_OPTION.text = "Config Files" ;
+ New_OPTION.value = "" ;
+ New_OPTION.style.fontWeight = "bold";
+ try {
+ _$('filenames').add(New_OPTION, null); // W3C way
+ }catch(ex) {
+ _$('filenames').add(New_OPTION); // IE way
+ }
+
+ var file_name;
+ for( var i =0 ; i < recfiles.length ; i++){
+ if( typeof recfiles[i] == "undefined" || recfiles[i] == "" ){
+ continue;
+ }
+ recfiles[i] = recfiles[i].replace(/^\s*|\s*$/g,'') ;
+ if( recfiles[i] == "" ){ continue; }
+ file_name = recfiles[i].stripTags() ;
+ New_OPTION = document.createElement('option');
+ New_OPTION.text = file_name ;
+ New_OPTION.value = file_name ;
+ try {
+ _$('filenames').add(New_OPTION, null); // W3C way
+ }catch(ex) {
+ _$('filenames').add(New_OPTION); // IE way
+ }
+ }
+ },
+ onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
+ };
+ opt.parameters="";
+ var tmp = new Ajax.Request(asterisk_guiSysInfo_output , opt);
+ });
+}
+
function loadfile(){
- global_fileBeingEdited = _$('filename').value ;
+ if( !_$('filenames').value ) return;
+ global_fileBeingEdited = _$('filenames').value ;
_$('AddContext').style.display = "none";
_$('div_filename').style.display = "";
_$('CurrentFileName').innerHTML = global_fileBeingEdited;
@@ -307,7 +353,7 @@
<div style="font-size : 12px; padding : 4px 6px 4px 6px; border-style : solid none solid none; border-top-color : #BDC7E7; border-bottom-color : #182052; border-width : 1px 0px 1px 0px; background-color : #ef8700; color : #ffffff;">
<span style="margin-left: 4px;font-weight:bold;">File Editor</span>
<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
- <span><input id="filename" size=15 class="input9"> <input type="button" value="Go" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="loadfile();"></span>
+ <span><select id="filenames" class="input9"></select></span>
</div>
<div style="display:none; font-size:14px; font-weight:bold; font-family:helvetica,sans-serif,'trebuchet ms'; padding : 6px 0px 6px 10px;" id="div_filename">
<span id="CurrentFileName"></span>
@@ -337,4 +383,5 @@
<input type="button" value="Add" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="add_context();">
<input type="button" value="Cancel" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="cancel_addcontext();">
</div>
-</body>
+<div id="sysinfohtml" style="display:none"></div>
+</body>
Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Mon Apr 16 07:54:31 2007
@@ -173,9 +173,9 @@
}
if( a == "_X."){ // handling all unmatched
- return " Route all unmatched incoming calls from provider '" + trunk + "' to extension '" + exten[1] + "'" ;
- }
- return " Route incoming calls from provider '" + trunk + "' that macth pattern '" + a + "' to extension '" + exten[1] + "'" ;
+ return " Route all unmatched incoming calls from provider '" + didtrunks[b].trunkname + "' to extension '" + exten[1] + "'" ;
+ }
+ return " Route incoming calls from provider '" + didtrunks[b].trunkname + "' that macth pattern '" + a + "' to extension '" + exten[1] + "'" ;
}
Modified: branches/asterisknow/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/menus.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/menus.html (original)
+++ branches/asterisknow/config/menus.html Mon Apr 16 07:54:31 2007
@@ -46,6 +46,12 @@
if( temp[2].match("Answer") )
return "Answer the Call";
+ if( temp[2].match("Authenticate") ){
+ // Background('') - whatever in the brackets
+ temp[2] = temp[2].replace(/Authenticate\(/, "");
+ temp[2] = temp[2].replace(/\)/, "");
+ return "Authenticate for Password '" + temp[2] + "'";
+ }
if( temp[2].match("Background") ){
// Background('') - whatever in the brackets
temp[2] = temp[2].replace(/Background\(/, "");
@@ -331,6 +337,9 @@
switch ( _nsa.value ){
case 'Answer':
action_string = "s,"+ newpriority+ ",Answer";
+ break;
+ case 'Authenticate':
+ action_string = "s,"+ newpriority+ ",Authenticate(" + _nsv.value + ")";
break;
case 'Background':
action_string = "s,"+ newpriority+ ",Background(" + _nsv.value + ")";
@@ -681,7 +690,7 @@
}else if( _nsa.value== "Background" || _nsa.value== "Playback" ){
_nsv.style.display = "";
_nsv.size= 12;
- }else if( _nsa.value== "DigitTimeout" || _nsa.value== "ResponseTimeout" || _nsa.value== "Wait" || _nsa.value== "WaitExten" ){
+ }else if( _nsa.value== "Authenticate" || _nsa.value== "DigitTimeout" || _nsa.value== "ResponseTimeout" || _nsa.value== "Wait" || _nsa.value== "WaitExten" ){
_$('newstep_var_digit').style.display= "" ;
}else if(_nsa.value== "GotoMenu" ){
_nsv.value = _anm.value;
@@ -958,12 +967,12 @@
}
extencallbacks.loaded = function() {
- parent.astmanEngine.run_tool(asterisk_guiSysInfo, callback = function() {
+ parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_Sounds_path, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
_$('sysinfohtml').innerHTML = originalRequest.responseText;
// Add Default sound files to the list of sound files
- var j = _$('sound_files').innerHTML ;
+ var j = _$('list_files').innerHTML ;
var sndfiles = j.split("\n") ;
var New_OPTION = document.createElement('option');
New_OPTION.text = "Default Sounds" ;
@@ -992,8 +1001,23 @@
_$('combosel_sounds').add(New_OPTION); // IE way
}
}
+ load_recordedfiles();
+ },
+ onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
+ };
+ opt.parameters="";
+ var tmp = new Ajax.Request(asterisk_guiSysInfo_output , opt);
+ });
+}
+
+
+function load_recordedfiles(){
+ parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_menusRecord_path, callback = function() {
+ var opt = { method: 'get', asynchronous: true,
+ onComplete: function(originalRequest){
// Add Recorded Voiemenus to the list of sound files
- var k = _$('rec_files').innerHTML ;
+ _$('sysinfohtml').innerHTML = originalRequest.responseText;
+ var k = _$('list_files').innerHTML ;
var recfiles = k.split("\n") ;
New_OPTION = document.createElement('option');
New_OPTION.text = "Recorded Voicemenus" ;
@@ -1030,6 +1054,10 @@
var tmp = new Ajax.Request(asterisk_guiSysInfo_output , opt);
});
}
+
+
+
+
extencallbacks.eachline = true;
@@ -1120,6 +1148,7 @@
<select id='newstep_action' disabled onChange="update_newstep_var()" class="input8">
<option value=""> -- Select --</option>
<option value="Answer">Answer</option>
+ <option value="Authenticate">Authenticate</option>
<option value="Background">Background</option>
<!-- <option value="SetMusicOnHold">SetMusicOnHold</option> -->
<option value="DigitTimeout">DigitTimeout</option>
Modified: branches/asterisknow/config/moh.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/moh.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/moh.html (original)
+++ branches/asterisknow/config/moh.html Mon Apr 16 07:54:31 2007
@@ -62,7 +62,7 @@
<div class="mainscreenContentBox" id="userscontent">
<table class="mainscreenTable" align="center">
<tr valign="top">
- <td colspan='2'>Users:</td>
+ <td colspan='2'>List of <I>'Music On Hold'</I> Classes:</td>
</tr>
<tr valign="top">
<td height="415">
@@ -88,7 +88,7 @@
</td>
</tr>
<tr> <td class="field_text">Directory:</td>
- <td> <input size='20' id='directory' class="input8"></td>
+ <td> <input size='25' id='directory' class="input8"></td>
</tr>
<tr> <td class="field_text">Application:</td>
<td> <input size='25' id='application' class="input8"></td>
Modified: branches/asterisknow/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/numberplan.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/numberplan.html (original)
+++ branches/asterisknow/config/numberplan.html Mon Apr 16 07:54:31 2007
@@ -39,6 +39,13 @@
var pattern_beingedited ;
var pattern_beingedited_priority ;
var np_oldselect;
+
+function basicpattern(){
+ iscustom = false;
+ _$('define_advanced').style.display="none";
+ _$('define_usual').style.display="";
+}
+
function ownpattern(){
iscustom = true;
@@ -728,6 +735,7 @@
<TD valign="top" align=right> Custom Pattern: </TD>
<TD valign=top>
<input type="text" id="pattern" size="" onChange="enablesave();" onkeyup="enablesave();" class="input9"><BR>
+ <A href="#" onclick="basicpattern();">(define a Basic Pattern)</A><BR>
<table align='left' cellpadding=0 cellspacing=0>
<tr> <td class="field_text"><b>N </b></td>
<td class="field_text">Any digit from 2 to 9</td>
Modified: branches/asterisknow/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/record.html?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/record.html (original)
+++ branches/asterisknow/config/record.html Mon Apr 16 07:54:31 2007
@@ -37,7 +37,7 @@
}
function showlist_of_files(){
- var k = _$('rec_files').innerHTML ;
+ var k = _$('list_files').innerHTML ;
var recfiles = k.split("\n") ;
clear_table();
@@ -114,7 +114,7 @@
}
callbacks.loaded = function(){
- parent.astmanEngine.run_tool(asterisk_guiSysInfo, callback = function() {
+ parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_menusRecord_path, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
_$('sysinfohtml').innerHTML = originalRequest.responseText;
Modified: branches/asterisknow/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/astman.js?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/config/scripts/astman.js (original)
+++ branches/asterisknow/config/scripts/astman.js Mon Apr 16 07:54:31 2007
@@ -26,13 +26,15 @@
var asterisk_guiversion = "$Revision$";
var asterisk_guifbt = 3000; // Feedback msg time
var asterisk_ConfigBkpPath = "/var/lib/asterisk/gui_configbackups/" ;
-var asterisk_menusRecord_path = "/var/lib/asterisk/sounds/record/";
+var asterisk_Sounds_path = "/var/lib/asterisk/sounds/";
+var asterisk_menusRecord_path = asterisk_Sounds_path + "record/";
var asterisk_guiSysInfo = "sh /etc/asterisk/scripts/gui_sysinfo" ;
var asterisk_guiSysInfo_output = "./sysinfo_output.html";
var asterisk_guiZapscan = "/sbin/zapscan.bin" ;
var asterisk_rawmanPath = "../../rawman" ;
var asterisk_guiConfigFile = "guipreferences.conf"; // will be created in asterisk_configfolder, if the file does not exist
var asterisk_configfolder = "/etc/asterisk/";
+var asterisk_guiListFiles = "sh /etc/asterisk/scripts/listfiles" ;
var sortbynames = false;
var dragdata = new Object;
Modified: branches/asterisknow/scripts/gui_sysinfo
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/scripts/gui_sysinfo?view=diff&rev=661&r1=660&r2=661
==============================================================================
--- branches/asterisknow/scripts/gui_sysinfo (original)
+++ branches/asterisknow/scripts/gui_sysinfo Mon Apr 16 07:54:31 2007
@@ -1,5 +1,6 @@
#!/bin/sh
-SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
+. /etc/asterisk/scripts/output_path
+#SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
UNAME="`uname -a`"
/bin/echo "<div id=si_uname>$UNAME</div>" > $SYSINFO_OUTPUT
@@ -31,21 +32,20 @@
THIS_DAY=`/bin/date +%_d`
/bin/grep /var/log/asterisk/messages -e "$THISMONTH\( $THISDAY\| $THIS_DAY\)" > /var/lib/asterisk/static-http/config/today_log.html
+#/bin/echo "<div id=bkp_files>" >> $SYSINFO_OUTPUT
+#/bin/mkdir -p /var/lib/asterisk/gui_configbackups
+#/bin/ls /var/lib/asterisk/gui_configbackups/ >> $SYSINFO_OUTPUT
+#/bin/echo "</div>" >> $SYSINFO_OUTPUT
-/bin/echo "<div id=bkp_files>" >> $SYSINFO_OUTPUT
-/bin/mkdir -p /var/lib/asterisk/gui_configbackups
-/bin/ls /var/lib/asterisk/gui_configbackups/ >> $SYSINFO_OUTPUT
-/bin/echo "</div>" >> $SYSINFO_OUTPUT
+#/bin/echo "<div id=rec_files>" >> $SYSINFO_OUTPUT
+#/bin/mkdir -p /var/lib/asterisk/sounds/record
+#/bin/ls /var/lib/asterisk/sounds/record/ >> $SYSINFO_OUTPUT
+#/bin/echo "</div>" >> $SYSINFO_OUTPUT
-/bin/echo "<div id=rec_files>" >> $SYSINFO_OUTPUT
-/bin/mkdir -p /var/lib/asterisk/sounds/record
-/bin/ls /var/lib/asterisk/sounds/record/ >> $SYSINFO_OUTPUT
-/bin/echo "</div>" >> $SYSINFO_OUTPUT
-
-/bin/echo "<div id=sound_files>" >> $SYSINFO_OUTPUT
-/bin/mkdir -p /var/lib/asterisk/sounds
-/bin/ls /var/lib/asterisk/sounds/ >> $SYSINFO_OUTPUT
-/bin/echo "</div>" >> $SYSINFO_OUTPUT
+#/bin/echo "<div id=sound_files>" >> $SYSINFO_OUTPUT
+#/bin/mkdir -p /var/lib/asterisk/sounds
+#/bin/ls /var/lib/asterisk/sounds/ >> $SYSINFO_OUTPUT
+#/bin/echo "</div>" >> $SYSINFO_OUTPUT
More information about the asterisk-gui-commits
mailing list