Upgrade 3CX to v18 and get it hosted free!

Asterisk func BLACKLIST

Author image

Synopsis:

Check if the callerid is on the blacklist

Description:

BLACKLIST()

Uses astdb to check if the Caller*ID is in family ‘blacklist’.

Notes

  • *CLI> core show function BLACKLIST

Return value

Returns 1 or 0.

Examples

exten => s,1,GotoIf(${BLACKLIST()}?blacklisted)
exten => s,n,Dial(SIP/123)
exten => s,n(blacklisted),Hangup()

You can add entries from the CLI as follows

  • *CLI> database put blacklist 1234 “Blacklisted for testing”

where blacklist is the family, 1234 is the callerid to blacklist and “Blacklisted for testing” can be any value you wish, though a description of why it’s blacklisted may be useful.

You can remove entries from the CLI as follows

  • *CLI> database del blacklist 1234

See also


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.