Skip to content

Commit

Permalink
Merge pull request #147 from hb9xar/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Dec 1, 2016
2 parents a4da8f8 + f38ab68 commit 3543f7f
Show file tree
Hide file tree
Showing 4 changed files with 339 additions and 61 deletions.
3 changes: 1 addition & 2 deletions net/pfSense-pkg-siproxd/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-siproxd
PORTVERSION= 1.1.2
PORTREVISION= 2
PORTVERSION= 1.1.3
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
57 changes: 57 additions & 0 deletions net/pfSense-pkg-siproxd/files/usr/local/pkg/siproxd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ function sync_package_siproxd() {
fwrite($fout, "sip_listen_port = 5060\n");
}

if ($siproxd_conf['hosts_allow_reg'] != "") {
fwrite($fout, "hosts_allow_reg = " . $siproxd_conf['hosts_allow_reg'] . "\n");
}
if ($siproxd_conf['hosts_allow_sip'] != "") {
fwrite($fout, "hosts_allow_sip = " . $siproxd_conf['hosts_allow_sip'] . "\n");
}
if ($siproxd_conf['hosts_deny_sip'] != "") {
fwrite($fout, "hosts_deny_sip = " . $siproxd_conf['hosts_deny_sip'] . "\n");
}

fwrite($fout, "daemonize = 1\n");
fwrite($fout, "silence_log = 0\n");
//fwrite($fout, "log_calls = 1\n");
Expand Down Expand Up @@ -245,6 +255,12 @@ function sync_package_siproxd() {
if ($siproxd_conf['tcp_keepalive'] != "") {
fwrite($fout, "tcp_keepalive = " . $siproxd_conf['tcp_keepalive'] . "\n");
}
if ($siproxd_conf['ua_string'] != "") {
fwrite($fout, "ua_string = " . $siproxd_conf['ua_string'] . "\n");
}
if ($siproxd_conf['use_rport'] != "") {
fwrite($fout, "use_rport = " . $siproxd_conf['use_rport'] . "\n");
}

fwrite($fout, "plugindir={$plugindir}\n");
fwrite($fout, "load_plugin=plugin_logcall.la\n");
Expand Down Expand Up @@ -279,6 +295,47 @@ function sync_package_siproxd() {
fwrite($fout, "plugin_stun_period = " . $siproxd_conf['plugin_stun_period'] . "\n");
}

if ($siproxd_conf['plugin_fix_dtag'] != "") {
fwrite($fout, "load_plugin=plugin_fix_DTAG.la\n");
if ($siproxd_conf['plugin_fix_dtag_networks'] != "") {
fwrite($fout, "plugin_fix_DTAG_networks = ". $siproxd_conf['plugin_fix_dtag_networks'] . "\n");
}
}

if ($siproxd_conf['plugin_stripheader'] != "") {
fwrite($fout, "load_plugin=plugin_stripheader.la\n");
if ($siproxd_conf['plugin_stripheader_remove1'] != "") {
fwrite($fout, "plugin_stripheader_remove = " . $siproxd_conf['plugin_stripheader_remove1'] . "\n");
}
if ($siproxd_conf['plugin_stripheader_remove2'] != "") {
fwrite($fout, "plugin_stripheader_remove = " . $siproxd_conf['plugin_stripheader_remove2'] . "\n");
}
if ($siproxd_conf['plugin_stripheader_remove3'] != "") {
fwrite($fout, "plugin_stripheader_remove = " . $siproxd_conf['plugin_stripheader_remove3'] . "\n");
}
}

if ($siproxd_conf['plugin_codecfilter'] != "") {
fwrite($fout, "load_plugin=plugin_codecfilter.la\n");
if ($siproxd_conf['plugin_codecfilter_blacklist1'] != "") {
fwrite($fout, "plugin_codecfilter_blacklist = " . $siproxd_conf['plugin_codecfilter_blacklist1'] . "\n");
}
if ($siproxd_conf['plugin_codecfilter_blacklist2'] != "") {
fwrite($fout, "plugin_codecfilter_blacklist = " . $siproxd_conf['plugin_codecfilter_blacklist2'] . "\n");
}
if ($siproxd_conf['plugin_codecfilter_blacklist3'] != "") {
fwrite($fout, "plugin_codecfilter_blacklist = " . $siproxd_conf['plugin_codecfilter_blacklist3'] . "\n");
}
}

if ($siproxd_conf['plugin_fix_fbox_anoncall'] != "") {
fwrite($fout, "load_plugin=plugin_fix_fbox_anoncall.la\n");
if ($siproxd_conf['plugin_fix_fbox_anoncall_networks'] != "") {
fwrite($fout, "plugin_fix_fbox_anoncall_networks = " . $siproxd_conf['plugin_fix_fbox_anoncall_networks'] . "\n");
}
}


fclose($fout);

write_rcfile(array(
Expand Down
Loading

0 comments on commit 3543f7f

Please sign in to comment.