aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-07-01 01:53:23 -0600
committermcrane <mctch@yahoo.com>2009-07-01 01:57:57 -0600
commit2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a (patch)
tree7e350b08961603199cc6ce112ae9aa5cb58f9a83 /config
parent0033e921a3ba48df680e38bff0ee23032ae8127f (diff)
downloadpfsense-packages-2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a.tar.gz
pfsense-packages-2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a.tar.bz2
pfsense-packages-2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a.zip
FreeSWITCH package smtp auth and tls previously worked but plain smtp needed a bug fix, adjust huntgroup and ivr, fix a bug on huntgroup that prevented it from working completely when there is more than one huntgroup.
Diffstat (limited to 'config')
-rw-r--r--config/freeswitch/fax_to_email.tmp34
-rw-r--r--config/freeswitch/freeswitch.inc25
-rw-r--r--config/freeswitch/freeswitch.xml2
-rw-r--r--config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp4
-rw-r--r--config/freeswitch/freeswitch_ivr_options_edit.tmp4
-rw-r--r--[-rwxr-xr-x]config/freeswitch/freeswitch_mailto.tmp11
6 files changed, 45 insertions, 35 deletions
diff --git a/config/freeswitch/fax_to_email.tmp b/config/freeswitch/fax_to_email.tmp
index fec291fb..fcd6af06 100644
--- a/config/freeswitch/fax_to_email.tmp
+++ b/config/freeswitch/fax_to_email.tmp
@@ -1,7 +1,7 @@
<?php
/* $Id$ */
/*
- freeswitch_mailto.php
+ fax_to_email.php
Copyright (C) 2008 Mark J Crane
All rights reserved.
@@ -34,8 +34,8 @@ require_once("/etc/inc/config.inc");
require_once("/usr/local/pkg/freeswitch.inc");
global $config;
-//ob_end_clean();
-//ob_start();
+ob_end_clean();
+ob_start();
echo "\n---------------------------------\n";
@@ -99,14 +99,15 @@ $tmp_smtpfromname = $config['installedpackages']['freeswitchsettings']['config']
ini_set(max_execution_time,900); //15 minutes
ini_set('memory_limit', '96M');
-//$fd = fopen("php://stdin", "r");
-//$email = file_get_contents ("php://stdin");
+$fd = fopen("php://stdin", "r");
-//fclose($fd);
+$email = file_get_contents ("php://stdin");
-//if($fd){
+fclose($fd);
+
+if($fd){
$fp = fopen("/tmp/faxtoemail.txt", "w");
-//}
+}
@@ -122,19 +123,22 @@ ini_set('memory_limit', '96M');
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
- $mail->SMTPAuth = $tmp_smtpauth; // turn on/off SMTP authentication
+ if ($tmp_smtpauth == "true") {
+ $mail->SMTPAuth = $tmp_smtpauth; // turn on/off SMTP authentication
+ }
$mail->Host = $tmp_smtphost;
if (strlen($tmp_smtpsecure)>0) {
$mail->SMTPSecure = $tmp_smtpsecure;
}
- if ($tmp_smtpauth) {
+ if ($tmp_smtpusername) {
$mail->Username = $tmp_smtpusername;
$mail->Password = $tmp_smtppassword;
}
+ $mail->SMTPDebug = 2;
- echo "tmp_smtpfrom: $tmp_smtpfrom\n";
- echo "tmp_smtpfromname: $tmp_smtpfromname\n";
- echo "tmp_subject: $tmp_subject\n";
+ echo "tmp_smtpfrom: $tmp_smtpfrom\n";
+ echo "tmp_smtpfromname: $tmp_smtpfromname\n";
+ echo "tmp_subject: $tmp_subject\n";
$mail->From = $tmp_smtpfrom;
$mail->FromName = $tmp_smtpfromname;
@@ -169,8 +173,8 @@ ini_set('memory_limit', '96M');
}
-//$content = ob_get_contents(); //get the output from the buffer
-//ob_end_clean(); //clean the buffer
+$content = ob_get_contents(); //get the output from the buffer
+ob_end_clean(); //clean the buffer
fwrite($fp, $content);
fclose($fp);
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index 83d21d2d..ad50234f 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -1206,17 +1206,17 @@ function sync_package_freeswitch_hunt_group()
if (isset($rowhelper['huntgroupringback'])){
if ($rowhelper['huntgroupringback'] == "ring"){
- $tmp .= " session.execute(\"set\", \"ringback=\"+us_ring); //set to ringtone\n";
- $tmp .= " session.execute(\"set\", \"transfer_ringback=\"+us_ring); //set to ringtone\n";
+ $tmp .= " session.execute(\"set\", \"ringback=\"+us_ring); //set to ringtone\n";
+ $tmp .= " session.execute(\"set\", \"transfer_ringback=\"+us_ring); //set to ringtone\n";
}
if ($rowhelper['huntgroupringback'] == "music"){
- $tmp .= " session.execute(\"set\", \"ringback=\${hold_music}\"); //set to ringtone\n";
- $tmp .= " session.execute(\"set\", \"transfer_ringback=\${hold_music}\"); //set to ringtone\n";
+ $tmp .= " session.execute(\"set\", \"ringback=\${hold_music}\"); //set to ringtone\n";
+ $tmp .= " session.execute(\"set\", \"transfer_ringback=\${hold_music}\"); //set to ringtone\n";
}
}
else {
- $tmp .= " session.execute(\"set\", \"ringback=\${hold_music}\"); //set to ringtone\n";
- $tmp .= " session.execute(\"set\", \"transfer_ringback=\${hold_music}\"); //set to ringtone\n";
+ $tmp .= " session.execute(\"set\", \"ringback=\${hold_music}\"); //set to ringtone\n";
+ $tmp .= " session.execute(\"set\", \"transfer_ringback=\${hold_music}\"); //set to ringtone\n";
}
if ($rowhelper['huntgrouptimeout'] > 0) {
@@ -1259,6 +1259,7 @@ function sync_package_freeswitch_hunt_group()
$a_hunt_group_destinations = &$config['installedpackages']['freeswitchhuntgroupdestinations']['config'];
if (count($a_hunt_group_destinations) > 0) { usort($a_hunt_group_destinations, "cmp_hunt_group_order"); }
if (count($a_hunt_group_destinations) > 0) {
+
$x = 0;
foreach($a_hunt_group_destinations as $row) {
@@ -1323,9 +1324,10 @@ function sync_package_freeswitch_hunt_group()
}
}
- $delimiter = ",";
-
+ $delimiter = ",";
$tmp_application = $tmp_array[0]["application"];
+ unset($tmp_array);
+
$tmp .= "\n";
$tmp .= " session.execute(\"".$tmp_application."\", $tmp_buffer);\n";
//$tmp .= " session.execute(\"bridge\", sofia_contact_100+\",\"+sofia_contact_101+\",\"+sofia_contact_102+\",\"+sofia_contact_103+\",\"+sofia_contact_104);\n";
@@ -1333,13 +1335,14 @@ function sync_package_freeswitch_hunt_group()
break;
case "sequentially":
-
+
$tmp .= "\n";
//print_r($tmp_array);
$x = 0;
foreach ($tmp_array as $row) {
$tmp .= " session.execute(\"".$row["application"]."\", ".$row["data"].");\n";
}
+ unset($tmp_array);
break;
}
@@ -1353,7 +1356,7 @@ function sync_package_freeswitch_hunt_group()
if ($row['huntgrouptimeouttype'] == "sip uri") { $huntgrouptimeouttype = "bridge"; }
$tmp .= "\n";
$tmp .= " //timeout\n";
- $tmp .= " session.execute(\"".$huntgrouptimeouttype."\", \"default \"+domain+\" ".$huntgrouptimeoutdestination."\" );\n";
+ $tmp .= " session.execute(\"".$huntgrouptimeouttype."\", \"default \"+domain+\" ".$huntgrouptimeoutdestination."\");\n";
$tmp .= "\n";
@@ -2632,7 +2635,7 @@ function sync_package_freeswitch()
function freeswitch_php_install_command()
{
global $config;
- $freeswitch_package_version = "0.9.3";
+ $freeswitch_package_version = "0.9.3.1";
$freeswitch_build_version = "1.0.4 pre 8";
$freeswitch_build_revision = "13784";
diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml
index 0b9fb994..393f8620 100644
--- a/config/freeswitch/freeswitch.xml
+++ b/config/freeswitch/freeswitch.xml
@@ -44,7 +44,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>FreeSWITCH Settings</name>
- <version>0.9.3</version>
+ <version>0.9.3.1</version>
<title>FreeSWITCH: Settings</title>
<include_file>/usr/local/pkg/freeswitch.inc</include_file>
<menu>
diff --git a/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp b/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp
index 1c8ea4ed..4d6d1c01 100644
--- a/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp
+++ b/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp
@@ -137,9 +137,9 @@ display_top_tabs(build_menu());
<!--<b>examples:</b><br />-->
extension: 1001<br />
voicemail: 1001<br />
- sip uri (voicemail): sofia/default/*98@${domain}<br />
+ sip uri (voicemail): sofia/internal/*98@${domain}<br />
sip uri (external number): sofia/gateway/gatewayname/12081231234<br />
- sip uri (auto attendant): sofia/default/5002@${domain}<br />
+ sip uri (auto attendant): sofia/internal/5002@${domain}<br />
</span>
</tr>
<tr>
diff --git a/config/freeswitch/freeswitch_ivr_options_edit.tmp b/config/freeswitch/freeswitch_ivr_options_edit.tmp
index 55f2985f..894064e3 100644
--- a/config/freeswitch/freeswitch_ivr_options_edit.tmp
+++ b/config/freeswitch/freeswitch_ivr_options_edit.tmp
@@ -202,9 +202,9 @@ display_top_tabs(build_menu());
<!--<b>examples:</b><br />-->
extension: 1001<br />
voicemail: 1001<br />
- sip uri (voicemail): sofia/default/*98@${domain}<br />
+ sip uri (voicemail): sofia/internal/*98@${domain}<br />
sip uri (external number): sofia/gateway/gatewayname/12081231234<br />
- sip uri (auto attendant): sofia/default/5002@${domain}<br />
+ sip uri (auto attendant): sofia/internal/5002@${domain}<br />
</span>
</td>
</tr>
diff --git a/config/freeswitch/freeswitch_mailto.tmp b/config/freeswitch/freeswitch_mailto.tmp
index 71af859c..fa27ff68 100755..100644
--- a/config/freeswitch/freeswitch_mailto.tmp
+++ b/config/freeswitch/freeswitch_mailto.tmp
@@ -30,7 +30,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-require_once("config.inc");
+require_once("/etc/inc/config.inc");
require_once("/usr/local/pkg/freeswitch.inc");
global $config;
@@ -183,21 +183,24 @@ ob_start();
//send the email
- include "class.phpmailer.php";
- include "class.smtp.php"; ; // optional, gets called from within class.phpmailer.php if not already loaded
+ include "/usr/local/www/packages/freeswitch/class.phpmailer.php";
+ include "/usr/local/www/packages/freeswitch/class.smtp.php"; // optional, gets called from within class.phpmailer.php if not already loaded
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
+ if ($tmp_smtpauth == "true") {
$mail->SMTPAuth = $tmp_smtpauth; // turn on/off SMTP authentication
+ }
$mail->Host = $tmp_smtphost;
if (strlen($tmp_smtpsecure)>0) {
$mail->SMTPSecure = $tmp_smtpsecure;
}
- if ($tmp_smtpauth) {
+ if ($tmp_smtpusername) {
$mail->Username = $tmp_smtpusername;
$mail->Password = $tmp_smtppassword;
}
+ $mail->SMTPDebug = 2;
$mail->From = $tmp_smtpfrom;