<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using AGI to get Caller ID Name CNAM</title>
	<atom:link href="http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/</link>
	<description>Asterisk, VoIP, and IT Consulting</description>
	<lastBuildDate>Fri, 23 Jul 2010 19:22:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Gingerlime &#187; who&#8217;s calling?</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-80</link>
		<dc:creator>Gingerlime &#187; who&#8217;s calling?</dc:creator>
		<pubDate>Sat, 27 Feb 2010 00:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-80</guid>
		<description>[...] can be invoked in the same way as described here, i.e.: exten =&gt; s,n,Gosub(cidname-lookup,s,1) exten =&gt; s,n,dial(${PHONE},30,t) &#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] can be invoked in the same way as described here, i.e.: exten =&gt; s,n,Gosub(cidname-lookup,s,1) exten =&gt; s,n,dial(${PHONE},30,t) &#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asterisk: ID chiamante da elenco on-line Pagine Bianche &#171; Free Support Notes</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-65</link>
		<dc:creator>Asterisk: ID chiamante da elenco on-line Pagine Bianche &#171; Free Support Notes</dc:creator>
		<pubDate>Sat, 23 Jan 2010 16:43:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-65</guid>
		<description>[...] da perfezionare, ma quest&#8217;oggi mi sono fatto prendere da questa cosa finendo per sbaglio suquesto link dove si parla del medesimo lookup in america tramite alcuni servizi locali. In pratica è possibile [...]</description>
		<content:encoded><![CDATA[<p>[...] da perfezionare, ma quest&#8217;oggi mi sono fatto prendere da questa cosa finendo per sbaglio suquesto link dove si parla del medesimo lookup in america tramite alcuni servizi locali. In pratica è possibile [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Who&#8217;s Calling &#8211; Is there a Cell Phone Directory Out There? &#124; Phone Lookup Reviews</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-64</link>
		<dc:creator>Who&#8217;s Calling &#8211; Is there a Cell Phone Directory Out There? &#124; Phone Lookup Reviews</dc:creator>
		<pubDate>Fri, 22 Jan 2010 23:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-64</guid>
		<description>[...] Using AGI to get Caller ID Name CNAM &#124; TEAM FORREST Blog [...]</description>
		<content:encoded><![CDATA[<p>[...] Using AGI to get Caller ID Name CNAM | TEAM FORREST Blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: reverse cell phone lookup</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-61</link>
		<dc:creator>reverse cell phone lookup</dc:creator>
		<pubDate>Fri, 22 Jan 2010 22:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-61</guid>
		<description>How long has this blog been around? I have been searching for this kind of information for the past week and a half.</description>
		<content:encoded><![CDATA[<p>How long has this blog been around? I have been searching for this kind of information for the past week and a half.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Team Forrest</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-14</link>
		<dc:creator>Team Forrest</dc:creator>
		<pubDate>Sun, 03 Jan 2010 03:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-14</guid>
		<description>Ed,

Google is good for primarily residential numbers. If we take an example of a Chicago area McDonald&#039;s:

http://www.google.com/search?rls=en&amp;q=phonebook:3128670455
(fail)

http://www.411.com/search/Reverse_Phone?phone=3128670455
(comes back with McDonald&#039;s and more)

http://whitepages.anywho.com/results.php?qnpa=312&amp;qnpanxx=312867&amp;qnxx=867&amp;qp=8670455&amp;qstation=0455
(fail)

Lately, 411 is my favorite. If it fails on a identity it will at least tell you if it&#039;s a land line, cellular, etc and the city / state.</description>
		<content:encoded><![CDATA[<p>Ed,</p>
<p>Google is good for primarily residential numbers. If we take an example of a Chicago area McDonald&#8217;s:</p>
<p><a href="http://www.google.com/search?rls=en&#038;q=phonebook:3128670455" rel="nofollow">http://www.google.com/search?rls=en&#038;q=phonebook:3128670455</a><br />
(fail)</p>
<p><a href="http://www.411.com/search/Reverse_Phone?phone=3128670455" rel="nofollow">http://www.411.com/search/Reverse_Phone?phone=3128670455</a><br />
(comes back with McDonald&#8217;s and more)</p>
<p><a href="http://whitepages.anywho.com/results.php?qnpa=312&#038;qnpanxx=312867&#038;qnxx=867&#038;qp=8670455&#038;qstation=0455" rel="nofollow">http://whitepages.anywho.com/results.php?qnpa=312&#038;qnpanxx=312867&#038;qnxx=867&#038;qp=8670455&#038;qstation=0455</a><br />
(fail)</p>
<p>Lately, 411 is my favorite. If it fails on a identity it will at least tell you if it&#8217;s a land line, cellular, etc and the city / state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-13</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Sun, 03 Jan 2010 03:25:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-13</guid>
		<description>I don&#039;t know about anybody else but this does not work period.  At all.

The script is just fine.  I had zero problems running the script.

It&#039;s all the websites.  I ran those directly against some test numbers:

http://www.google.com/search?rls=en&amp;q=phonebook:$thenumber&amp;ie=UTF-8&amp;oe=UTF-8

That never works.  Tried it with 20+ phone numbers and did not work.  Tried with a 1, + etc, different formats.

http://phonenumbers.addresses.com/results.php?ReportType=33&amp;qfilter[pro]=on&amp;qi=0&amp;qk=10&amp;qnpa=$npa&amp;qp=$qp

Does not work either.  Tested with the same 20+ phone numbers and it did not work.

http://whocalled.us/do?action=getScore&amp;name=$WhoCalled_name&amp;pass=$WhoCalled_pass&amp;phoneNumber=$thenumber

This only seems to work for telemarketers and debt collectors.  I can see it being useful as a phone spam blocker, but not a CNAM lookup.

http://www.whitepages.com/search/ReversePhone?full_phone=$thenumber

1/20 success rate and it was a 10 year old business.

http://yellowpages.addresses.com/yellow-pages/phone:$thenumber/listings.html

2/20 and it was both old businesses again.

http://whitepages.anywho.com/results.php?&amp;qnpa=$npa&amp;qp=$telephone

Nothing.  Again.


I guess my big question here is if this even worth the processing cycles?  It seems as if there is no way to get even a 10% hit rate on the free lookup services available.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know about anybody else but this does not work period.  At all.</p>
<p>The script is just fine.  I had zero problems running the script.</p>
<p>It&#8217;s all the websites.  I ran those directly against some test numbers:</p>
<p><a href="http://www.google.com/search?rls=en&amp;q=phonebook:$thenumber&amp;ie=UTF-8&amp;oe=UTF-8" rel="nofollow">http://www.google.com/search?rls=en&amp;q=phonebook:$thenumber&amp;ie=UTF-8&amp;oe=UTF-8</a></p>
<p>That never works.  Tried it with 20+ phone numbers and did not work.  Tried with a 1, + etc, different formats.</p>
<p><a href="http://phonenumbers.addresses.com/results.php?ReportType=33&amp;qfilterpro=on&amp;qi=0&amp;qk=10&amp;qnpa=$npa&amp;qp=$qp" rel="nofollow">http://phonenumbers.addresses.com/results.php?ReportType=33&amp;qfilterpro=on&amp;qi=0&amp;qk=10&amp;qnpa=$npa&amp;qp=$qp</a></p>
<p>Does not work either.  Tested with the same 20+ phone numbers and it did not work.</p>
<p><a href="http://whocalled.us/do?action=getScore&amp;name=$WhoCalled_name&amp;pass=$WhoCalled_pass&amp;phoneNumber=$thenumber" rel="nofollow">http://whocalled.us/do?action=getScore&amp;name=$WhoCalled_name&amp;pass=$WhoCalled_pass&amp;phoneNumber=$thenumber</a></p>
<p>This only seems to work for telemarketers and debt collectors.  I can see it being useful as a phone spam blocker, but not a CNAM lookup.</p>
<p><a href="http://www.whitepages.com/search/ReversePhone?full_phone=$thenumber" rel="nofollow">http://www.whitepages.com/search/ReversePhone?full_phone=$thenumber</a></p>
<p>1/20 success rate and it was a 10 year old business.</p>
<p><a href="http://yellowpages.addresses.com/yellow-pages/phone:$thenumber/listings.html" rel="nofollow">http://yellowpages.addresses.com/yellow-pages/phone:$thenumber/listings.html</a></p>
<p>2/20 and it was both old businesses again.</p>
<p><a href="http://whitepages.anywho.com/results.php?&amp;qnpa=$npa&amp;qp=$telephone" rel="nofollow">http://whitepages.anywho.com/results.php?&amp;qnpa=$npa&amp;qp=$telephone</a></p>
<p>Nothing.  Again.</p>
<p>I guess my big question here is if this even worth the processing cycles?  It seems as if there is no way to get even a 10% hit rate on the free lookup services available.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Team Forrest</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-12</link>
		<dc:creator>Team Forrest</dc:creator>
		<pubDate>Thu, 19 Nov 2009 02:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-12</guid>
		<description>Thanks Robert!

I&#039;ve updated the code and fixed the others.

--fred</description>
		<content:encoded><![CDATA[<p>Thanks Robert!</p>
<p>I&#8217;ve updated the code and fixed the others.</p>
<p>&#8211;fred</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Dailey</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-11</link>
		<dc:creator>Robert Dailey</dc:creator>
		<pubDate>Wed, 18 Nov 2009 21:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-11</guid>
		<description>Even using the updated code, lookups are still failing for anywho and google, with a fallback of www411 working only about 75% of the time (giving city/state rather than name).

Any new updates?  I can use the URLs from the script in a browser and get a good lookup, but apparently the script won&#039;t parse the info and return it to asterisk.</description>
		<content:encoded><![CDATA[<p>Even using the updated code, lookups are still failing for anywho and google, with a fallback of www411 working only about 75% of the time (giving city/state rather than name).</p>
<p>Any new updates?  I can use the URLs from the script in a browser and get a good lookup, but apparently the script won&#8217;t parse the info and return it to asterisk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Barnes</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-10</link>
		<dc:creator>Joseph Barnes</dc:creator>
		<pubDate>Wed, 22 Apr 2009 02:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-10</guid>
		<description>Changed again This retrieves the info but I haven&#039;t parsed it out yet.
sub anywho_lookup {
	my ($npa, $nxx, $station) = @_;
	my $ua = LWP::UserAgent-&gt;new( timeout =&gt; 45);
	my $URL = &#039;http://whitepages.anywho.com/results.php?ReportType=33&amp;refer=2938&amp;adword=ANYWHO.COM&amp;qi=0&amp;qk=10&#039;;
	#$URL .= &#039;&amp;qnpa=&#039; . $npa . &#039;&amp;qp=&#039; . $nxx . $station;
	$URL .=
	&#039;&amp;qnpa=&#039;. $npa .
	&#039;&amp;qnpanxx=&#039;. $npa . $nxx .
	&#039;&amp;qnpanxx7=&#039;. $npa . $nxx . substr($station,1,1) .
	&#039;&amp;qnxx=&#039; . $nxx .
	&#039;&amp;qp=&#039;. $nxx . $station .
	&#039;&amp;qstation=&#039;.$station .
	&#039;&amp;PHPSESSID=&#039; . &#039;626da7c88dfce19b235ce7088a96a336&#039;;
	$ua-&gt;agent(&#039;AsteriskAGIQuery/1&#039;);
	my $req = new HTTP::Request GET =&gt; $URL;
	my $res = $ua-&gt;request($req);
	if ($res-&gt;is_success()) {
		print $res-&gt;content;
		if ($res-&gt;content =~ /Find More Information for (.*)/) {
			my $listing = $1;
			return $listing;
		}
	}
	return &quot;&quot;;
}


Have you used the whitepages api?  Net::Whitepages
I&#039;ve tried to get it working
my $White_Pages = Net::WhitePages-&gt;new(  TOKEN =&gt; &#039;12345&#039;, api_key =&gt; &#039;mykey&#039; );
my $res = $White_Pages-&gt;reverse_phone( phone =&gt; &quot;7990989890&quot; );
print $res;

What is this TOKEN for?  Also where am I supposed to use my api_key?

What about WWW::WhoCallsMe
I put in my listed number and it never finds it.

use WWW::WhoCallsMe;
  my $who = WWW::WhoCallsMe-&gt;new;

  my $number = &#039;9870709989&#039;;
  my $calledme = $who-&gt;fetch($number);
  if ($calledme-&gt;{listed})
  {
    my $name = $calledme-&gt;{name};
    print &quot;The number $number is listed.  &quot;;
    print &quot;It seems that $name was calling.&quot; if $name;
    print &quot;I don&#039;t know who was calling, though.&quot; unless $name;
    print &quot;\n&quot;;
  }
  else
  {
    print &quot;This number is not listed.\n&quot;;
  }</description>
		<content:encoded><![CDATA[<p>Changed again This retrieves the info but I haven&#8217;t parsed it out yet.<br />
sub anywho_lookup {<br />
	my ($npa, $nxx, $station) = @_;<br />
	my $ua = LWP::UserAgent-&gt;new( timeout =&gt; 45);<br />
	my $URL = &#8216;http://whitepages.anywho.com/results.php?ReportType=33&amp;refer=2938&amp;adword=ANYWHO.COM&amp;qi=0&amp;qk=10&#8242;;<br />
	#$URL .= &#8216;&amp;qnpa=&#8217; . $npa . &#8216;&amp;qp=&#8217; . $nxx . $station;<br />
	$URL .=<br />
	&#8216;&amp;qnpa=&#8217;. $npa .<br />
	&#8216;&amp;qnpanxx=&#8217;. $npa . $nxx .<br />
	&#8216;&amp;qnpanxx7=&#8217;. $npa . $nxx . substr($station,1,1) .<br />
	&#8216;&amp;qnxx=&#8217; . $nxx .<br />
	&#8216;&amp;qp=&#8217;. $nxx . $station .<br />
	&#8216;&amp;qstation=&#8217;.$station .<br />
	&#8216;&amp;PHPSESSID=&#8217; . &#8217;626da7c88dfce19b235ce7088a96a336&#8242;;<br />
	$ua-&gt;agent(&#8216;AsteriskAGIQuery/1&#8242;);<br />
	my $req = new HTTP::Request GET =&gt; $URL;<br />
	my $res = $ua-&gt;request($req);<br />
	if ($res-&gt;is_success()) {<br />
		print $res-&gt;content;<br />
		if ($res-&gt;content =~ /Find More Information for (.*)/) {<br />
			my $listing = $1;<br />
			return $listing;<br />
		}<br />
	}<br />
	return &#8220;&#8221;;<br />
}</p>
<p>Have you used the whitepages api?  Net::Whitepages<br />
I&#8217;ve tried to get it working<br />
my $White_Pages = Net::WhitePages-&gt;new(  TOKEN =&gt; &#8217;12345&#8242;, api_key =&gt; &#8216;mykey&#8217; );<br />
my $res = $White_Pages-&gt;reverse_phone( phone =&gt; &#8220;7990989890&#8243; );<br />
print $res;</p>
<p>What is this TOKEN for?  Also where am I supposed to use my api_key?</p>
<p>What about WWW::WhoCallsMe<br />
I put in my listed number and it never finds it.</p>
<p>use WWW::WhoCallsMe;<br />
  my $who = WWW::WhoCallsMe-&gt;new;</p>
<p>  my $number = &#8217;9870709989&#8242;;<br />
  my $calledme = $who-&gt;fetch($number);<br />
  if ($calledme-&gt;{listed})<br />
  {<br />
    my $name = $calledme-&gt;{name};<br />
    print &#8220;The number $number is listed.  &#8220;;<br />
    print &#8220;It seems that $name was calling.&#8221; if $name;<br />
    print &#8220;I don&#8217;t know who was calling, though.&#8221; unless $name;<br />
    print &#8220;\n&#8221;;<br />
  }<br />
  else<br />
  {<br />
    print &#8220;This number is not listed.\n&#8221;;<br />
  }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Team Forrest</title>
		<link>http://www.teamforrest.com/blog/89/using-agi-to-get-caller-id-name-cnam/comment-page-1/#comment-9</link>
		<dc:creator>Team Forrest</dc:creator>
		<pubDate>Sat, 04 Apr 2009 20:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamforrest.com/?p=89#comment-9</guid>
		<description>Frank, you&#039;re 100% correct. Anywho has changed... this is the hack:
&lt;pre&gt;sub anywho_lookup {
	my ($npa, $nxx, $station) = @_;
	my $ua = LWP::UserAgent-&gt;new( timeout =&gt; 45);
	my $URL = &#039;http://whitepages.anywho.com/results.php?ReportType=33&#039;;
	$URL .= &#039;&amp;qnpa=&#039; . $npa . &#039;&amp;qp=&#039; . $nxx . $station;
	$ua-&gt;agent(&#039;AsteriskAGIQuery/1&#039;);
	my $req = new HTTP::Request GET =&gt; $URL;
	my $res = $ua-&gt;request($req);
	if ($res-&gt;is_success()) {
		if ($res-&gt;content =~ /Find More Information for (.*)&lt;\/a&gt;/) {
			my $listing = $1;
			return $listing;
		}
	}
	return &quot;&quot;;
}&lt;/pre&gt;
And I will update the post... Thanks!</description>
		<content:encoded><![CDATA[<p>Frank, you&#8217;re 100% correct. Anywho has changed&#8230; this is the hack:</p>
<pre>sub anywho_lookup {
	my ($npa, $nxx, $station) = @_;
	my $ua = LWP::UserAgent->new( timeout => 45);
	my $URL = 'http://whitepages.anywho.com/results.php?ReportType=33';
	$URL .= '&#038;qnpa=' . $npa . '&#038;qp=' . $nxx . $station;
	$ua->agent('AsteriskAGIQuery/1');
	my $req = new HTTP::Request GET => $URL;
	my $res = $ua->request($req);
	if ($res->is_success()) {
		if ($res->content =~ /Find More Information for (.*)< \/a>/) {
			my $listing = $1;
			return $listing;
		}
	}
	return "";
}</pre>
<p>And I will update the post&#8230; Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
