Blacklist - 黑名單功能,這是 FreePBX 的功能模組之一,這可以用來阻擋特定的來電號碼(CID),以及啟用此功能後,預設也會將未顯示(unknown)的來電也做阻擋。
使用重點:
系統環境:
更多文章:
ext-did-0002:
TIPs:
必須先新增 Inbound Route,才會有此 context。
[ext-did-0002] include => ext-did-0002-custom exten => fax,1,Goto(${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)}) exten => 0702500268,1,Set(__FROM_DID=${EXTEN}) exten => 0702500268,n,Gosub(app-blacklist-check,s,1()) <===== exten => 0702500268,n,Set(CDR(did)=${FROM_DID}) exten => 0702500268,n,ExecIf($[ "${CALLERID(name)}" = "" ] ?Set(CALLERID(name)=${CALLERID(num)})) exten => 0702500268,n,Set(__CALLINGPRES_SV=${CALLERPRES()}) exten => 0702500268,n,Set(CALLERPRES()=allowed_not_screened) exten => 0702500268,n(dest-ext),Goto(ext-featurecodes,*43,1) ;--== end of [ext-did-0002] ==--;
app-blacklist-check:
TIPs:
必須安裝 Blacklist 模組,而且有新增至少一個電話號碼,才會有如下的內容,否則內容會是預設。
[app-blacklist-check] include => app-blacklist-check-custom exten => s,1,GotoIf($["${CALLERID(number)}" = "Unknown"]?check-blocked) <==== exten => s,n,GotoIf($["${CALLERID(number)}" = "Unavailable"]?check-blocked) <==== exten => s,n,GotoIf($["foo${CALLERID(number)}" = "foo"]?check-blocked:check) <==== exten => s,n(check-blocked),GotoIf($["${DB(blacklist/blocked)}" = "1"]?blacklisted) <==== exten => s,n(check),GotoIf($["${BLACKLIST()}"="1"]?blacklisted) exten => s,n,Set(CALLED_BLACKLIST=1) exten => s,n,Return() exten => s,n(blacklisted),Answer exten => s,n,Wait(1) exten => s,n,Zapateller() exten => s,n,Playback(ss-noservice) exten => s,n,Hangup ;--== end of [app-blacklist-check] ==--;
Images 0 | ||
---|---|---|
No images to display in the gallery. |