Page 432 - Asteriskā¢: The Future of Telephony
P. 432
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 => 123,1,Answer()
exten => s,2,LookupBlacklist()
; if the Caller ID number is found in the blacklist, jump to the "goaway" label
exten => 123,n,GotoIf($["${LOOKUPBLSTATUS}" = "FOUND"]?goaway)
; otherwise, go ahead and call John
exten => 123,n,Dial(${JOHN})
exten => 123,n(goaway),Busy(5)
exten => 123,n,Hangup()
See Also
BLACKLIST
LookupCIDName() Performs a lookup of a Caller ID name from the AstDB
LookupCIDName()
This application has been deprecated in favor of Set(CALLERID(name)=
${DB(cidname/${CALLERID(num)})})
Uses the Caller ID number on the active channel to retrieve the Caller ID name from
the AstDB (family cidname). This application does nothing if no Caller ID was received
on the channel. This is useful if you do not subscribe to Caller ID name delivery, or if
you want to change the Caller ID names on some incoming calls.
; look up the Caller ID information from the AstDB, and pass it along
; to Jane's phone
exten => 123,1,Answer()
exten => 123,2,LookupCIDName()
exten => 123,3,Dial(SIP/Jane)
See Also
DB
Macro() Calls a previously defined dialplan macro
Macro(macroname,arg1,arg2...)
Executes a macro defined in the context named macro- macroname, jumping to the s
extension of that context and executing each step, then returning when the steps end.
404 | Appendix B: Application Reference