The Third Reminders email bug fix - contributed by arnabnaha
authorbradymiller <bradymiller@users.sourceforge.net>
Tue, 22 Jan 2013 21:43:36 +0000 (22 13:43 -0800)
committerbradymiller <bradymiller@users.sourceforge.net>
Thu, 24 Jan 2013 08:38:12 +0000 (24 00:38 -0800)
library/reminders.php

index fa5d800..ae3951c 100644 (file)
@@ -389,35 +389,41 @@ function send_reminders() {
 
     // Call to patient if Allow Voice Message and set reminder sent flag.
     if ($hipaa_voice == "YES") {
-      // Automated VOIP service provided by Maviq. Please visit http://signup.maviq.com for more information.
-      $siteId = $GLOBALS['phone_gateway_username'];
-      $token = $GLOBALS['phone_gateway_password'];
-      $endpoint = $GLOBALS['phone_gateway_url'];
-      $client = new MaviqClient($siteId, $token, $endpoint);
-      //Set up params.
-      $data = array(
-        "firstName" => $patientfname,
-        "lastName" => $patientlname,
-        "phone" => $patientphone,
-        //"apptDate" => "$scheduled_date[1]/$scheduled_date[2]/$scheduled_date[0]",
-        "timeRange" => "10-18",
-        "type" => "reminder",
-        "timeZone" => date('P'),
-        "greeting" => str_replace("[[sender]]", $sender_name, str_replace("[[patient_name]]", $patientfname, $myrow['reminder_content']))
-      );
-
-      // Make the call.
-      $response = $client->sendRequest("appointment", "POST", $data);
-
-      if ($response->IsError) {
-        // deal with and keep track of this unsuccessful call
-        $logging['number_failed_calls']++;
-      }
-      else {
-        // deal with and keep track of this succesful call
-        sqlStatementCdrEngine("UPDATE `patient_reminders` SET `voice_status`='1', `date_sent`=NOW() WHERE id=?", array($reminder['id']) );
-        $logging['number_success_calls']++;
-      }
+
+/******************************************************************************
+*     // Maviq does not work, is not currently supported, and seems to break on windows servers, so this
+*     //  feature has been commented out for now.
+*     // Automated VOIP service provided by Maviq. Please visit http://signup.maviq.com for more information.
+*      $siteId = $GLOBALS['phone_gateway_username'];
+*      $token = $GLOBALS['phone_gateway_password'];
+*      $endpoint = $GLOBALS['phone_gateway_url'];
+*      $client = new MaviqClient($siteId, $token, $endpoint);
+*      //Set up params.
+*      $data = array(
+*        "firstName" => $patientfname,
+*        "lastName" => $patientlname,
+*        "phone" => $patientphone,
+*        //"apptDate" => "$scheduled_date[1]/$scheduled_date[2]/$scheduled_date[0]",
+*        "timeRange" => "10-18",
+*        "type" => "reminder",
+*        "timeZone" => date('P'),
+*        "greeting" => str_replace("[[sender]]", $sender_name, str_replace("[[patient_name]]", $patientfname, $myrow['reminder_content']))
+*      );
+*
+*      // Make the call.
+*      $response = $client->sendRequest("appointment", "POST", $data);
+*
+*      if ($response->IsError) {
+*        // deal with and keep track of this unsuccessful call
+*        $logging['number_failed_calls']++;
+*      }
+*      else {
+*        // deal with and keep track of this succesful call
+*        sqlStatementCdrEngine("UPDATE `patient_reminders` SET `voice_status`='1', `date_sent`=NOW() WHERE id=?", array($reminder['id']) );
+*        $logging['number_success_calls']++;
+*      }
+*******************************************************************************/
+
     }
   }