diff options
author | jim-p <jimp@pfsense.org> | 2010-11-24 17:22:10 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-11-24 17:22:10 -0500 |
commit | ada47c035934c911e8bac7e6f67167a4ab84624c (patch) | |
tree | 06b8ae53a4fd1d7039c2033796dae04efcb51d33 /config | |
parent | 238b11413d627091849bc341b418a18ffabd6d53 (diff) | |
download | pfsense-packages-ada47c035934c911e8bac7e6f67167a4ab84624c.tar.gz pfsense-packages-ada47c035934c911e8bac7e6f67167a4ab84624c.tar.bz2 pfsense-packages-ada47c035934c911e8bac7e6f67167a4ab84624c.zip |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/siproxd.inc | 21 |
1 files changed, 14 insertions, 7 deletions
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'] != "") { |