Merge pull request 'davidl-asterisk2' (!5) from davidl-asterisk2 into master
gitea/vn-asterisk/pipeline/head There was a failure building this commit
Details
gitea/vn-asterisk/pipeline/head There was a failure building this commit
Details
Reviewed-on: #5
This commit is contained in:
commit
3207ec1ea7
14
incoming.php
14
incoming.php
|
@ -36,6 +36,13 @@ $prefixLen = strlen($countryPrefix);
|
|||
if (substr($callerId, 0, $prefixLen) === $countryPrefix)
|
||||
$callerId = substr($callerId, $prefixLen);
|
||||
|
||||
// Checks if phone number is on the blacklist
|
||||
|
||||
if ($db->getValue('SELECT COUNT(*) > 0 FROM blacklist WHERE phone = #', [$callerId])) {
|
||||
Agi::exec('HANGUP');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Checks schedules
|
||||
|
||||
if ($countryCode) {
|
||||
|
@ -85,10 +92,3 @@ if ($clientId) {
|
|||
Agi::exec("SET VARIABLE ARG4 \"{$client->notificationEmail}\"");
|
||||
}
|
||||
}
|
||||
|
||||
// Checks if phone number is on the blacklist
|
||||
|
||||
if ($db->getValue('SELECT COUNT(*) > 0 FROM blacklist WHERE phone = #', [$callerId])) {
|
||||
Agi::exec('HANGUP');
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue