From ada47c035934c911e8bac7e6f67167a4ab84624c Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 24 Nov 2010 17:22:10 -0500 Subject: Disable call logging (new siproxd didn't like the config option), always supply RTP ports even when left blank in the GUI, move chroot to /var so it will be happier on NanoBSD. --- config/siproxd.inc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'config') diff --git a/config/siproxd.inc b/config/siproxd.inc index 9f2e4040..8a333a26 100644 --- a/config/siproxd.inc +++ b/config/siproxd.inc @@ -96,6 +96,12 @@ function sync_package_siproxd() { global $config; conf_mount_rw(); + + $siproxd_chroot = "/var/siproxd/"; + @mkdir($siproxd_chroot); + @chown($siproxd_chroot, "nobody"); + @chgrp($siproxd_chroot, "nobody"); + unlink_if_exists("/usr/local/etc/rc.d/siproxd"); $conf = &$config['installedpackages']['siproxd']['config'][0]; $fout = fopen("/usr/local/etc/siproxd.conf","w"); @@ -129,9 +135,9 @@ function sync_package_siproxd() { fwrite($fout, "daemonize = 1\n"); fwrite($fout, "silence_log = 0\n"); - fwrite($fout, "log_calls = 1\n"); + //fwrite($fout, "log_calls = 1\n"); fwrite($fout, "user = nobody\n"); - fwrite($fout, "chrootjail = /usr/local/siproxd/\n"); + fwrite($fout, "chrootjail = {$siproxd_chroot}\n"); fwrite($fout, "registration_file = siproxd_registrations\n"); fwrite($fout, "pid_file = siproxd.pid\n"); @@ -141,11 +147,12 @@ function sync_package_siproxd() { fwrite($fout, "rtp_proxy_enable = 1\n"); } - if($_POST['rtplower'] != "") { - if($_POST['rtpupper'] != "") { - fwrite($fout, "rtp_port_low = " . $_POST['rtplower'] . "\n"); - fwrite($fout, "rtp_port_high = " . $_POST['rtpupper'] . "\n"); - } + if(($_POST['rtplower'] != "") && ($_POST['rtpupper'] != "")) { + fwrite($fout, "rtp_port_low = " . $_POST['rtplower'] . "\n"); + fwrite($fout, "rtp_port_high = " . $_POST['rtpupper'] . "\n"); + } else { + fwrite($fout, "rtp_port_low = 7070\n"); + fwrite($fout, "rtp_port_high = 7079\n"); } if($_POST['rtptimeout'] != "") { -- cgit v1.2.3