siproxdsiproxd: Settings0.5.9pkg_edit.php?xml=freeradiussettings.xml&id=0Settings/pkg_edit.php?xml=siproxd.xml&id=0Users/pkg.php?xml=siproxdusers.xmlhttp://www.pfsense.com/packages/config/siproxdusers.xmlinstalledpackages->package->$packagename->configuration->settingsInbound interfaceif_inboundSelect the inbound interface.interfaces_selectionOutbound interfaceif_outboundSelect the outbound interface.interfaces_selectionListening portportEnter the port on which to listen for SIP traffic (default 5060). Do not change this unless you know what you're doing.inputEnable RTP proxyrtpenableEnable or disable the RTP proxy. (default is enabled)selectRTP port rangertplowerEnter the bottom edge of the port range siproxd will allocate for incoming RTP traffic. This range must be one not blocked by the firewall (default 7070).inputrtpupperEnter the top edge of the port range siproxd will allocate for incoming RTP traffic. This range must be one not blocked by the firewall (default 7079).inputRTP stream timeoutrtptimeoutAfter this number of seconds, an RTP stream is considered dead and proxying it will be stopped (default 300sec).inputDefault expiration timeoutdefaulttimeoutIf a REGISTER request dose not contain an Expires header or expires= parameter, this number of seconds will be used and reported back to the UA in the answer.inputEnable proxy authenticationauthenticationIf this is checked, clients will be forced to authenticate themselves at the proxy (for registration only).checkboxOutbound proxy hostnameoutboundproxyhostinputOutbound proxy portoutboundproxyportEnter the hostname and port of an outbound proxy to send all traffic to. This is only useful if you have multiple masquerading firewalls to cross.
mwexec("rm /usr/local/etc/rc.d/siproxd.sh");
$fout = fopen("/usr/local/etc/rc.d/siproxd.sh","w");
fwrite($fout, "#!/bin/sh\n\n/usr/local/sbin/siproxd\n");
fclose($fout);
function sync_package() {
conf_mount_rw();
config_lock();
global $config;
$fout = fopen("/usr/local/etc/siproxd.conf","w");
fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n");
if($_POST['if_inbound'] != "") {
$if_inbound = find_interface_ip($_POST['if_inbound']);
fwrite($fout, "if_inbound = " . $if_inbound . "\n");
}
if($_POST['if_outbound'] != "") {
$if_outbound = find_interface_ip($_POST['if_outbound']);
fwrite($fout, "if_outbound = " . $if_outbound . "\n\n");
}
if($_POST['port'] != "") {
fwrite($fout, "sip_listen_port = " . $_POST['port'] . "\n\n");
} else {
fwrite($fout, "sip_listen_port = 5060\n\n");
}
fwrite($fout, "daemonize = 1\n\nsilence_log = 0\n\nlog_calls = 1\n\nuser = nobody\nchrootjail = /usr/local/siproxd/\n\nregistration_file = siproxd_registrations\n\npid_file = siproxd.pid\n\n");
if($_POST['rtpenable'] != "") {
fwrite($fout, "rtp_proxy_enable = " . $_POST['rtpenable'] . "\n\n");
} else {
fwrite($fout, "rtp_proxy_enable = 1\n\n");
}
if($_POST['rtplower'] != "") {
if($_POST['rtpupper'] != "") {
fwrite($fout, "rtp_port_low = " . $_POST['rtplower'] . "\n");
fwrite($fout, "rtp_port_high = " . $_POST['rtpupper'] . "\n\n");
}
}
if($_POST['rtptimeout'] != "") {
fwrite($fout, "rtp_timeout = " . $_POST['rtptimeout'] . "\n\n");
} else {
fwrite($fout, "rtp_timeout = 300\n\n");
}
if($_POST['defaulttimeout'] != "") {
fwrite($fout, "default_expires = " . $_POST['defaulttimeout'] . "\n\n");
} else {
fwrite($fout, "default_expires = 600\n\n");
}
if($_POST['authentication']) {
fwrite($fout, "proxy_auth_realm = Authentication_Realm\nproxy_auth_pwfile = /usr/local/etc/siproxd_passwd.cfg\n\n");
}
fwrite($fout, "debug_level = 0x00000000\n\n");
if($_POST['outboundproxyhost'] != "") {
if($_POST['outboundproxyport'] != "") {
fwrite($fout, "outbound_proxy_host = " . $_POST['outboundproxyhost'] . "\n");
fwrite($fout, "outbound_proxy_port = " . $_POST['outboundproxyport'] . "\n");
}
}
fclose($fout);
mwexec("killall siproxd");
mwexec("/usr/local/etc/rc.d/siproxd.sh");
conf_mount_ro();
config_unlock();
}
sync_package();