Compare commits

..

1 Commits

Author SHA1 Message Date
David Domenech 96059705d1 update-incoming 2025-03-25 08:35:43 +00:00
1 changed files with 48 additions and 48 deletions

View File

@ -36,13 +36,6 @@ $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) {
@ -79,7 +72,7 @@ if ($clientId) {
'SELECT d.pbxQueue, c.id, d.notificationEmail
FROM vn.client c
JOIN vn.department d ON d.id = c.departmentFk
WHERE c.id= #',[$clientId]
WHERE c.id= 22178',[$clientId]
);
if ($client) {
@ -90,3 +83,10 @@ 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;
}