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)
|
if (substr($callerId, 0, $prefixLen) === $countryPrefix)
|
||||||
$callerId = substr($callerId, $prefixLen);
|
$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
|
// Checks schedules
|
||||||
|
|
||||||
if ($countryCode) {
|
if ($countryCode) {
|
||||||
|
@ -78,10 +71,8 @@ if ($clientId) {
|
||||||
$client = $db->getObject(
|
$client = $db->getObject(
|
||||||
'SELECT d.pbxQueue, c.id, d.notificationEmail
|
'SELECT d.pbxQueue, c.id, d.notificationEmail
|
||||||
FROM vn.client c
|
FROM vn.client c
|
||||||
JOIN vn.worker w ON w.id = c.salesPersonFk
|
JOIN vn.department d ON d.id = c.departmentFk
|
||||||
JOIN vn.business b ON b.id = w.businessFk
|
WHERE c.id= 22178',[$clientId]
|
||||||
JOIN vn.department d ON d.id = b.departmentFk
|
|
||||||
WHERE c.id= #',[$clientId]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($client) {
|
if ($client) {
|
||||||
|
@ -92,3 +83,10 @@ if ($clientId) {
|
||||||
Agi::exec("SET VARIABLE ARG4 \"{$client->notificationEmail}\"");
|
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