From 2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a Mon Sep 17 00:00:00 2001 From: mcrane Date: Wed, 1 Jul 2009 01:53:23 -0600 Subject: 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. --- config/freeswitch/fax_to_email.tmp | 34 ++++++++++++---------- config/freeswitch/freeswitch.inc | 25 +++++++++------- config/freeswitch/freeswitch.xml | 2 +- .../freeswitch_hunt_group_destinations_edit.tmp | 4 +-- config/freeswitch/freeswitch_ivr_options_edit.tmp | 4 +-- config/freeswitch/freeswitch_mailto.tmp | 11 ++++--- 6 files changed, 45 insertions(+), 35 deletions(-) mode change 100755 => 100644 config/freeswitch/freeswitch_mailto.tmp (limited to 'config/freeswitch') 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 @@ 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 @@ Describe your package requirements here Currently there are no FAQ items provided. FreeSWITCH Settings - 0.9.3 + 0.9.3.1 FreeSWITCH: Settings /usr/local/pkg/freeswitch.inc 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()); extension: 1001
voicemail: 1001
- sip uri (voicemail): sofia/default/*98@${domain}
+ sip uri (voicemail): sofia/internal/*98@${domain}
sip uri (external number): sofia/gateway/gatewayname/12081231234
- sip uri (auto attendant): sofia/default/5002@${domain}
+ sip uri (auto attendant): sofia/internal/5002@${domain}
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()); extension: 1001
voicemail: 1001
- sip uri (voicemail): sofia/default/*98@${domain}
+ sip uri (voicemail): sofia/internal/*98@${domain}
sip uri (external number): sofia/gateway/gatewayname/12081231234
- sip uri (auto attendant): sofia/default/5002@${domain}
+ sip uri (auto attendant): sofia/internal/5002@${domain}
diff --git a/config/freeswitch/freeswitch_mailto.tmp b/config/freeswitch/freeswitch_mailto.tmp old mode 100755 new mode 100644 index 71af859c..fa27ff68 --- 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; -- cgit v1.2.3