September 2005
Intermediate to advanced
408 pages
16h 20m
English
LookupBlacklist() — Performs a lookup of a Caller ID name/number from the blacklist database
LookupBlacklist()
Looks up the Caller ID number on the active channel in the
Asterisk database (family blacklist). If the number is found, and if
there exists a priority n+101
(where n is the priority of the
current instance), the channel will be set up to continue at that
priority level. Otherwise, the application returns 0. If no Caller ID was received on the
channel, it does nothing.
To add to the blacklist from the Asterisk CLI, type database put blacklist
name /
number.
; send blacklisted numbers to an endless loop
; otherwise, dial the number defined by the variable ${JOHN}
exten => s,1,Answer()
exten => s,2,LookupBlacklist()
exten => s,3,Dial(${JOHN})
exten => s,103,Playback(tt-allbusy)
exten => s,104,Wait(10)
exten => s,105,Goto(103)