Skip to content

Commit

Permalink
fix for duplicate number in voicemail SMS #249
Browse files Browse the repository at this point in the history
  • Loading branch information
dgershman committed Mar 16, 2019
1 parent 973d9d2 commit 875556d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions endpoints/voicemail-complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function sendEmailForVoicemail($recipients, $serviceBodyName, $callerNumber)
$mail->addAddress($recipient);
}
$mail->addStringAttachment(file_get_contents($_REQUEST["RecordingUrl"] . ".mp3"), $_REQUEST["RecordingUrl"] . ".mp3");
$mail->Body = "You have a message from the " . $serviceBodyName . " helpline from caller " . $callerNumber. ", " . $_REQUEST["RecordingUrl"] . ".mp3";
$mail->Body = "You have a message from the " . $serviceBodyName . " helpline from caller " . $callerNumber . ", " . $_REQUEST["RecordingUrl"] . ".mp3";
$mail->Subject = 'Helpline Voicemail from ' . $serviceBodyName;
$mail->send();
} catch (Exception $e) {
Expand All @@ -53,8 +53,8 @@ function sendEmailForVoicemail($recipients, $serviceBodyName, $callerNumber)
$serviceBodyCallHandling = getServiceBodyCallHandling(setting("service_body_id"));
$serviceBodyName = getServiceBody(setting("service_body_id"))->name;
$callerNumber = $_REQUEST["caller_number"];
if (strpos($callerNumber, "+") !== 0) {
$callerNumber .= "+" . $callerNumber;
if (strpos(trim($callerNumber), "+") !== 0) {
$callerNumber = "+" . trim($callerNumber);
}

if ($serviceBodyCallHandling->primary_contact_number_enabled) {
Expand Down

0 comments on commit 875556d

Please sign in to comment.