Skip to content

Commit

Permalink
sms for incoming calls customizable #636
Browse files Browse the repository at this point in the history
  • Loading branch information
dgershman committed Aug 22, 2022
1 parent 1ab1d32 commit ead1d43
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 4.2.0 (UNRELEASED)
* Yap now requires PHP version 8.0 and higher. [#623]
* Added support for downloading the list of volunteers in JSON format for a given service body. [#612]
* Added support for customizing SMS for incoming calls. [#636]
* Show missed calls also as a percentage of total calls received.
* Metric endpoint now returns volunteer missed and answered metrics, not exposed to UI yet. [#632]
* Fixed an issue with reports not recursing more than one level. [#620]
Expand Down
1 change: 1 addition & 0 deletions lang/en-AU.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@
$GLOBALS['to_speak_to_a_man'] = "to talk to a man";
$GLOBALS['to_speak_to_a_woman'] = "to talk to a woman";
$GLOBALS['speak_no_preference'] = "to speak to either";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "You have an incoming phoneline call from";
1 change: 1 addition & 0 deletions lang/en-US.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@
$GLOBALS['to_speak_to_a_man'] = "to talk to a man";
$GLOBALS['to_speak_to_a_woman'] = "to talk to a woman";
$GLOBALS['speak_no_preference'] = "to speak to either";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "You have an incoming phoneline call from";
1 change: 1 addition & 0 deletions lang/es-US.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@
$GLOBALS['to_speak_to_a_man'] = "to talk to a man";
$GLOBALS['to_speak_to_a_woman'] = "to talk to a woman";
$GLOBALS['speak_no_preference'] = "to speak to either";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "You have an incoming phoneline call from";
1 change: 1 addition & 0 deletions lang/fr-CA.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@
$GLOBALS['to_speak_to_a_man'] = "to talk to a man";
$GLOBALS['to_speak_to_a_woman'] = "to talk to a woman";
$GLOBALS['speak_no_preference'] = "to speak to either";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "You have an incoming phoneline call from";
1 change: 1 addition & 0 deletions lang/it-IT.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@
$GLOBALS['to_speak_to_a_man'] = "to talk to a man";
$GLOBALS['to_speak_to_a_woman'] = "to talk to a woman";
$GLOBALS['speak_no_preference'] = "to speak to either";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "You have an incoming phoneline call from";
1 change: 1 addition & 0 deletions lang/pig-latin.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@
$GLOBALS['to_speak_to_a_man'] = "otay alktay otay ayay anmay";
$GLOBALS['to_speak_to_a_woman'] = "otay alktay otay ayay omanway";
$GLOBALS['speak_no_preference'] = "otay eakspay otay eitheryay";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "ouyay avehay anyay incomingyay onelinephay allcay omfray";
1 change: 1 addition & 0 deletions lang/pt-BR.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@
$GLOBALS['to_speak_to_a_man'] = "to talk to a man";
$GLOBALS['to_speak_to_a_woman'] = "to talk to a woman";
$GLOBALS['speak_no_preference'] = "to speak to either";
$GLOBALS['you_have_an_incoming_phoneline_call_from'] = "You have an incoming phoneline call from";
4 changes: 2 additions & 2 deletions legacy/_includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ function getHelplineSchedule($service_body_int)
$finalSchedule = getVolunteerInfo($volunteers);

usort($finalSchedule, function ($a, $b) {
return $a->sequence > $b->sequence;
return $a->sequence > $b->sequence ? 1 : -1;
});

return json_encode($finalSchedule);
Expand Down Expand Up @@ -1743,7 +1743,7 @@ function get_str_val($subject)
} else {
return "false";
}
} else if (is_array($subject)) {
} elseif (is_array($subject)) {
return strval(json_encode($subject));
}

Expand Down
2 changes: 1 addition & 1 deletion legacy/helpline-dialer.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function getCallConfig($serviceBodyCallHandling, $tandem = VolunteerShadowOption
$conferences = $twilioClient->conferences->read(array ("friendlyName" => $_REQUEST['FriendlyName'] ));
if (count($conferences) > 0 && $conferences[0]->status != "completed") {
$tandem = 0;
$sms_body = "You have an incoming phoneline call from ";
$sms_body = word('you_have_an_incoming_phoneline_call_from') . " ";
if (isset($_REQUEST['StatusCallbackEvent']) && $_REQUEST['StatusCallbackEvent'] == 'participant-join' &&
( isset($_REQUEST['SequenceNumber']) && intval($_REQUEST['SequenceNumber']) == 1 )) {
setConferenceParticipant($_REQUEST['FriendlyName'], CallRole::CALLER);
Expand Down

0 comments on commit ead1d43

Please sign in to comment.