Answer the question
In order to leave comments, you need to log in
How to make partial numbers in the blacklist taken into account?
There is such an entry in Asterisk - it blocks numbers from the MySql database.
The format of the numbers is indicated in full, such as
79001234567
[SubMysqlblacklist]
exten => s,1,NoOp(--- MACRO --- BLACKLIST ---)
same => n,MySql(connect connid ${DBCurrentHost} ${DBuser} ${DBpass} ${DBname})
same => n,MySql(query resultid ${connid} select callerid from blacklist where callerid=${CALLERID(num)} and blockenabled = 1)
same => n,MySql(Fetch fetchid ${resultid} blacklistid)
same => n,NoOp(FetchID: ${fetchid} Var1: ${blacklistid} ConnID: ${connid} ResultID: ${resultid})
same => n,GotoIf($["${CALLERID(num)}" = "${blacklistid}"]?blacklisted)
same => n,MySql(clear ${resultid})
same => n,MySql(disconnect ${connid})
same => n,Goto(end)
same => n(blacklisted),Verbose(Cannot dial - ${CALLERID(num)} is blacklisted !)
same => n,MYSQL(clear ${resultid})
same => n,MYSQL(disconnect ${connid})
same => n,Progress()
same => n,Playback(/music/forblacklist,noanswer)
same => n,Wait(1)
same => n,Hangup()
same => n(end),NoOp(-- Clear --)
same => n,Return()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question