Skip to content

Commit

Permalink
call timeout for dialer
Browse files Browse the repository at this point in the history
  • Loading branch information
dgershman committed Mar 15, 2018
1 parent c863b12 commit 8c51d83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ Some additional details on this:

- You can visualize the shift schedule by going to http://example.com/yap/schedule.html and selecting from the dropdown.
- If you want to have a volunteer that always is on, then set the start time to "Midnight" and the Duration "Open-Ended"
- You can also control the sequence by specifying "Location Info". This will be sorted numerically ascending. (for example 0 is the highest, 99 is the lowest)
- You can control the sequence by specifying "Location Info". This will be sorted numerically ascending. (for example 0 is the highest, 99 is the lowest)
- You can control the timeout between calls, which is defaulted at 20 seconds. You do this by setting in config.php the following parameter.

```php
static $call_timeout = 20;
```

## Facebook Messenger Gateway (Meetings Lookup)

Expand Down
6 changes: 4 additions & 2 deletions helpline-dialer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
$service_body_id = $_REQUEST["service_body_id"];
$phone_number = getHelplineVolunteer($service_body_id, $tracker);
$call_status = isset($_REQUEST["DialCallStatus"]) ? $_REQUEST["DialCallStatus"] : "starting";
$call_timeout = isset($GLOBALS["call_timeout"]) ? $GLOBALS["call_timeout"] : 20;
?>
<Response>
<?php
if ($call_status != "completed") { ?>
<Dial method="GET"
callerId="<?php echo isset($_REQUEST["Called"]) ? $_REQUEST["Called"] : "0000000000" ?>"
action="helpline-dialer.php?service_body_id=<?php echo $service_body_id; ?>&amp;tracker=<?php echo $tracker; ?>&amp;Called=<?php echo urlencode(isset($_REQUEST["Called"]) ? $_REQUEST["Called"] : "0000000000") ?>">
timeout="<?php echo $call_timeout?>"
callerId="<?php echo isset($_REQUEST["Called"]) ? $_REQUEST["Called"] : "0000000000" ?>"
action="helpline-dialer.php?service_body_id=<?php echo $service_body_id; ?>&amp;tracker=<?php echo $tracker; ?>&amp;Called=<?php echo urlencode(isset($_REQUEST["Called"]) ? $_REQUEST["Called"] : "0000000000") ?>">
<Number>
<?php echo $phone_number; ?>
</Number>
Expand Down

0 comments on commit 8c51d83

Please sign in to comment.