Hi,
I've been reading all I can on Google (and Asterisk TFOT book) looking for
ideas on how to implement an automated blacklist feature.
I would like to automatically blacklist a incoming number based on timestamp
and count information.
For example, if I get a prank call from the same number 5
On Thu, 2007-10-18 at 16:02 +0300, Brian Hutchinson wrote:
I would like to automatically blacklist a incoming number based on
timestamp and count information.
For example, if I get a prank call from the same number 5 times within
15 minutes, I want my dialplan to automatically blacklist
Is there a function to write the timestamp of the first call? I started
thinking about AGI and PHP/MySQL since that is what I'm familiar with. I
couldn't find methods to write timestamp info to AstDB or if I could ... how
to read it back and compare it to time now to decide to increment my
On Thu, 2007-10-18 at 16:51 +0300, Brian Hutchinson wrote:
Is there a function to write the timestamp of the first call?
You can use the built-in channel variable ${EPOCH}, which will give you
the current time in Unix timestamp format (number of seconds since Jan
1, 1970). Then you can do
It's not technically complex to do - you can probably use the astdb for
that, or store all incoming numbers with timestamp in MySQL and run
something like:
SELECT count(*) 5 AS blacklisted
FROM incoming_calls
WHERE callerid = 12345
AND timestamp DATE_SUB( NOW(), INTERVAL 15 MINUTE )
you
I feel more comfortable with MySQL ... just need to learn how to get the
dialplan to use it.
Also figure out the pro's/con's to MySQL vs AstDB. If I used MySQL then I
could put myphpadmin and get a pseudo GUI to manipulate the blacklist
database for almost no effort so that is another reason for
How do you know that the call is a prank call, an not just someone
that likes calling your company alot... ?
If you just want a database of callerid's to block, here is what I
have used, I hope it helps some
My SQL table looks has 4 columns id (autoincrement), callerid,
blockenabled
Yeah I would use MySQL as well for more or less the same reasons. Using
MySQL right from the dialplan is not very elegant but it's pretty simple -
see http://www.voip-info.org/tiki-index.php?page=Asterisk%20cmd%20MYSQL
Thanks
l.
On Thu, 18 Oct 2007 16:49:48 +0200, Brian Hutchinson
[EMAIL
On Thursday 18 October 2007 09:49:48 Brian Hutchinson wrote:
I feel more comfortable with MySQL ... just need to learn how to get the
dialplan to use it.
See func_odbc.conf.
--
Tilghman
___
--Bandwidth and Colocation Provided by
On Thu, 2007-10-18 at 16:02 +0300, Brian Hutchinson wrote:
Hi,
I've been reading all I can on Google (and Asterisk TFOT book) looking
for ideas on how to implement an automated blacklist feature.
I would like to automatically blacklist a incoming number based on
timestamp and count
10 matches
Mail list logo