NOTE: This info is VERY outdated and doesn’t work anymore. You should look at the new script for services provided by Reverse Australia.
So since I found the Australian gray pages on a lovely web site, I wanted to integrate this info into asterisk. 30 minutes of perl hacking later, and it works. enjoy
The following script & example will enable a reverse lookup of incoming caller ID and replace the name section with the lookup. It also allows you to maintain a comma separated file in number,name format. If this finds a match, it will add the name in the file to the caller ID string. If nothing is found in the file, it will consult the grey pages.
Updated 24/8/07: changed script URL to reflect new grey pages site.
Download this script and put it into /var/lib/asterisk/agi-bin.
Create a file /var/lib/asterisk/agi-bin/numbers.txt and populate it with numbers that you already know in the format of:
number,name
eg: 0390001234,My Pizza Shop
The script will try to match numbers from this file first. If no match is found, it will consult the Australian grey pages for a match. If nothing is found here, it will not change the caller ID strings.
In your extensions.conf, call cid-lookup like so:
exten => 100,1,NoOp(Incoming call!)
exten => 100,n,agi,cid-lookup.agi
exten => 100,n,NoOp(Caller ID: ${CALLERID(all)})
exten => 100,n,Dial(SIP/my-sip-phone,30)
exten => 100,n,HangUp
Nick Sibbing says:
Very interesting however the data from the greypages site is a bit out of date.
A number I gave up about 6 months ago still shows as mine. The current number that I’ve had for a a year is still showing as belonging to someone else. This number came as with Optus cable and then I migrated the number to Telstra when I went back to ADSL. The greypages site shows it as still belonging to Optus.
Pretty good site though keep up the interesting articles.
September 17, 2007, 11:35 amSteven Haigh says:
Yes, the data on the site in question is quite out of date. Telstra pretty much shut the lid on reverse directories when they claimed the data was copyright. Some updates have been seen here and there, however nothing major has happened since 2005.
It would be nice if the data was made available again, and apparently the guys that run the site have acquired some newer data, however it still needs converting etc.
September 17, 2007, 11:41 amBen says:
Hi all, i just tried the GP website and i couldn’t even find any whois info… have they shut the doors??
November 15, 2007, 5:32 pmSteven Haigh says:
Hrrrm. It goes seem to be down… Apparently the server is down… in theory it should be back up in a week or two…
November 15, 2007, 6:03 pmJosh says:
Grey pages is closed from the looks of it.
January 14, 2008, 8:13 amSteven Haigh says:
Hrrrm. It still works here… The script I wrote references http://www.greypag.es/
January 14, 2008, 9:25 pmmarty says:
mate great work
January 15, 2008, 7:02 pmi use pbx in a flash
which in nerd vettis version same a trixbox
can you post how it calls the script
having a play but carnt get it to work
is there a way to delay sending the caller id to after it parses the site
cheers
Steven Haigh says:
Not 100% sure what you mean, but if you want to delay the process, you can either exit the script and put a sleep in there, or use the Wait command in asterisk.
January 16, 2008, 1:25 ammarty says:
thanks
whats the basic steps for setup
i have installed as per blog
but it just doesnt search for the info
how do i call the data to search
useing pbx in a flash which is same as trixbox
cheers
January 17, 2008, 5:39 pmsue says:
I want to know who lives at a certain address (in Australia) Is there anyway of finding this out?
March 21, 2008, 11:54 pmRob says:
The site mentioned, allows you to type the address, instead of a phone number, and will return the Name etc.
Rob
April 14, 2008, 1:36 pmJoshua Davison says:
Nice.
Does it work with the 2008 update?
I am planning on setting up asterix soon and was gonna do this myself… When I get it done, this is a must. Even if the info is old/whatever, still better than seeing Just a number.
June 22, 2008, 12:34 amSteven Haigh says:
Not as yet. I wasn’t aware the site had been updated… I might look at doing this when I have a chance…
June 22, 2008, 9:37 amkrupt says:
thay have moved there site to http://informationisfreeforyouandme.com
August 14, 2008, 6:54 pmjez says:
As of a few days ago, the greypages data is no longer available from their website. They reference another provider that charges 23c per matching record.
March 13, 2009, 1:08 pmSiliconJaguar says:
Yes this is very disappointing. I really liked Grey Pages.
I hope they bring it back soon.
That new site is a waste of space trying to charge 23 cents a search. What a joke!.
I wonder if they did a deal with GreyPages to shut down so there was no competition?
.-.-.
March 22, 2009, 5:13 pmeleljay says:
Gotta love the big boys when it comes to information. They shut down greypa.es because they infringe copyright or privacy or some such nonsense. But it’s okay if the information is charged for, evidently it doesn’t infringe copyright or privacy if someone makes money out of it!!!
May 27, 2009, 10:36 pmCut the crap and bring it back. Silent numbers were never published, and as for privacy, the numbers were just made easier to find, they are in the normal white pages if you care to take the time to review each and every listing. What a crock!!
petr says:
So can this script still work? Greypages are great for asterisk, would love to make it work! But all the links here are broken
Ta
April 12, 2010, 6:23 pmSteven Haigh says:
The script will work, however the grey pages site is no longer able to be used how the script uses it. It is still online more for a ‘this is how you would do it’ purposes…
April 12, 2010, 10:37 pmJames says:
Steve, it might interest you or your readers to know we are currently offering a free API for out own reverse lookup service over here http://www.reverseaustralia.com/developer/
By the way, your link to cid-lookup.agi is currently broken.
January 3, 2011, 7:19 amSteven Haigh says:
Yeah – I’ve done a lot of updates on this script since – I should write another post on it and like to that post instead…
January 3, 2011, 9:30 amJames says:
I’m looking forward to seeing it. It’s been a while since any of our devs have done any perl code, so if you can suggest a better format to receive the data from our API we’re all ears. Or if you have any suggestions at all for that matter
January 3, 2011, 9:44 am