Compare commits

..

2 Commits

Author SHA1 Message Date
David Domenech 5e70a69ac0 Merge pull request 'update-incoming-version' (!6) from update-incoming-version into master
gitea/vn-asterisk/pipeline/head There was a failure building this commit Details
Reviewed-on: #6
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2025-03-28 12:22:43 +00:00
David Domenech 95716d702e update-incoming-version
gitea/vn-asterisk/pipeline/pr-master There was a failure building this commit Details
2025-03-25 08:38:03 +00:00
1 changed files with 48 additions and 48 deletions

View File

@ -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) {
@ -72,7 +79,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= 22178',[$clientId]
WHERE c.id= #',[$clientId]
);
if ($client) {
@ -83,10 +90,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;
}