Anybody have any experience with blocking numbers in the U.S's Do Not Call list? We have a customer that will be getting their own Asterisk server from us, and they want it to be check outbound numbers against the do not call list; this is for a backup, in case there's a slip up and one of their people try to dial somebody on the do not call list. The list has millions of numbers, and I don't think the extensions.conf file could handle me listing all million+ phone numbers and making it play a sound like "That number is on the do not call list", and then creating a _NXXNXXNXXX extension at the very bottom. The list would take up all it's memory. Anybody have a more elegant solution? Maybe an AGI script to match the outbound phone number against a column in a table in a MySQL database? Is there something similar already written that I can just modify? I know one of our T1 PRI Providers support this feature, but I don't want to block the list from all of our customers, just this one customer. Maybe they can do source+destination based blocking. I'd still prefer it be done through Asterisk. Suggestions?
Why use AGI? Why not just use the builtin DBGet() and DBPut() functions in *? -Chris ----- Original Message ----- From: "drodden" <drodden@webunited.net> To: <asterisk-users@lists.digium.com> Sent: Tuesday, August 10, 2004 9:22 AM Subject: [Asterisk-Users] Blocking the 'Do Not Call" List> Anybody have any experience with blocking numbers in the U.S's Do Not > Call list? > > We have a customer that will be getting their own Asterisk server from > us, and they want it to be check outbound numbers against the do not > call list; this is for a backup, in case there's a slip up and one of > their people try to dial somebody on the do not call list. > > The list has millions of numbers, and I don't think the extensions.conf > file could handle me listing all million+ phone numbers and making it > play a sound like "That number is on the do not call list", and then > creating a _NXXNXXNXXX extension at the very bottom. The list would take > up all it's memory. Anybody have a more elegant solution? Maybe an AGI > script to match the outbound phone number against a column in a table in > a MySQL database? Is there something similar already written that I can > just modify? > > I know one of our T1 PRI Providers support this feature, but I don't > want to block the list from all of our customers, just this one > customer. Maybe they can do source+destination based blocking. I'd still > prefer it be done through Asterisk. Suggestions? > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
either DBget()[if you have mysql support set up in asterisk] or a simple perl AGI script could do the DB search and either play the message itself or change the extension to a default "DNC number" recording. There are dozens of Perl AGI examples out there on the web that do MySQL lookups, and I have several if you want me to send one to you. But keep in mind the National DNC list is over 60 million records, so it DOES NOT take up a trivial amount of space or resources every time you do a search through it. How many outbound calls does your customer place every day? MATT--- -----Original Message----- From: drodden [mailto:drodden@webunited.net] Sent: Tuesday, August 10, 2004 12:22 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Blocking the 'Do Not Call" List Anybody have any experience with blocking numbers in the U.S's Do Not Call list? We have a customer that will be getting their own Asterisk server from us, and they want it to be check outbound numbers against the do not call list; this is for a backup, in case there's a slip up and one of their people try to dial somebody on the do not call list. The list has millions of numbers, and I don't think the extensions.conf file could handle me listing all million+ phone numbers and making it play a sound like "That number is on the do not call list", and then creating a _NXXNXXNXXX extension at the very bottom. The list would take up all it's memory. Anybody have a more elegant solution? Maybe an AGI script to match the outbound phone number against a column in a table in a MySQL database? Is there something similar already written that I can just modify? I know one of our T1 PRI Providers support this feature, but I don't want to block the list from all of our customers, just this one customer. Maybe they can do source+destination based blocking. I'd still prefer it be done through Asterisk. Suggestions? _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
An AGI script can exit any way you want it to. You can have it set the extension and the Priority to whatever you desire, you're not limited to +1 or +101 you can have it be anything. As for speed, AGI scripts that we use on a daily basis do thousands of searches a day through a 800,000 record table in less than a second(on a dedicated 3.2GHz MySQL DB machine) so looking through a million shouldn't be too bad. Asterisk will wait for the AGI to finish. I'll email you a script off-list that you may be able to take some code from to do your script. MATT--- -----Original Message----- From: drodden [mailto:drodden@webunited.net] Sent: Tuesday, August 10, 2004 2:20 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] Blocking the 'Do Not Call" List We're not doing the entire list, just the key area codes this customer will be calling. But yes, it's over a million and I definitely did not intend on putting it in the dialplan. We can make the specs of the machine nice, and put an optimized MySQL on it, this should help with the query. Maybe even break up the tables by area code. So that the Perl script first checks the area code, and then only queries that table for that phone number. If MySQL finds a match, the Perl script would return a special error code to Asterisk? If no match, it'll exit normally. Can an AGI script exit with a +1 or a +101 kind of like the CheckGroup command does? ie if it finds a match, exist with +201, if no match, exit with +1 Then I could do something like this: exten _9NXXNXXNXXX => 1,AGI(check_dnc) exten _9NXXNXXNXXX => 2,Dial(SIP/${EXTEN:1}@3640) exten _9NXXNXXNXXX => 3,Congestion exten _9NXXNXXNXXX => 202,BackGround(sorry-is-on-dnc) exten _9NXXNXXNXXX => 203,Hangup I wonder how long that AGI would take to execute, and if Asterisk would wait for it. Does anybody have a sample AGI script I could use as a reference? On Tue, 2004-08-10 at 13:28, Josh Roberson wrote:> Chris, While you are thinking logically, This will just as > un-effective as putting them all in the dialplan, as the DBGet() and > DBPut() functionality deals with the internal astdb (db1 database). > > I would reccomend going the AGI route at this time, until we have better > functionality for DB handling. > > -Josh > > Chris Shaw wrote: > > >Why use AGI? Why not just use the builtin DBGet() and DBPut() functionsin> >*? > > > > -Chris > > > >----- Original Message ----- > >From: "drodden" <drodden@webunited.net> > >To: <asterisk-users@lists.digium.com> > >Sent: Tuesday, August 10, 2004 9:22 AM > >Subject: [Asterisk-Users] Blocking the 'Do Not Call" List > > > > > > > > > >>Anybody have any experience with blocking numbers in the U.S's Do Not > >>Call list? > >> > >>We have a customer that will be getting their own Asterisk server from > >>us, and they want it to be check outbound numbers against the do not > >>call list; this is for a backup, in case there's a slip up and one of > >>their people try to dial somebody on the do not call list. > >> > >>The list has millions of numbers, and I don't think the extensions.conf > >>file could handle me listing all million+ phone numbers and making it > >>play a sound like "That number is on the do not call list", and then > >>creating a _NXXNXXNXXX extension at the very bottom. The list would take > >>up all it's memory. Anybody have a more elegant solution? Maybe an AGI > >>script to match the outbound phone number against a column in a table in > >>a MySQL database? Is there something similar already written that I can > >>just modify? > >> > >> > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >_______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Actually, the script I sent him was an AGI script that is part of the freely available astGUIclient suite http://astguiclient.sf.net/ . Just download the package and take a look at the .agi scripts in there. MATT--- -----Original Message----- From: Steve Szmidt [mailto:steve@szmidt.org] Sent: Tuesday, August 10, 2004 9:05 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] Blocking the 'Do Not Call" List -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 10 August 2004 03:30 pm, mattf wrote:> An AGI script can exit any way you want it to. You can have it set the > extension and the Priority to whatever you desire, you're not limited to+1> or +101 you can have it be anything. > > As for speed, AGI scripts that we use on a daily basis do thousands of > searches a day through a 800,000 record table in less than a second(on a > dedicated 3.2GHz MySQL DB machine) so looking through a million shouldn't > be too bad. Asterisk will wait for the AGI to finish. > > I'll email you a script off-list that you may be able to take some code > from to do your script.Please share! - -- Steve "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." Benjamin Franklin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBGXDCljK16xgETzkRAu9uAJwLcQ+RzhIABCPlEkKsba0bzq3nIACfbBU9 JpREdYmXYTXGcD0XAP0J13A=mR6x -----END PGP SIGNATURE----- _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
At 12:22 PM -0400 on 8/10/04, drodden wrote:>Anybody have any experience with blocking numbers in the U.S's Do Not >Call list? > >We have a customer that will be getting their own Asterisk server from >us, and they want it to be check outbound numbers against the do not >call list; this is for a backup, in case there's a slip up and one of >their people try to dial somebody on the do not call list. > >The list has millions of numbers, and I don't think the extensions.conf >file could handle me listing all million+ phone numbers and making it >play a sound like "That number is on the do not call list", and then >creating a _NXXNXXNXXX extension at the very bottom. The list would take >up all it's memory. Anybody have a more elegant solution? Maybe an AGI >script to match the outbound phone number against a column in a table in >a MySQL database? Is there something similar already written that I can >just modify? > >I know one of our T1 PRI Providers support this feature, but I don't >want to block the list from all of our customers, just this one >customer. Maybe they can do source+destination based blocking. I'd still >prefer it be done through Asterisk. Suggestions?This actually sounds like a problem that is asking for an ENUM solution. <gasp> I think that DNSSEC, some IP filters, plus forcing telemarketers to subscribe to the lookup service would go a long way to solving this problem and moving the burden from your shoulders onto the shoulders of the US guv'mint, which could probably fairly easily fund something like this (all open source). Some enterprising firm should offer that service (hello to all my friends at Neustar's managed ENUM service!) The trick here is that I'm sure you're not the only one asking for these numbers. I'll bet there are hundreds of firms asking for these numbers. If the FCC hands out a "database" of all those destinations, that might be used in a Bad way, since then copies will undoubtedly find their way into the hands of telemarketers. DNS queries can be measured from individual resolvers, and anyone "farming" the DNS tree can be suitably discovered and punished, unlike a CD-ROM of data that vanishes into the swarming underground of tele-sleeze. Regardless of the advantages or disadvantages of the data escaping into the wild, the other advantage that ENUM would have here would be that it would be dynamic; the FCC (or ITC, or whoever keeps that database) would be able to dynamically update the DNS tree and then within 10 minutes, the new entries would appear and everyone would be using them. One might argue that an XML query using AGI or a custom app might have the same benefit, but ENUM/DNS seems to work just as well and it has some advantages that a standard database doesn't for this type of simple-result query. JT