Upgrade 3CX to v18 and get it hosted free!

Asterisk cmd LookupBlacklist

Author image

Synopsis:

Look up Caller*ID name/number from blacklist database

Description:

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, then the channel will be setup to continue at that priority level.
Otherwise, it returns 0. Does nothing if no Caller*ID was received on the channel.

Example:

Sample Section for extensions.conf


[incoming] 
exten => s,1,LookupBlacklist 
exten => s,2,Dial(SIP/1234,15) 
exten => s,3,Answer 
exten => s,4,Wait(1) 
exten => s,6,Voicemail(u1) 
exten => s,7,Hangup 
exten => s,102,Goto(blacklisted,s,1) 


[blacklisted] 
exten => s,1,Answer 
exten => s,2,Wait(1) 
exten => s,3,Zapateller 
exten => s,4,Zapateller 
exten => s,5,Playback(ss-noservice) 
exten => s,6,Hangup 

Note: On asterisk 1.2+ you must add (j) to the end, in order for it to actually make the priority jump. Like such:

exten => s,1,LookupBlacklist(j)

otherwise, it will just continue onto the next priority.

To insert a number into the Black list from the CLI

database put blacklist <name/number> 1

eg. database put blacklist 0123456789 1

Stores 0123456789 as a blackilsted CallerID

To delete a number from the blacklist using the CLI
database del blacklist <name/number>

eg. database del blacklist 0123456789

Deletes 0123456789 from the blacklist database


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.