From f0fbaedf848ba8478191ff335f32c8146d89dc5a Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 7 Oct 2008 03:20:59 +0000 Subject: freeswitch package files --- packages/freeswitch/freeswitch.inc | 631 ++++++++++++++++++++++++++ packages/freeswitch/freeswitch.xml | 249 ++++++++++ packages/freeswitch/freeswitch_dialplan.xml | 129 ++++++ packages/freeswitch/freeswitch_extensions.xml | 195 ++++++++ packages/freeswitch/freeswitch_external.xml | 129 ++++++ packages/freeswitch/freeswitch_gateways.xml | 222 +++++++++ packages/freeswitch/freeswitch_internal.xml | 129 ++++++ packages/freeswitch/freeswitch_modules.xml | 128 ++++++ packages/freeswitch/freeswitch_public.xml | 129 ++++++ packages/freeswitch/freeswitch_status.tmp | 225 +++++++++ packages/freeswitch/freeswitch_vars.xml | 129 ++++++ packages/freeswitch/libncurses.so.5.6 | Bin 0 -> 127748 bytes packages/freeswitch/libtinfo.so.5.6 | Bin 0 -> 187069 bytes 13 files changed, 2295 insertions(+) create mode 100644 packages/freeswitch/freeswitch.inc create mode 100644 packages/freeswitch/freeswitch.xml create mode 100644 packages/freeswitch/freeswitch_dialplan.xml create mode 100644 packages/freeswitch/freeswitch_extensions.xml create mode 100644 packages/freeswitch/freeswitch_external.xml create mode 100644 packages/freeswitch/freeswitch_gateways.xml create mode 100644 packages/freeswitch/freeswitch_internal.xml create mode 100644 packages/freeswitch/freeswitch_modules.xml create mode 100644 packages/freeswitch/freeswitch_public.xml create mode 100644 packages/freeswitch/freeswitch_status.tmp create mode 100644 packages/freeswitch/freeswitch_vars.xml create mode 100644 packages/freeswitch/libncurses.so.5.6 create mode 100644 packages/freeswitch/libtinfo.so.5.6 diff --git a/packages/freeswitch/freeswitch.inc b/packages/freeswitch/freeswitch.inc new file mode 100644 index 00000000..14cdc759 --- /dev/null +++ b/packages/freeswitch/freeswitch.inc @@ -0,0 +1,631 @@ + 0) { + $response .= $buffer; + } + + if ($contentlength == 0) { //if contentlenght is already don't process again + if (strlen(trim($buffer)) > 0) { //run only if buffer has content + $temparray = split(":", trim($buffer)); + if ($temparray[0] == "Content-Length") { + $contentlength = trim($temparray[1]); + } + } + } + + usleep(100); //allow time for reponse + + //optional because of script timeout //don't let while loop become endless + if ($i > 10000) { break; } + + if ($contentlength > 0) { //is contentlength set + //stop reading if all content has been read. + if (strlen($response) >= $contentlength) { + break; + } + } + $i++; + } + + return $response; + } + else { + echo "no handle"; + } +} + + +function event_socket_request_reloadxml() +{ + global $config; + + $password = $config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_password']; + $port = $config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_port']; + $host = $config['interfaces']['lan']['ipaddr']; + + if (pkg_is_service_running('freeswitch')) + { + $fp = event_socket_create($host, $port, $password); + $cmd = "api reloadxml"; + $response = event_socket_request($fp, $cmd); + fclose($fp); + } + unset($host, $port, $password); + +} + + + +function sync_package_freeswitch_settings() +{ + global $config; + + if($config['installedpackages']['freeswitchsettings']['config'] != "") { + + conf_mount_rw(); + config_unlock(); + + foreach($config['installedpackages']['freeswitchsettings']['config'] as $rowhelper) { + + $fout = fopen("/usr/local/freeswitch/conf/directory/default/default.xml","w"); + $tmpxml = "\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= "\n"; + fwrite($fout, $tmpxml); + unset($tmpxml); + fclose($fout); + + $fout = fopen("/usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml","w"); + $tmpxml = "\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= ""; + fwrite($fout, $tmpxml); + unset($tmpxml, $event_socket_password); + fclose($fout); + + $fout = fopen("/usr/local/freeswitch/conf/autoload_configs/xml_rpc.conf","w"); + $tmpxml = "\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= "\n"; + fwrite($fout, $tmpxml); + unset($tmpxml, $event_socket_password); + fclose($fout); + + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + } +} + + +function sync_package_freeswitch_dialplan() +{ + global $config; + conf_mount_rw(); + config_unlock(); + + if(strlen($config['installedpackages']['freeswitchdialplan']['config'][0]['dialplan_default_xml']) == 0) { + /* dialplan not found in the pfsense config.xml get the default dialplan and save to config.xml. */ + $filename = "/usr/local/freeswitch/conf/dialplan/default.xml"; + $fout = fopen($filename,"r"); + $tmpxml = fread($fout, filesize($filename)); + $config['installedpackages']['freeswitchdialplan']['config'][0]['dialplan_default_xml'] = base64_encode($tmpxml); + unset($filename, $dialplan); + fclose($fout); + } + else { + /* found the dialplan in the pfsense config.xml save it to default.xml. */ + $fout = fopen("/usr/local/freeswitch/conf/dialplan/default.xml","w"); + $tmpxml = $config['installedpackages']['freeswitchdialplan']['config'][0]['dialplan_default_xml']; + fwrite($fout, base64_decode($tmpxml)); + fclose($fout); + unset($tmpxml); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + +} + + +function sync_package_freeswitch_extensions() +{ + global $config; + + if($config['installedpackages']['freeswitchextensions']['config'] != "") { + + conf_mount_rw(); + config_unlock(); + + /* delete all old extensions to prepare for new ones */ + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/1*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/2*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/3*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/4*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/5*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/6*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/7*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/8*.xml"); + unlink_if_exists("/usr/local/freeswitch/conf/directory/default/9*.xml"); + + foreach($config['installedpackages']['freeswitchextensions']['config'] as $rowhelper) { + + $fout = fopen("/usr/local/freeswitch/conf/directory/default/".$rowhelper['extension'].".xml","w"); + + $tmpxml = "\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + /* Disabled until further testing */ + /* if (strlen($rowhelper['vm-mailto']) > 0) { */ + /* $tmpxml .= " \n"; */ + /* $tmpxml .= " \n"; */ + /* $tmpxml .= " \n"; */ + /* } */ + /* */ + /* Voicemail Mail To */ + /* vm-mailto */ + /* Optional: Enter the email address to send voicemail to. */ + /* input */ + /* */ + $tmpxml .= " >\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + if (strlen($rowhelper['effective_caller_id_number']) > 0) { + $tmpxml .= " \n"; + $tmpxml .= " \n"; + } + if (strlen($rowhelper['outbound_caller_id_number']) > 0) { + $tmpxml .= " \n"; + $tmpxml .= " \n"; + } + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= "\n"; + fwrite($fout, $tmpxml); + unset($tmpxml); + fclose($fout); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + + } +} + + +function sync_package_freeswitch_gateways() +{ + global $config; + + if($config['installedpackages']['freeswitchgateways']['config'] != "") { + + conf_mount_rw(); + config_unlock(); + + /* delete all old gateways to prepare for new ones */ + unlink_if_exists("/usr/local/freeswitch/conf/sip_profiles/external/*.xml"); + + foreach($config['installedpackages']['freeswitchgateways']['config'] as $rowhelper) { + $fout = fopen("/usr/local/freeswitch/conf/sip_profiles/external/".$rowhelper['gateway'].".xml","w"); + + $tmpxml .= "\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= ""; + + fwrite($fout, $tmpxml); + unset($tmpxml); + fclose($fout); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + + } + +} + + +function sync_package_freeswitch_modules() +{ + global $config; + conf_mount_rw(); + config_unlock(); + + if(strlen($config['installedpackages']['freeswitchmodules']['config'][0]['modules_conf_xml']) == 0) { + /* dialplan not found in the pfsense config.xml get the default dialplan and save to config.xml. */ + $filename = "/usr/local/freeswitch/conf/autoload_configs/modules.conf.xml"; + $fout = fopen($filename,"r"); + $tmpxml = fread($fout, filesize($filename)); + $config['installedpackages']['freeswitchmodules']['config'][0]['modules_conf_xml'] = base64_encode($tmpxml); + unset($filename, $dialplan); + fclose($fout); + } + else { + /* found the dialplan in the pfsense config.xml save it to default.xml. */ + $fout = fopen("/usr/local/freeswitch/conf/autoload_configs/modules.conf.xml","w"); + $tmpxml = $config['installedpackages']['freeswitchmodules']['config'][0]['modules_conf_xml']; + fwrite($fout, base64_decode($tmpxml)); + fclose($fout); + unset($tmpxml); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + +} + + +function sync_package_freeswitch_public() +{ + global $config; + conf_mount_rw(); + config_unlock(); + + if(strlen($config['installedpackages']['freeswitchpublic']['config'][0]['public_xml']) == 0) { + /* dialplan_public_xml not found in the pfsense config.xml get the default public.xml and save to config.xml. */ + $filename = "/usr/local/freeswitch/conf/dialplan/public/00_inbound_did.xml"; + $fout = fopen($filename,"r"); + $tmpxml = fread($fout, filesize($filename)); + $config['installedpackages']['freeswitchpublic']['config'][0]['public_xml'] = base64_encode($tmpxml); + unset($filename, $tmpxml); + fclose($fout); + } + else { + /* found dialplan_public_xml in the pfsense config.xml save it to public.xml. */ + $fout = fopen("/usr/local/freeswitch/conf/dialplan/public/00_inbound_did.xml","w"); + $tmpxml = $config['installedpackages']['freeswitchpublic']['config'][0]['public_xml']; + fwrite($fout, base64_decode($tmpxml)); + fclose($fout); + unset($tmpxml); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + +} + + +function sync_package_freeswitch_vars() +{ + global $config; + conf_mount_rw(); + config_unlock(); + + if(strlen($config['installedpackages']['freeswitchvars']['config'][0]['vars_xml']) == 0) { + /* dialplan not found in the pfsense config.xml get the default dialplan and save to config.xml. */ + $filename = "/usr/local/freeswitch/conf/vars.xml"; + $fout = fopen($filename,"r"); + $tmpxml = fread($fout, filesize($filename)); + $config['installedpackages']['freeswitchvars']['config'][0]['vars_xml'] = base64_encode($tmpxml); + unset($filename, $dialplan); + fclose($fout); + } + else { + /* found the dialplan in the pfsense config.xml save it to default.xml. */ + $fout = fopen("/usr/local/freeswitch/conf/vars.xml","w"); + $tmpxml = $config['installedpackages']['freeswitchvars']['config'][0]['vars_xml']; + fwrite($fout, base64_decode($tmpxml)); + fclose($fout); + unset($tmpxml); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + +} + +function sync_package_freeswitch_internal() +{ + global $config; + conf_mount_rw(); + config_unlock(); + + if(strlen($config['installedpackages']['freeswitchinternal']['config'][0]['internal_xml']) == 0) { + /* internal_xml not found in the pfsense config.xml get the internal.xml and save to config.xml. */ + $filename = "/usr/local/freeswitch/conf/sip_profiles/internal.xml"; + $fout = fopen($filename,"r"); + $tmpxml = fread($fout, filesize($filename)); + $config['installedpackages']['freeswitchinternal']['config'][0]['internal_xml'] = base64_encode($tmpxml); + unset($filename, $dialplan); + fclose($fout); + } + else { + /* found the internal_xml in the pfsense config.xml save it to internal.xml. */ + $fout = fopen("/usr/local/freeswitch/conf/sip_profiles/internal.xml","w"); + $tmpxml = $config['installedpackages']['freeswitchinternal']['config'][0]['internal_xml']; + fwrite($fout, base64_decode($tmpxml)); + fclose($fout); + unset($tmpxml); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + +} + +function sync_package_freeswitch_external() +{ + global $config; + conf_mount_rw(); + config_unlock(); + + if(strlen($config['installedpackages']['freeswitchexternal']['config'][0]['external_xml']) == 0) { + /* external_xml not found in the pfsense config.xml get the external.xml and save to config.xml. */ + $filename = "/usr/local/freeswitch/conf/sip_profiles/external.xml"; + $fout = fopen($filename,"r"); + $tmpxml = fread($fout, filesize($filename)); + $config['installedpackages']['freeswitchexternal']['config'][0]['external_xml'] = base64_encode($tmpxml); + unset($filename, $dialplan); + fclose($fout); + } + else { + /* found the external_xml in the pfsense config.xml save it to external.xml. */ + $fout = fopen("/usr/local/freeswitch/conf/sip_profiles/external.xml","w"); + $tmpxml = $config['installedpackages']['freeswitchexternal']['config'][0]['external_xml']; + fwrite($fout, base64_decode($tmpxml)); + fclose($fout); + unset($tmpxml); + } + + conf_mount_ro(); + event_socket_request_reloadxml(); + +} + +function sync_package_freeswitch() +{ + global $config; + sync_package_freeswitch_settings(); + sync_package_freeswitch_dialplan(); + sync_package_freeswitch_extensions(); + sync_package_freeswitch_gateways(); + sync_package_freeswitch_modules(); + sync_package_freeswitch_public(); + sync_package_freeswitch_vars(); + sync_package_freeswitch_internal(); + sync_package_freeswitch_external(); + +} + + +function freeswitch_php_install_command() +{ + + global $config; + conf_mount_rw(); + config_lock(); + + if (!is_dir('/usr/local/www/freeswitch/')) { + exec("mkdir /usr/local/www/freeswitch/"); + } + exec("cp /tmp/freeswitch_status.tmp /usr/local/www/freeswitch/freeswitch_status.php"); + unlink_if_exists("/tmp/freeswitch_status.tmp"); + + exec("tar zxvf /tmp/freeswitch.tgz -C /usr/local/"); + unlink_if_exists("/tmp/freeswitch.tgz"); + + /* set default numbering_plan */ + if (strlen($config['installedpackages']['freeswitchsettings']['config'][0]['numbering_plan']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['numbering_plan'] = "US"; + } + + /* set default event_socket_password */ + if(strlen($config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_password']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_password'] = "ClueCon"; + } + + /* set default event_socket_port */ + if (strlen($config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_port']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_port'] = "8021"; + } + + /* set default xml_rpc_http_port */ + if (strlen($config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_http_port']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_http_port'] = "8787"; + } + + /* set default xml_rpc_auth_realm */ + if (strlen($config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_realm']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_realm'] = "freeswitch"; + } + + /* set default xml_rpc_auth_user */ + if (strlen($config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_user']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_user'] = "freeswitch"; + } + + /* set default xml_rpc_auth_pass */ + if (strlen($config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_pass']) == 0) { + $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_pass'] = "works"; + } + + $numbering_plan = $config['installedpackages']['freeswitchsettings']['config'][0]['numbering_plan']; + $event_socket_password = $config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_password']; + $event_socket_port = $config['installedpackages']['freeswitchsettings']['config'][0]['event_socket_port']; + $xml_rpc_http_port = $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_http_port']; + $xml_rpc_auth_realm = $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_realm']; + $xml_rpc_auth_user = $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_user']; + $xml_rpc_auth_pass = $config['installedpackages']['freeswitchsettings']['config'][0]['xml_rpc_auth_pass']; + + $fout = fopen("/usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml","w"); + $tmpxml = "\n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= " \n"; + $tmpxml .= ""; + fwrite($fout, $tmpxml); + unset($tmpxml); + fclose($fout); + + write_rcfile(array( + "file" => "freeswitch.sh", + "start" => "/usr/local/freeswitch/bin/./freeswitch -nc", + "stop" => "/usr/local/freeswitch/bin/./freeswitch -stop" + ) + ); + + sync_package_freeswitch(); + $handle = popen("/usr/local/etc/rc.d/freeswitch.sh start", "r"); + pclose($handle); + + $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_version'] = "1.0.1 revision 9759."; + $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_package_version'] = "0.1"; + conf_mount_ro(); + config_unlock(); + +} + + +function freeswitch_deinstall_command() +{ + conf_mount_rw(); + config_lock(); + exec("killall -9 freeswitch"); + unlink_if_exists("/usr/local/pkg/freeswitch.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch.inc"); + unlink_if_exists("/usr/local/pkg/freeswitch_dialplan.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_extensions.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_external.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_gateways.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_internal.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_modules.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_public.xml"); + unlink_if_exists("/usr/local/pkg/freeswitch_vars.xml"); + unlink_if_exists("/usr/local/www/freeswitch/freeswitch_status.xml"); + exec("rm -R /usr/local/freeswitch/"); + exec("rm -R /usr/local/www/freeswitch/"); + unlink_if_exists("/usr/local/etc/rc.d/freeswitch.sh"); + unlink_if_exists("/tmp/freeswitch.tar.gz"); + unlink_if_exists("/tmp/pkg_mgr_FreeSWITCH.log"); + conf_mount_ro(); + config_unlock(); +} + + + + +?> \ No newline at end of file diff --git a/packages/freeswitch/freeswitch.xml b/packages/freeswitch/freeswitch.xml new file mode 100644 index 00000000..493acd14 --- /dev/null +++ b/packages/freeswitch/freeswitch.xml @@ -0,0 +1,249 @@ + + + + + + + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + FreeSWITCH Settings + 0.1 + FreeSWITCH: Settings + /usr/local/pkg/freeswitch.inc + + FreeSWITCH + Modify FreeSWITCH settings. +
Services
+ freeswitch.xml + /pkg_edit.php?xml=freeswitch.xml&id=0 +
+ + freeswitch + freeswitch.sh + freeswitch + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->freeswitchsettings + + /tmp/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch.tgz + + + /tmp/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_status.tmp + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_dialplan.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_extensions.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_external.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_gateways.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_internal.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_modules.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_public.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch_vars.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/freeswitch.inc + + + /usr/local/lib/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/libtinfo.so.5.6 + + + /usr/local/lib/ + 0755 + http://www.pfsense.com/packages/config/freeswitch/libncurses.so.5.6 + + + + Numbering Plan + numbering_plan + Enter the numbering plan here. example: US + input + + + Default Gateway + default_gateway + Enter the default gateway name here. example: asterlink.com + input + + + Default Area Code + default_area_code + Enter the area code here. example: 918 + input + + + Event Socket Port + event_socket_port + Enter the event socket port here. default: 8021 + input + + + Event Socket Password + event_socket_password + Enter the event socket password here. default: ClueCon + input + + + XML RPC HTTP Port + xml_rpc_http_port + Enter the XML RPC HTTP Port here. default: 8787 + input + + + XML RPC Auth Realm + xml_rpc_auth_realm + Enter the XML RPC Auth Realm here. default: freeswitch + input + + + XML RPC Auth User + xml_rpc_auth_user + Enter the XML RPC Auth User here. default: freeswitch + input + + + XML RPC Auth Password + xml_rpc_auth_pass + Enter the XML RPC Auth Password here. default: works + input + + + + + + + + + + sync_package_freeswitch(); + + + sync_package_freeswitch(); + + + sync_package_freeswitch(); + + + freeswitch_php_install_command(); + + + freeswitch_deinstall_command(); + +
\ No newline at end of file diff --git a/packages/freeswitch/freeswitch_dialplan.xml b/packages/freeswitch/freeswitch_dialplan.xml new file mode 100644 index 00000000..5559c3b6 --- /dev/null +++ b/packages/freeswitch/freeswitch_dialplan.xml @@ -0,0 +1,129 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchdialplan + 0.1 + FreeSWITCH: Dialplan + pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->freeswitchdialplan + + + <b>Default Dialplan</b> <br /> <br /> The default dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls to gateways, IVRs, external numbers, to scripts, or any destination. + dialplan_default_xml + <br />Path: /usr/local/freeswitch/conf/dialplan/default.xml <br /><br /> + textarea + base64 + off + 30 + 70 + 33 + + + + + + sync_package_freeswitch_dialplan(); + + + + + + + sync_package_freeswitch_dialplan(); + + + diff --git a/packages/freeswitch/freeswitch_extensions.xml b/packages/freeswitch/freeswitch_extensions.xml new file mode 100644 index 00000000..635bf309 --- /dev/null +++ b/packages/freeswitch/freeswitch_extensions.xml @@ -0,0 +1,195 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchextensions + 0.1 + FreeSWITCH: Extensions + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->extensions + + + Extension + extension + + + Mailbox + mailbox + + + Description + description + + + + + Extension + extension + Enter the extension here. The default configuration expects extension numbers between 1001 -1019. To use additional numbers for the extensions by adjusting the dialplan. In the in the dialplan under name="Local_Extension" adjust the regular expression="^(10[01][0-9])$". + input + + + Password + password + Enter the password here. + input + + + Mailbox + mailbox + Enter the mailbox here. Example: extension 1001 then mailbox 1001 + input + + + Voicemail Password + vm-password + Enter the voicemail password here. + input + + + Account Code + accountcode + Enter the account code here. Example: extension 1001 then accountcode 1001 + input + + + Effective Caller ID Name + effective_caller_id_name + Enter the effective caller id name here. + input + + + Effective Caller ID Number + effective_caller_id_number + Enter the effective caller id number here. + input + + + Outbound Caller ID Name + outbound_caller_id_name + Enter the outbound caller id name here. + input + + + Outbound Caller ID Number + outbound_caller_id_number + Enter the outbound caller id number here. + input + + + User Context + user_context + Enter the user context here. Example: default + input + + + Extension Description + description + Enter the description of the extension here. + input + + + + + + sync_package_freeswitch_extensions(); + + + sync_package_freeswitch_extensions(); + + + + + diff --git a/packages/freeswitch/freeswitch_external.xml b/packages/freeswitch/freeswitch_external.xml new file mode 100644 index 00000000..9e4a733d --- /dev/null +++ b/packages/freeswitch/freeswitch_external.xml @@ -0,0 +1,129 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchexternal + 0.1 + FreeSWITCH: External + pkg_edit.php?xml=freeswitch_external.xml&id=0 + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->freeswitchexternal + + + <b>External</b> <br /> <br />SIP external profile for outbound registrations. + external_xml + <br />Path: /usr/local/freeswitch/conf/sip_profiles/external.xml <br /><br /> + textarea + base64 + off + 30 + 70 + 33 + + + + + + sync_package_freeswitch_external(); + + + + + + + sync_package_freeswitch_external(); + + + diff --git a/packages/freeswitch/freeswitch_gateways.xml b/packages/freeswitch/freeswitch_gateways.xml new file mode 100644 index 00000000..0975eccb --- /dev/null +++ b/packages/freeswitch/freeswitch_gateways.xml @@ -0,0 +1,222 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchgateways + 0.1 + FreeSWITCH: Gateways + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->gateways + + + Gateway + gateway + + + Context + context + + + Description + description + + + + + Gateway + gateway + Enter the gateway name here. + input + + + + Username + username + Enter the username here. + input + + + + Password + password + Enter the password here. + input + + + + From-user + from-user + Enter the from-user here. + input + + + + From-domain + from-domain + Enter the from-domain here. + input + + + + Proxy + proxy + Enter the proxy here. + input + + + + Expire-seconds + expire-seconds + Enter the expire-seconds here. Example: 600 + input + 600 + + + Register + register + Choose whether to register. + select + + + + + + + Retry_seconds + retry_seconds + Enter the retry_seconds here. Example: 30 + input + 30 + + + Extension + extension + Enter the extension here. + input + + + + Context + context + Enter the context here. Example: public + input + public + + + Gateway Description + description + Enter the description of the gateway here. + input + + + + + + + sync_package_freeswitch_gateways(); + + + sync_package_freeswitch_gateways(); + + + + + diff --git a/packages/freeswitch/freeswitch_internal.xml b/packages/freeswitch/freeswitch_internal.xml new file mode 100644 index 00000000..12d828a5 --- /dev/null +++ b/packages/freeswitch/freeswitch_internal.xml @@ -0,0 +1,129 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchinternal + 0.1 + FreeSWITCH: Internal + pkg_edit.php?xml=freeswitch_internal.xml&id=0 + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->freeswitchinternal + + + <b>Internal</b> <br /> <br />SIP internal profile. + internal_xml + <br />Path: /usr/local/freeswitch/conf/sip_profiles/internal.xml <br /><br /> + textarea + base64 + off + 30 + 70 + 33 + + + + + + sync_package_freeswitch_internal(); + + + + + + + sync_package_freeswitch_internal(); + + + diff --git a/packages/freeswitch/freeswitch_modules.xml b/packages/freeswitch/freeswitch_modules.xml new file mode 100644 index 00000000..ac7635a0 --- /dev/null +++ b/packages/freeswitch/freeswitch_modules.xml @@ -0,0 +1,128 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchmodules + 0.1 + FreeSWITCH: Modules + pkg_edit.php?xml=freeswitch_modules.xml&id=0 + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->freeswitchmodules + + + <b>Modules</b> <br /> <br /> Modules add additional features to FreeSwitch. modules.conf.xml file allows you to enable or disable certain modules. Some modules have additional dependencies. Please see wiki.freeswith.org for more details. + modules_conf_xml + <br />Path: /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml <br /><br /> + textarea + base64 + off + 30 + 70 + 33 + + + + + + sync_package_freeswitch_modules(); + + + + + + + sync_package_freeswitch_modules(); + + + diff --git a/packages/freeswitch/freeswitch_public.xml b/packages/freeswitch/freeswitch_public.xml new file mode 100644 index 00000000..fd30ae4e --- /dev/null +++ b/packages/freeswitch/freeswitch_public.xml @@ -0,0 +1,129 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchpublic + 0.1 + FreeSWITCH: Public + pkg_edit.php?xml=freeswitch_public.xml&id=0 + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + installedpackages->package->$packagename->configuration->freeswitchpublic + + + <b>Public</b> <br /> <br />Directs inbound calls to extensions, IVRs, external numbers, and scripts. + public_xml + <br />Path: /usr/local/freeswitch/conf/dialplan/public/00_inbound_did.xml <br /><br /> + textarea + base64 + off + 30 + 70 + 33 + + + + + + sync_package_freeswitch_public(); + + + + + + + sync_package_freeswitch_public(); + + + diff --git a/packages/freeswitch/freeswitch_status.tmp b/packages/freeswitch/freeswitch_status.tmp new file mode 100644 index 00000000..dcdeede3 --- /dev/null +++ b/packages/freeswitch/freeswitch_status.tmp @@ -0,0 +1,225 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +require("guiconfig.inc"); + +/* Defaults to this page but if no settings are present, redirect to setup page */ +//if(!$config['installedpackages']['tinydns']['config'][0]) { +// Header("Location: /pkg_edit.php?xml=tinydns.xml&id=0"); +//} + +function event_socket_create($host, $port, $password) { + $fp = fsockopen($host, $port, $errno, $errdesc) + or die("Connection to $host failed"); + socket_set_blocking($fp,false); + + if ($fp) { + while (!feof($fp)) { + $buffer = fgets($fp, 1024); + usleep(100); //allow time for reponse + if (trim($buffer) == "Content-Type: auth/request") { + fputs($fp, "auth $password\n\n"); + break; + } + } + return $fp; + } + else { + return false; + } +} + + +function event_socket_request($fp, $cmd) { + + if ($fp) { + fputs($fp, $cmd."\n\n"); + usleep(100); //allow time for reponse + + $response = ""; + $i = 0; + $contentlength = 0; + while (!feof($fp)) { + $buffer = fgets($fp, 4096); + if ($contentlength > 0) { + $response .= $buffer; + } + + if ($contentlength == 0) { //if contentlenght is already don't process again + if (strlen(trim($buffer)) > 0) { //run only if buffer has content + $temparray = split(":", trim($buffer)); + if ($temparray[0] == "Content-Length") { + $contentlength = trim($temparray[1]); + } + } + } + + usleep(100); //allow time for reponse + + //optional because of script timeout //don't let while loop become endless + if ($i > 10000) { break; } + + if ($contentlength > 0) { //is contentlength set + //stop reading if all content has been read. + if (strlen($response) >= $contentlength) { + break; + } + } + $i++; + } + + return $response; + } + else { + echo "no handle"; + } +} + + +$pgtitle = "FreeSWITCH: Status"; +include("head.inc"); + +$password = "ClueCon"; +$port = "8021"; +$host = "192.168.1.1"; + + +?> + + +

+ + +
+ + +
+ + +
+ +
\n\n"; + +$fp = event_socket_create($host, $port, $password); +$cmd = "api sofia status"; +$response = event_socket_request($fp, $cmd); +echo "sofia status
\n"; +echo "
\n";
+echo $response; 
+echo "
\n"; +fclose($fp); +echo "

\n\n"; + +$fp = event_socket_create($host, $port, $password); +$cmd = "api sofia status profile internal"; +$response = event_socket_request($fp, $cmd); +echo "sofia status profile internal
\n"; +echo "
\n";
+echo $response; 
+echo "
\n"; +fclose($fp); +echo "

\n\n"; + +$fp = event_socket_create($host, $port, $password); +$cmd = "api sofia status profile external"; +$response = event_socket_request($fp, $cmd); +echo "sofia status profile external
\n"; +echo "
\n";
+echo $response; 
+echo "
\n"; +fclose($fp); +echo "

\n\n"; + +$fp = event_socket_create($host, $port, $password); +$cmd = "api status"; +$response = event_socket_request($fp, $cmd); +echo "status
\n"; +echo "
\n";
+echo $response; 
+echo "
\n"; +fclose($fp); +echo "

\n\n"; + +$fp = event_socket_create($host, $port, $password); +$cmd = "api show channels"; +$response = event_socket_request($fp, $cmd); +echo "show channels
\n"; +echo "
\n";
+echo $response; 
+echo "
\n"; +/* +$response = "\n\n
".$response; +$response = str_replace("\n", "
", $response); +$response = str_replace(",", "", $response); +$response = $response."
\n"; +echo $response; +*/ +fclose($fp); +echo "

\n\n"; + +$fp = event_socket_create($host, $port, $password); +$cmd = "api show calls"; +$response = event_socket_request($fp, $cmd); +echo "show calls
\n"; +echo "
\n";
+echo $response; 
+echo "
\n"; +fclose($fp); +echo "

\n\n"; + +?> + + + +
+ + + + + + diff --git a/packages/freeswitch/freeswitch_vars.xml b/packages/freeswitch/freeswitch_vars.xml new file mode 100644 index 00000000..47f97401 --- /dev/null +++ b/packages/freeswitch/freeswitch_vars.xml @@ -0,0 +1,129 @@ + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. + Describe your package requirements here + Currently there are no FAQ items provided. + freeswitchvars + 0.1 + FreeSWITCH: Vars + pkg_edit.php?xml=freeswitch_vars.xml&id=0 + /usr/local/pkg/freeswitch.inc + + + Settings + /pkg_edit.php?xml=freeswitch.xml&id=0 + + + Dialplan + /pkg_edit.php?xml=freeswitch_dialplan.xml&id=0 + + + Extensions + /pkg.php?xml=freeswitch_extensions.xml + + + External + /pkg_edit.php?xml=freeswitch_external.xml&id=0 + + + Gateways + /pkg.php?xml=freeswitch_gateways.xml + + + Internal + /pkg_edit.php?xml=freeswitch_internal.xml&id=0 + + + Modules + /pkg_edit.php?xml=freeswitch_modules.xml&id=0 + + + Public + /pkg_edit.php?xml=freeswitch_public.xml&id=0 + + + Status + /freeswitch/freeswitch_status.php + + + Vars + /pkg_edit.php?xml=freeswitch_vars.xml&id=0 + + + + installedpackages->package->$packagename->configuration->freeswitchvars + + + <b>Vars</b> <br /> <br />Define preprocessor variables here. Can be accessed in the xml configation with $${var_name}. + vars_xml + <br />Path: /usr/local/freeswitch/conf/vars.xml <br /><br /> + textarea + base64 + off + 30 + 70 + 33 + + + + + + sync_package_freeswitch_vars(); + + + + + + + sync_package_freeswitch_vars(); + + + diff --git a/packages/freeswitch/libncurses.so.5.6 b/packages/freeswitch/libncurses.so.5.6 new file mode 100644 index 00000000..3b40374c Binary files /dev/null and b/packages/freeswitch/libncurses.so.5.6 differ diff --git a/packages/freeswitch/libtinfo.so.5.6 b/packages/freeswitch/libtinfo.so.5.6 new file mode 100644 index 00000000..1263ec79 Binary files /dev/null and b/packages/freeswitch/libtinfo.so.5.6 differ -- cgit v1.2.3