aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/freeswitch/freeswitch.inc38
-rw-r--r--config/freeswitch_dev/v_config.inc51
-rwxr-xr-xpkg_config.7.xml4
-rwxr-xr-xpkg_config.8.xml4
4 files changed, 8 insertions, 89 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index aa3e4b74..147125a7 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -263,42 +263,6 @@ function byte_convert( $bytes ) {
return round($bytes/pow($convention,$e),2).' '.$s[$e];
}
-function lan_sip_profile()
-{
- global $config;
- clearstatcache();
-
- //if the lan directory does not exist then create it
- if (!is_dir('/usr/local/freeswitch/conf/sip_profiles/lan/')) {
- exec("mkdir /usr/local/freeswitch/conf/sip_profiles/lan/");
- }
-
- //create the LAN profile if it doesn't exist
- if (!file_exists('/usr/local/freeswitch/conf/sip_profiles/lan.xml')) {
- $lan_ip = $config['interfaces']['lan']['ipaddr'];
- if (strlen($lan_ip) > 0) {
- exec("cp /usr/local/freeswitch/conf/sip_profiles/internal.xml /usr/local/freeswitch/conf/sip_profiles/lan.xml");
-
- $filename = "/usr/local/freeswitch/conf/sip_profiles/lan.xml";
- $handle = fopen($filename,"rb");
- $contents = fread($handle, filesize($filename));
- fclose($handle);
-
- $handle = fopen($filename,"w");
- $contents = str_replace("<profile name=\"internal\">", "<profile name=\"lan\">", $contents);
- $contents = str_replace("<alias name=\"default\"/>", "", $contents);
- $contents = str_replace("<X-PRE-PROCESS cmd=\"include\" data=\"internal/*.xml\"/>", "<X-PRE-PROCESS cmd=\"include\" data=\"lan/*.xml\"/>", $contents);
- $contents = str_replace("<param name=\"rtp-ip\" value=\"\$\${local_ip_v4}\"/>", "<param name=\"rtp-ip\" value=\"".$lan_ip."\"/>", $contents);
- $contents = str_replace("<param name=\"sip-ip\" value=\"\$\${local_ip_v4}\"/>", "<param name=\"sip-ip\" value=\"".$lan_ip."\"/>", $contents);
- fwrite($handle, $contents);
- unset($contents);
- fclose($handle);
- unset($filename);
- }
- }
-
-}
-
function ListFiles($dir) {
if($dh = opendir($dir)) {
@@ -3741,8 +3705,6 @@ function freeswitch_php_install_command()
"stop" => "/usr/local/freeswitch/bin/./freeswitch -stop"
)
);
-
- lan_sip_profile();
sync_package_freeswitch();
$handle = popen("/usr/local/etc/rc.d/freeswitch.sh start", "r");
diff --git a/config/freeswitch_dev/v_config.inc b/config/freeswitch_dev/v_config.inc
index 596fb00f..a508cefc 100644
--- a/config/freeswitch_dev/v_config.inc
+++ b/config/freeswitch_dev/v_config.inc
@@ -319,46 +319,6 @@ function byte_convert( $bytes ) {
return round($bytes/pow($convention,$e),2).' '.$s[$e];
}
-function lan_sip_profile()
-{
- global $config;
- $v_settings_array = $config['installedpackages']['freeswitchsettings']['config'][0];
- foreach($v_settings_array as $name => $value) {
- $$name = $value;
- }
- clearstatcache();
-
- //if the lan directory does not exist then create it
- if (!is_dir($v_conf_dir.'/sip_profiles/lan/')) {
- exec("mkdir ".$v_conf_dir."/sip_profiles/lan/");
- }
-
- //create the LAN profile if it doesn't exist
- if (!file_exists($v_conf_dir.'/sip_profiles/lan.xml')) {
- $lan_ip = $config['interfaces']['lan']['ipaddr'];
- if (strlen($lan_ip) > 0) {
- exec("cp ".$v_conf_dir."/sip_profiles/internal.xml ".$v_conf_dir."/sip_profiles/lan.xml");
-
- $filename = $v_conf_dir."/sip_profiles/lan.xml";
- $handle = fopen($filename,"rb");
- $contents = fread($handle, filesize($filename));
- fclose($handle);
-
- $handle = fopen($filename,"w");
- $contents = str_replace("<profile name=\"internal\">", "<profile name=\"lan\">", $contents);
- $contents = str_replace("<alias name=\"default\"/>", "", $contents);
- $contents = str_replace("<X-PRE-PROCESS cmd=\"include\" data=\"internal/*.xml\"/>", "<X-PRE-PROCESS cmd=\"include\" data=\"lan/*.xml\"/>", $contents);
- $contents = str_replace("<param name=\"rtp-ip\" value=\"\$\${local_ip_v4}\"/>", "<param name=\"rtp-ip\" value=\"".$lan_ip."\"/>", $contents);
- $contents = str_replace("<param name=\"sip-ip\" value=\"\$\${local_ip_v4}\"/>", "<param name=\"sip-ip\" value=\"".$lan_ip."\"/>", $contents);
- fwrite($handle, $contents);
- unset($contents);
- fclose($handle);
- unset($filename);
- }
- }
-
-}
-
function ListFiles($dir) {
if($dh = opendir($dir)) {
@@ -3923,23 +3883,20 @@ function v_install_phase_1()
unlink_if_exists($v_conf_dir."/directory/default/brian.xml");
unlink_if_exists($v_conf_dir."/directory/default/example.com.xml");
unlink_if_exists($v_conf_dir."/dialplan/default/99999_enum.xml");
-
-
+
write_rcfile(array(
"file" => $v_name.".sh",
"start" => $v_dir."/bin/./".$v_name." -nc",
"stop" => $v_dir."/bin/./".$v_name." -stop"
)
);
-
- lan_sip_profile();
$static_output = 'Synchronize the config';
update_output_window($static_output);
-
+
sync_package_freeswitch();
-
+
$static_output = 'Start the Service';
update_output_window($static_output);
$handle = popen($v_startup_script_dir."/freeswitch.sh start", "r");
@@ -3951,7 +3908,7 @@ function v_install_phase_1()
conf_mount_ro();
config_unlock();
-
+
}
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index 3b033c88..03cb0c09 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -168,7 +168,7 @@
<pkginfolink>http://doc.pfsense.org/index.php/FreeSWITCH</pkginfolink>
<config_file>http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.9.5</version>
+ <version>0.9.6</version>
<status>Beta</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>
@@ -183,7 +183,7 @@
<pkginfolink>http://doc.pfsense.org/index.php/FreeSWITCH</pkginfolink>
<config_file>http://www.pfsense.com/packages/config/freeswitch_dev/freeswitch.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.9.7.25</version>
+ <version>0.9.7.26</version>
<status>Beta</status>
<required_version>1.2.3</required_version>
<maintainer>markjcrane@gmail.com</maintainer>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 02f5dea6..c4f7c12b 100755
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -127,7 +127,7 @@
<pkginfolink>http://doc.pfsense.org/index.php/FreeSWITCH</pkginfolink>
<config_file>http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.8.3.5</version>
+ <version>0.8.3.6</version>
<status>Beta</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>
@@ -142,7 +142,7 @@
<pkginfolink>http://doc.pfsense.org/index.php/FreeSWITCH</pkginfolink>
<config_file>http://www.pfsense.com/packages/config/freeswitch_dev/freeswitch.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.9.7.25</version>
+ <version>0.9.7.26</version>
<status>Beta</status>
<required_version>1.2.3</required_version>
<maintainer>markjcrane@gmail.com</maintainer>