diff options
author | Mark Crane <mcrane@pfsense.org> | 2008-12-31 01:25:36 +0000 |
---|---|---|
committer | Mark Crane <mcrane@pfsense.org> | 2008-12-31 01:25:36 +0000 |
commit | 18967860d5f1a38f02f34cf2d790d6dfd1b1a99d (patch) | |
tree | 09353d8f468c9ba8433fa84767d7973c17330f36 /packages/freeswitch/freeswitch.inc | |
parent | 955b31a1f0b5cd40c80cec9b8e4ae436820621a0 (diff) | |
download | pfsense-packages-18967860d5f1a38f02f34cf2d790d6dfd1b1a99d.tar.gz pfsense-packages-18967860d5f1a38f02f34cf2d790d6dfd1b1a99d.tar.bz2 pfsense-packages-18967860d5f1a38f02f34cf2d790d6dfd1b1a99d.zip |
FreeSWITCH package add music on hold to rec tab add upload for rec and moh, add acl, cidr, and callgroup to extensions.
Diffstat (limited to 'packages/freeswitch/freeswitch.inc')
-rw-r--r-- | packages/freeswitch/freeswitch.inc | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/packages/freeswitch/freeswitch.inc b/packages/freeswitch/freeswitch.inc index 8b92536a..cca8e0c1 100644 --- a/packages/freeswitch/freeswitch.inc +++ b/packages/freeswitch/freeswitch.inc @@ -177,6 +177,16 @@ function event_socket_request_cmd($cmd) } +function byte_convert( $bytes ) { + + if ($bytes<=0) + return '0 Byte'; + + $convention=1000; //[1000->10^x|1024->2^x] + $s=array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB'); + $e=floor(log($bytes,$convention)); + return round($bytes/pow($convention,$e),2).' '.$s[$e]; +} function recording_js() { @@ -401,7 +411,12 @@ function sync_package_freeswitch_extensions() $fout = fopen("/usr/local/freeswitch/conf/directory/default/".$rowhelper['extension'].".xml","w"); $tmpxml = "<include>\n"; - $tmpxml .= " <user id=\"" . $rowhelper['extension'] . "\" mailbox=\"" . $rowhelper['mailbox'] . "\">\n"; + if (strlen($rowhelper['cidr']) == 0) { + $tmpxml .= " <user id=\"" . $rowhelper['extension'] . "\" mailbox=\"" . $rowhelper['mailbox'] . "\">\n"; + } + else { + $tmpxml .= " <user id=\"" . $rowhelper['extension'] . "\" mailbox=\"" . $rowhelper['mailbox'] . "\" cidr=\"" . $rowhelper['cidr'] . "\">\n"; + } $tmpxml .= " <params>\n"; $tmpxml .= " <param name=\"password\" value=\"" . $rowhelper['password'] . "\"/>\n"; $tmpxml .= " <param name=\"vm-password\" value=\"" . $rowhelper['vm-password'] . "\"/>\n"; @@ -420,7 +435,10 @@ function sync_package_freeswitch_extensions() } $tmpxml .= " <param name=\"vm-mailto\" value=\"" . $rowhelper['vm-mailto'] . "\"/>\n"; - } + } + if (strlen($rowhelper['auth-acl']) > 0) { + $tmpxml .= " <param name=\"auth-acl\" value=\"" . $rowhelper['auth-acl'] . "\"/>\n"; + } $tmpxml .= " </params>\n"; $tmpxml .= " <variables>\n"; $tmpxml .= " <variable name=\"toll_allow\" value=\"domestic,international,local\"/>\n"; @@ -2066,7 +2084,7 @@ function freeswitch_php_install_command() } $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_version'] = "1.0.1 revision 10638."; - $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_package_version'] = "0.5.7.1"; + $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_package_version'] = "0.5.8"; conf_mount_ro(); |