[asterisk-users] block certain numbers
vortex
binary.vortex at gmail.com
Mon Jun 17 13:35:26 CDT 2013
That seems suitable.
for the cid name i am using asterisk's internal database for the lookup
such as
*database put cidname 1111222333 "xyzwhoevername"*
then how do you create the database for the check_ban_db?
> On Monday 17 June 2013, binary wrote:
>> i am using asterisk's internal database to create a phonebook. i was
>> thinking to create something similar for the blocking, but i got stuck on
>> how to block the numbers.
> Well, once you've worked out whether the caller is welcome or not, then you
> need to dial your phone if the caller is allowed; or just play a suitable
> message and then Hangup() if they aren't.
>
> exten => s,1,NoOp(Incoming call from ${CALLERID(num)})
> exten => s,2,System(check_ban_db ${CALLERID(num)})
> ; goes to 3 if system cmd exited OK or 103 if exited non-zero
> exten => s,3,Dial(${MY_PHONE})
> exten => s,4,Hangup()
> ; step 103 is where we deal with unwelcome callers
> exten => s,103,Playback(f-off)
> exten => s,104,Hangup()
>
> You just need to make sure that you have a suitable message saved in
> /var/lib/asterisk/sounds/f-off.wav .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130617/25aa471b/attachment.htm>
More information about the asterisk-users
mailing list