Compare commits
1 Commits
master
...
update-inc
Author | SHA1 | Date |
---|---|---|
|
96059705d1 |
20
incoming.php
20
incoming.php
|
@ -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) {
|
||||
|
@ -78,10 +71,8 @@ if ($clientId) {
|
|||
$client = $db->getObject(
|
||||
'SELECT d.pbxQueue, c.id, d.notificationEmail
|
||||
FROM vn.client c
|
||||
JOIN vn.worker w ON w.id = c.salesPersonFk
|
||||
JOIN vn.business b ON b.id = w.businessFk
|
||||
JOIN vn.department d ON d.id = b.departmentFk
|
||||
WHERE c.id= #',[$clientId]
|
||||
JOIN vn.department d ON d.id = c.departmentFk
|
||||
WHERE c.id= 22178',[$clientId]
|
||||
);
|
||||
|
||||
if ($client) {
|
||||
|
@ -92,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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue