<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">That seems suitable.<br>
for the cid name i am using asterisk's internal database for the
lookup such as<br>
<b style="color: rgb(0, 0, 0); font-family: Arial, Helvetica,
sans-serif; font-size: 12px; font-style: normal; font-variant:
normal; letter-spacing: normal; line-height: 18px; orphans:
auto; text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255);">database put cidname 1111222333 "xyzwhoevername"</b><br>
<br>
then how do you create the database for the check_ban_db?<br>
<br>
<br>
</div>
<blockquote
cite="mid:201306171509.09113.asterisk_list@earthshod.co.uk"
type="cite">
<pre wrap="">On Monday 17 June 2013, binary wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap="">
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 .
</pre>
</blockquote>
<br>
</body>
</html>