<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">I created my own Whitelist and
Blacklist system. When I make an outgoing call, the number is
automatically added to my Whitelist database and I can add numbers
to the Blacklist manually or by pressing the *.<br>
You can use this for incoming/outgoing calls however you want to
setup your extensions.<br>
<br>
If a Whitelisted caller is calling, I change the Caller(name) =
Whitelist so I know it's ok to answer.<br>
If a Blacklisted caller is calling, I play a message and hangup.<br>
<br>
I get a lot of 8** calls from solicitors so here is my dialplan
and database:<br>
I pass the call to these Macros before it reaches anyone and I can
block calls by date time too.<br>
<br>
Mysql Blacklist Database<br>
blacklistid, callerid_from, callerid_to, description, times, days,
months, playback<br>
35, '%8775160592', '%', 'Solicitor keeps calling, '*', '*', '*',
'discon-or-out-of-service'<br>
32, '%', '%2134271', 'Kids Friends cant call after midnight and
before 8am', '00:00-08:00', '*', '*',
'sorry-cant-let-you-do-that2&please-try-again-later'<br>
<br>
[trunk]<br>
..........<br>
exten => _X!,n,Macro(blacklist,${CALLERID(num)},${EXTEN})<br>
exten => _X!,n,Macro(whitelist,${CALLERID(num)},${EXTEN})<br>
exten => _X!,n,Set(DB(global/lastcallerid)=${CALLERID(num)})<br>
exten => _X!,n,Goto(incoming,start,1)<br>
<br>
[macro-blacklist]<br>
exten => s,1,MYSQL(Connect connid ${db_host} ${db_user}
${db_pass} ${db_name})<br>
exten => s,n,MYSQL(Query resultid ${connid} SELECT blacklistid,
callerid_from, callerid_to, times, days, months, playback FROM
blacklist WHERE '${ARG1}' LIKE callerid_from AND '${ARG2}' LIKE
callerid_to)<br>
exten => s,n,MYSQL(Fetch fetchid ${resultid} blacklistid
callerid1 callerid2 times days months playback)<br>
exten => s,n,MYSQL(Clear ${resultid})<br>
exten => s,n,MYSQL(Disconnect ${connid})<br>
exten => s,n,GoToIf($["${blacklistid}" = ""]?call,1:time,1)<br>
<br>
exten =>
time,1,GotoIfTime(${times},${days},${months}?fail,1:call,1)<br>
<br>
exten => fail,1,NoOp(Blacklisted ${callerid1} to ${callerid2})<br>
exten => fail,n,GoTo(blacklisted,s,1)<br>
<br>
exten => call,1,NoOp(Not Blacklisted ${ARG1} to ${ARG2})<br>
<br>
[macro-blacklist-add]<br>
exten => s,1,MYSQL(Connect connid ${db_host} ${db_user}
${db_pass} ${db_name})<br>
exten => s,n,MYSQL(Query resultid ${connid} INSERT IGNORE INTO
blacklist (callerid_to, callerid_from, description) VALUES
('${ARG1}','${ARG2}','Blacklisted'))<br>
exten => s,n,MYSQL(Disconnect ${connid})<br>
<br>
[macro-whitelist]<br>
exten => s,1,MYSQL(Connect connid ${db_host} ${db_user}
${db_pass} ${db_name})<br>
exten => s,n,MYSQL(Query resultid ${connid} SELECT whitelistid,
callerid_from, callerid_to, description FROM whitelist WHERE
'${ARG1}' LIKE callerid_from AND '${ARG2}' LIKE callerid_to)<br>
exten => s,n,MYSQL(Fetch fetchid ${resultid} whitelistid
callerid1 callerid2 description)<br>
exten => s,n,MYSQL(Clear ${resultid})<br>
exten => s,n,MYSQL(Disconnect ${connid})<br>
exten => s,n,GoToIf($["${whitelistid}" = ""]?not,1:is,1)<br>
<br>
exten => is,1,NoOp(Whitelisted ${ARG1} to ${ARG2})<br>
exten => is,n,Set(CALLERID(name)=${description})<br>
<br>
exten => not,1,NoOp(Not Whitelisted ${ARG1} to ${ARG2})<br>
exten => not,n,Set(CALLERID(name)=Unknown)<br>
<br>
[macro-whitelist-add]<br>
exten => s,1,MYSQL(Connect connid ${db_host} ${db_user}
${db_pass} ${db_name})<br>
exten => s,n,MYSQL(Query resultid ${connid} INSERT IGNORE INTO
whitelist (callerid_to, callerid_from) VALUES ('%','${ARG2}'))<br>
exten => s,n,MYSQL(Disconnect ${connid})<br>
<br>
[blacklisted]<br>
exten => s,1,Set(CALLERID(name)=Blacklisted)<br>
exten => s,n,Wait(3)<br>
exten => s,n,Playback(${playback})<br>
exten => s,n,HangUp()<br>
<br>
If you want to add a KEY to your dialplan to add to blacklist or
whitelist:<br>
<br>
[roy]<br>
exten =>
roy,*,Macro(blacklist-add,%,${DB(global/lastcallerid)})<br>
exten =>
roy,#,Macro(whitelist-add,%,${DB(global/lastcallerid)})<br>
<br>
<pre class="moz-signature" cols="72">Co-op Vacation Rentals
<a class="moz-txt-link-abbreviated" href="http://www.coopvr.com">www.coopvr.com</a>
15218 Summit Ave
Suite #300-354
Fontana, CA 92336
Phone/Fax (855) 760-COOP (2667)</pre>
On 11/16/2012 8:20 AM, Felix Vazquez wrote:<br>
</div>
<blockquote
cite="mid:4567A733EAEAC0469D1D4DFDFF61F16163C5CF@srv-va-mail01.uavcomm.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style>
<!--
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
        {}
-->
</style>
<div class="WordSection1">
<p class="MsoNormal">I am in the asterisk CLI and can see an
unidentified caller trying the make calls out of the asterisk
system. How do I stop them? How do I identify them and how can
I see how the go in?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This is an example of what I would see:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> NOTICE[4098]:
chan_sip.c:20063 handle_request_invite: Call
<b><span style="font-size:14.0pt">from '' </span></b>to
extension '90111235551212' rejected because extension not
found.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Felix</p>
</div>
<br>
<hr>
<font size="1" color="Gray" face="Arial"><br>
This electronic message contains information from BOSH Global
Services which may be company sensitive, proprietary, privileged
or otherwise protected from disclosure. The information is
intended to be used solely by the recipient(s) named above. If
you are not an intended recipient, be aware that any review,
disclosure, copying, distribution or use of this transmission or
its contents is prohibited. If you have received this
transmission in error, please notify the sender immediately.<br>
</font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a class="moz-txt-link-freetext" href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
</blockquote>
<br>
</body>
</html>