diff options
author | serg dvoriancev <dv_serg@mail.ru> | 2010-04-12 21:52:00 +0400 |
---|---|---|
committer | serg dvoriancev <dv_serg@mail.ru> | 2010-04-12 21:52:00 +0400 |
commit | 312f6a4827d742869daba0ebb186b6de5483379a (patch) | |
tree | 9285758224d8a53d519f7fab142629397e1ef13d /config/freeswitch | |
parent | 8d8c3e1278c35aaf235710d07cbe6583337700d5 (diff) | |
parent | e8fa9505ad3c402bf4a5b5143842c0028382a658 (diff) | |
download | pfsense-packages-312f6a4827d742869daba0ebb186b6de5483379a.tar.gz pfsense-packages-312f6a4827d742869daba0ebb186b6de5483379a.tar.bz2 pfsense-packages-312f6a4827d742869daba0ebb186b6de5483379a.zip |
Merge branch 'master' of http://gitweb.pfsense.org/pfsense-packages/mainline
Diffstat (limited to 'config/freeswitch')
-rw-r--r-- | config/freeswitch/freeswitch.inc | 38 |
1 files changed, 0 insertions, 38 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"); |