diff --git a/incoming.php b/incoming.php index 63dadc0..450a801 100755 --- a/incoming.php +++ b/incoming.php @@ -35,7 +35,12 @@ $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) {