aboutsummaryrefslogtreecommitdiffstats
path: root/www/asterisk-gui/files
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2007-06-04 04:04:19 +0800
committerlwhsu <lwhsu@FreeBSD.org>2007-06-04 04:04:19 +0800
commit7e33e4052a97cdeed4c3a0e24c913460878b51d3 (patch)
tree5f79a93fb68fe0e5cacb38c0a115c7b6bbc1c310 /www/asterisk-gui/files
parent26d480aa9d565979b5ac014a09966f21a60847a6 (diff)
downloadfreebsd-ports-gnome-7e33e4052a97cdeed4c3a0e24c913460878b51d3.tar.gz
freebsd-ports-gnome-7e33e4052a97cdeed4c3a0e24c913460878b51d3.tar.zst
freebsd-ports-gnome-7e33e4052a97cdeed4c3a0e24c913460878b51d3.zip
Add asterisk-gui 0.0.1r20070501, an asterisk ajax web manager.
PR: ports/111559 Submitted by: pneumann at gmail.com
Diffstat (limited to 'www/asterisk-gui/files')
-rw-r--r--www/asterisk-gui/files/extra-config-queues.html36
-rw-r--r--www/asterisk-gui/files/patch-config-backup.html29
-rw-r--r--www/asterisk-gui/files/patch-config-scripts-astman.js35
-rw-r--r--www/asterisk-gui/files/patch-config-sysinfo.html13
-rw-r--r--www/asterisk-gui/files/patch-scripts-gui_sysinfo42
-rw-r--r--www/asterisk-gui/files/patch-scripts-listfiles9
-rw-r--r--www/asterisk-gui/files/patch-tools-zapscan22
-rw-r--r--www/asterisk-gui/files/patch-tools-zapscan.c15
-rw-r--r--www/asterisk-gui/files/pkg-message.in17
9 files changed, 218 insertions, 0 deletions
diff --git a/www/asterisk-gui/files/extra-config-queues.html b/www/asterisk-gui/files/extra-config-queues.html
new file mode 100644
index 000000000000..9585c9879061
--- /dev/null
+++ b/www/asterisk-gui/files/extra-config-queues.html
@@ -0,0 +1,36 @@
+--- config/queues.html.orig Wed Apr 4 12:50:22 2007
++++ config/queues.html Wed Apr 4 12:50:42 2007
+@@ -254,7 +254,7 @@
+ for(k=0; k<$('agents').length; k++){
+ selectedagent = "selectedagent" + k;
+ if( $(selectedagent).checked ){
+- uri += build_action('append', p, $('name').value,"member", "Agent/"+$(selectedagent).value);
++ uri += build_action('append', p, $('name').value,"member", "SIP/"+$(selectedagent).value);
+ p = p+1;
+ }
+ }
+@@ -398,7 +398,7 @@
+ queuenames[j] = t.name;
+ return t.name + " -- Queue '" + t.fieldbyname['fullname'] + "'";
+ }else if(InArray(extensions_conf_qs, t.name)) { // if is a subcategory
+- tmp = t.fields[x].split ('Agent/');
++ tmp = t.fields[x].split ('SIP/');
+ if(t.names[x] == 'member' && tmp.length > 1){
+ queueagents [j] [k] = tmp[1];
+ k = k+1;
+@@ -512,7 +512,7 @@
+ </td>
+ </tr>
+ <tr onmouseover="show_tooltip('en', 'queues', 3);" >
+- <td valign='top' class="field_text">Agents:</td>
++ <td valign='top' class="field_text">Users:</td>
+ <td><select multiple='true' id='agents' style='display:none;'></select>
+ <div id="testmulti" style='border:1px solid; font-size: 8pt; height:75px; width: 200px;overflow :auto;'></div>
+ </td>
+@@ -580,4 +580,4 @@
+ </tr>
+ </table>
+ </div>
+-</body>
+\ No newline at end of file
++</body>
diff --git a/www/asterisk-gui/files/patch-config-backup.html b/www/asterisk-gui/files/patch-config-backup.html
new file mode 100644
index 000000000000..b7847a3ea068
--- /dev/null
+++ b/www/asterisk-gui/files/patch-config-backup.html
@@ -0,0 +1,29 @@
+--- config/backup.html.orig Thu Apr 26 21:57:18 2007
++++ config/backup.html Thu Apr 26 21:57:54 2007
+@@ -116,7 +116,7 @@
+
+
+ function restore_bkp(filename){
+- //parent.astmanEngine.run_tool("rm /etc/asterisk/* -rf ", callback=function(){ restore_bkp_step2(filename);} );
++ //parent.astmanEngine.run_tool("rm %%PREFIX%%/etc/asterisk/* -rf ", callback=function(){ restore_bkp_step2(filename);} );
+ restore_bkp_step2(filename);
+ }
+
+@@ -131,7 +131,7 @@
+
+ function delete_bkp( filename ){
+ if(!confirm("Delete selected Backup Configuration ?")){ return ; }
+- parent.astmanEngine.run_tool("/bin/rm -f "+ asterisk_ConfigBkpPath + filename , callback=function(){
++ parent.astmanEngine.run_tool("rm -f "+ asterisk_ConfigBkpPath + filename , callback=function(){
+ gui_feedback('Delete Request Successfull !','default');
+ window.location.href = window.location.href ;
+ });
+@@ -177,7 +177,7 @@
+ //var seconds =addzero(today.getSeconds());
+ var bkpfile = _nn.value +"__" + year + month + day +".tar";
+
+- parent.astmanEngine.run_tool("/bin/tar -cf "+ asterisk_ConfigBkpPath + bkpfile + " " + asterisk_configfolder, callback=function(){
++ parent.astmanEngine.run_tool("tar -cf "+ asterisk_ConfigBkpPath + bkpfile + " " + asterisk_configfolder, callback=function(){
+ gui_feedback('Backup Successfull!','blue');
+ window.location.href = window.location.href ;
+ }
diff --git a/www/asterisk-gui/files/patch-config-scripts-astman.js b/www/asterisk-gui/files/patch-config-scripts-astman.js
new file mode 100644
index 000000000000..72742a96ec70
--- /dev/null
+++ b/www/asterisk-gui/files/patch-config-scripts-astman.js
@@ -0,0 +1,35 @@
+--- config/scripts/astman.js.orig Tue May 1 16:01:00 2007
++++ config/scripts/astman.js Tue May 1 16:12:08 2007
+@@ -25,16 +25,18 @@
+ var asterisk_guitoolsversion = "0.7";
+ var asterisk_guiversion = "$Revision: 817 $";
+ var asterisk_guifbt = 3000; // Feedback msg time
+-var asterisk_scriptsFolder = "/var/lib/asterisk/scripts/" ; /* Directory for gui scripts (graphs.sh, for example) */
+-var asterisk_ConfigBkpPath = "/var/lib/asterisk/gui_configbackups/" ;
+-var asterisk_Sounds_path = "/var/lib/asterisk/sounds/";
++var asterisk_prefix = "%%PREFIX%%/" // "/" for typical linux instalation
++var asterisk_varlib = asterisk_prefix + "share/asterisk/" // /var/lib/astersik/ for linux
++var asterisk_scriptsFolder = asterisk_varlib + "scripts/" ; /* Directory for gui scripts (graphs.sh, for example) */
++var asterisk_ConfigBkpPath = asterisk_varlib + "gui_configbackups/" ;
++var asterisk_Sounds_path = asterisk_varlib + "sounds/";
+ var asterisk_menusRecord_path = asterisk_Sounds_path + "record/";
+ var asterisk_guiSysInfo = "sh " + asterisk_scriptsFolder + "gui_sysinfo" ;
+ var asterisk_guiSysInfo_output = "./sysinfo_output.html";
+-var asterisk_guiZapscan = "/sbin/zapscan.bin" ;
++var asterisk_guiZapscan = asterisk_prefix + "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_configfolder = asterisk_prefix + "etc/asterisk/";
+ var asterisk_guiListFiles = "sh " + asterisk_scriptsFolder + "listfiles" ;
+
+ var sortbynames = false;
+@@ -1521,7 +1523,7 @@
+ this.doConfig = function(t, box) {
+ if( t[0].headers['message'] && t[0].headers['message'] == "Config file not found" ){
+ if( box.config_file == "zapscan.conf" || box.config_file == "contactinfo.conf" || box.config_file == "jingle.conf" || box.config_file == "providers.conf" ){
+- parent.astmanEngine.run_tool("/bin/touch /etc/asterisk/"+box.config_file, function(){ window.location.href = window.location.href ; } );
++ parent.astmanEngine.run_tool("touch "+ asterisk_configfolder + box.config_file, function(){ window.location.href = window.location.href ; } );
+ return ;
+ } else {
+ alert( "Asterisk says it cannot find a required config file (" + box.config_file + ") \n You will be now redirected to the main page !" );
diff --git a/www/asterisk-gui/files/patch-config-sysinfo.html b/www/asterisk-gui/files/patch-config-sysinfo.html
new file mode 100644
index 000000000000..fb196d4ef6c3
--- /dev/null
+++ b/www/asterisk-gui/files/patch-config-sysinfo.html
@@ -0,0 +1,13 @@
+--- config/sysinfo.html.orig Sat Mar 31 20:31:33 2007
++++ config/sysinfo.html Sat Mar 31 20:32:18 2007
+@@ -34,8 +34,8 @@
+ _$('status_message').style.display = "" ;
+ var _ld = _$('log_day').value;
+ if( _ld < 10 ){ var space = " "; }else{ var space = " "; }
+- var tmp_command = "/bin/grep /var/log/asterisk/messages -e '" + _$('log_month').value + space + _ld
+- + " ' > /var/lib/asterisk/static-http/config/today_log.html" ;
++ var tmp_command = "grep /var/log/asterisk/messages -e '" + _$('log_month').value + space + _ld
++ + " ' > %%PREFIX%%/share/asterisk/static-http/config/today_log.html" ;
+ parent.astmanEngine.run_tool( tmp_command , onSuccess = function() { _$('status_message').style.display='none'; load_todayslog(); } );
+ }
+
diff --git a/www/asterisk-gui/files/patch-scripts-gui_sysinfo b/www/asterisk-gui/files/patch-scripts-gui_sysinfo
new file mode 100644
index 000000000000..217464117747
--- /dev/null
+++ b/www/asterisk-gui/files/patch-scripts-gui_sysinfo
@@ -0,0 +1,42 @@
+--- scripts/gui_sysinfo.orig Fri Apr 27 18:08:53 2007
++++ scripts/gui_sysinfo Tue May 1 17:01:25 2007
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
++SYSINFO_OUTPUT="%%PREFIX%%/share/asterisk/static-http/config/sysinfo_output.html"
+
+ #SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
+
+@@ -9,13 +9,13 @@
+ UPTIME="`uptime`"
+ /bin/echo "<div id=si_uptime>$UPTIME</div>" >> $SYSINFO_OUTPUT
+
+-ASTERISK="`/usr/sbin/asterisk -V`"
++ASTERISK="`%%PREFIX%%/sbin/asterisk -V`"
+ /bin/echo "<div id=si_astver>$ASTERISK</div>" >> $SYSINFO_OUTPUT
+
+ TODAY="`date`"
+ /bin/echo "<div id=si_date>$TODAY</div>" >> $SYSINFO_OUTPUT
+
+-HOSTNAME="`hostname -f`"
++HOSTNAME="`hostname`"
+ /bin/echo "<div id=si_hostname>$HOSTNAME</div>" >> $SYSINFO_OUTPUT
+
+ IFCONFIG=`ifconfig`
+@@ -24,14 +24,14 @@
+ DISKUSAGE=`df -h`
+ /bin/echo "<div id=si_du><pre>$DISKUSAGE</pre></div>" >> $SYSINFO_OUTPUT
+
+-MEMORYUSAGE=`free`
++MEMORYUSAGE=`vmstat`
+ /bin/echo "<div id=si_free><pre>$MEMORYUSAGE</pre></div>" >> $SYSINFO_OUTPUT
+
+
+ THISMONTH=`/bin/date +%b`
+ THISDAY=`/bin/date +%d`
+ 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
++grep /var/log/asterisk/messages -e "$THISMONTH\( $THISDAY\| $THIS_DAY\)" > %%PREFIX%%/share/asterisk/static-http/config/today_log.html
+
+ #/bin/echo "<div id=bkp_files>" >> $SYSINFO_OUTPUT
+ #/bin/mkdir -p /var/lib/asterisk/gui_configbackups
diff --git a/www/asterisk-gui/files/patch-scripts-listfiles b/www/asterisk-gui/files/patch-scripts-listfiles
new file mode 100644
index 000000000000..0aad14b6dd5d
--- /dev/null
+++ b/www/asterisk-gui/files/patch-scripts-listfiles
@@ -0,0 +1,9 @@
+--- scripts/listfiles.orig Tue May 1 16:16:13 2007
++++ scripts/listfiles Tue May 1 16:19:27 2007
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
++SYSINFO_OUTPUT="%%PREFIX%%/share/asterisk/static-http/config/sysinfo_output.html"
+
+ #/bin/echo "<div id=list_files>" > $SYSINFO_OUTPUT
+ /bin/mkdir -p $1
diff --git a/www/asterisk-gui/files/patch-tools-zapscan b/www/asterisk-gui/files/patch-tools-zapscan
new file mode 100644
index 000000000000..420fd6e736ba
--- /dev/null
+++ b/www/asterisk-gui/files/patch-tools-zapscan
@@ -0,0 +1,22 @@
+--- ./tools/zapscan.orig Thu Dec 21 18:25:26 2006
++++ ./tools/zapscan Sat Mar 31 17:54:39 2007
+@@ -1,12 +1,12 @@
+ #!/bin/sh
+-if [ -f /etc/zaptel.conf.zapscan ] && [ -f /etc/asterisk/zapata.conf.zapscan ]; then
+- rm -f /etc/zaptel.conf
+- rm -f /etc/asterisk/zapata.conf
+- ( echo "# Created by zapscan -- edit zaptel.conf.zapscan instead" ; cat /etc/zaptel.conf.zapscan ) > /etc/zaptel.conf
+- ( echo "; Created by zapscan -- edit zapata.conf.zapscan instead" ; cat /etc/asterisk/zapata.conf.zapscan ) > /etc/asterisk/zapata.conf
+- rm -f /etc/asterisk/zapscan.conf
++if [ -f %%PREFIX%%/etc/zaptel.conf.zapscan ] && [ -f %%PREFIX%%/etc/asterisk/zapata.conf.zapscan ]; then
++ rm -f %%PREFIX%%/etc/zaptel.conf
++ rm -f %%PREFIX%%/etc/asterisk/zapata.conf
++ ( echo "# Created by zapscan -- edit zaptel.conf.zapscan instead" ; cat %%PREFIX%%/etc/zaptel.conf.zapscan ) > %%PREFIX%%/etc/zaptel.conf
++ ( echo "; Created by zapscan -- edit zapata.conf.zapscan instead" ; cat %%PREFIX%%/etc/asterisk/zapata.conf.zapscan ) > %%PREFIX%%/etc/asterisk/zapata.conf
++ rm -f %%PREFIX%%/etc/asterisk/zapscan.conf
+ echo -n "Scanning for zaptel devices..."
+- if /sbin/zapscan.bin; then
++ if %%PREFIX%%/sbin/zapscan.bin; then
+ echo "OK"
+ else
+ echo "Failed!"
diff --git a/www/asterisk-gui/files/patch-tools-zapscan.c b/www/asterisk-gui/files/patch-tools-zapscan.c
new file mode 100644
index 000000000000..240067d5e175
--- /dev/null
+++ b/www/asterisk-gui/files/patch-tools-zapscan.c
@@ -0,0 +1,15 @@
+--- ./tools/zapscan.c.orig Fri Nov 3 01:48:08 2006
++++ ./tools/zapscan.c Sat Mar 31 17:54:39 2007
+@@ -37,9 +37,9 @@
+ int oldsig=-1;
+ int fd = open("/dev/zap/ctl", O_RDWR);
+ struct zt_params ztp;
+- FILE *zdc = fopen("/etc/zaptel.conf", "a");
+- FILE *zsc = fopen("/etc/asterisk/zapscan.conf", "w");
+- FILE *zap = fopen("/etc/asterisk/zapata.conf", "a");
++ FILE *zdc = fopen("%%PREFIX%%/etc/zaptel.conf", "a");
++ FILE *zsc = fopen("%%PREFIX%%/etc/asterisk/zapscan.conf", "w");
++ FILE *zap = fopen("%%PREFIX%%/etc/asterisk/zapata.conf", "a");
+ if (fd < 0) {
+ fprintf(stderr, "Failed to open /dev/zap/ctl: %s\n", strerror(errno));
+ exit(1);
diff --git a/www/asterisk-gui/files/pkg-message.in b/www/asterisk-gui/files/pkg-message.in
new file mode 100644
index 000000000000..2a962be32887
--- /dev/null
+++ b/www/asterisk-gui/files/pkg-message.in
@@ -0,0 +1,17 @@
+
+=============== Asterisk GUI FreeBSD Instalation =============
+
+You just installed asterisk-gui into %%PREFIX%%.
+
+Make sure to check out the following items:
+ * Configure you PBX enrivonment
+ * Check the configs: make checkconfig
+ * Asterisk is running
+ * manager.conf has 'write' uncommented
+
+You should be able to access the setup process in:
+http://localhost:8088/asterisk/static/config/setup/install.html
+
+Good luck!
+
+=============================================================