<?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: Putting Real Names Back in CallerID: 3 Quick Perl Solutions for the Asterisk PBX	</title>
	<atom:link href="https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/</link>
	<description>Ward Mundy&#039;s Technobabblelog</description>
	<lastBuildDate>Thu, 02 Jun 2011 14:20:09 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Ryan		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-9053</link>

		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Thu, 12 Mar 2009 20:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-9053</guid>

					<description><![CDATA[Hi! Great idea for the asterisk lookup script.  However, I just tested it and it appears that these lookups (except google) have stopped allowing this type of queries.  For example, AnyWho says that this is an outdated page and gives no results.  FoneFinder doesn&#039;t even bring up a name or allow you to enter the full phone number.
I think Google lookups are still working, if the user hasn&#039;t blocked his number.

Am I doing something wrong? or have you heard of new lookup sites which can be used?

Thanks!

&lt;i&gt;[WM: Ryan, This article is over three years old or roughly three lifetimes in VoIP years. Try &lt;a href=&quot;http://bestof.nerdvittles.com/applications/callerid/&quot; rel=&quot;nofollow&quot;&gt;this link&lt;/a&gt; instead.]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>Hi! Great idea for the asterisk lookup script.  However, I just tested it and it appears that these lookups (except google) have stopped allowing this type of queries.  For example, AnyWho says that this is an outdated page and gives no results.  FoneFinder doesn&#8217;t even bring up a name or allow you to enter the full phone number.<br />
I think Google lookups are still working, if the user hasn&#8217;t blocked his number.</p>
<p>Am I doing something wrong? or have you heard of new lookup sites which can be used?</p>
<p>Thanks!</p>
<p><i>[WM: Ryan, This article is over three years old or roughly three lifetimes in VoIP years. Try <a href="http://bestof.nerdvittles.com/applications/callerid/" rel="nofollow">this link</a> instead.]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mahya		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-3160</link>

		<dc:creator><![CDATA[mahya]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 06:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-3160</guid>

					<description><![CDATA[hi
i want to use a mysql data base(i create it)that include information about the users and in some case i want to connect that database from asterisk 1.4 and use that information.i don&#039;t know how i should do it that work.please help me.send the solution to my email.
thanks

&lt;i&gt;[WM: Hmmm. Send your check by mail. When it clears... anything is possible, depending upon the amount of the check.]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>hi<br />
i want to use a mysql data base(i create it)that include information about the users and in some case i want to connect that database from asterisk 1.4 and use that information.i don&#8217;t know how i should do it that work.please help me.send the solution to my email.<br />
thanks</p>
<p><i>[WM: Hmmm. Send your check by mail. When it clears&#8230; anything is possible, depending upon the amount of the check.]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Byron Leonard		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-2361</link>

		<dc:creator><![CDATA[Byron Leonard]]></dc:creator>
		<pubDate>Tue, 16 Jan 2007 23:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-2361</guid>

					<description><![CDATA[I got the SugarCRM integration working based on the code in comment #17.  It took me quite some time since I don&#039;t know perl or Linux.  I also don&#039;t have the Auto-attendant setup so I had to figure out how to make it work without the instructions of this article.  The code and instructions are here.

http://www.softwareblueprint.com/sugarcallerid.txt

It works great.  I had to format all of my Outlook contact phone numbers into this exact format (111) 111-1111  This was a minor inconvenience considering all that I went through to get it to work.

I had some issues with the MySQL password &quot;root&quot;,&quot;passw0rd&quot;  I&#039;m not sure what is up with that. But once I rebooted my VM it worked.  I did not change the password.  It works as is.

Also I am multi-ringing my cell phone (TMobile) and the caller ID name is not transfered (only the number).  Any clues on how to get that working?

&lt;i&gt;[WM: Telephone providers insert their own CallerID names. The incoming CallerID name info gets thrown in the bit bucket. Thanks for the tips on SugarCRM. I&#039;ll have a look.]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>I got the SugarCRM integration working based on the code in comment #17.  It took me quite some time since I don&#8217;t know perl or Linux.  I also don&#8217;t have the Auto-attendant setup so I had to figure out how to make it work without the instructions of this article.  The code and instructions are here.</p>
<p><a href="http://www.softwareblueprint.com/sugarcallerid.txt" rel="nofollow ugc">http://www.softwareblueprint.com/sugarcallerid.txt</a></p>
<p>It works great.  I had to format all of my Outlook contact phone numbers into this exact format (111) 111-1111  This was a minor inconvenience considering all that I went through to get it to work.</p>
<p>I had some issues with the MySQL password "root","passw0rd"  I&#8217;m not sure what is up with that. But once I rebooted my VM it worked.  I did not change the password.  It works as is.</p>
<p>Also I am multi-ringing my cell phone (TMobile) and the caller ID name is not transfered (only the number).  Any clues on how to get that working?</p>
<p><i>[WM: Telephone providers insert their own CallerID names. The incoming CallerID name info gets thrown in the bit bucket. Thanks for the tips on SugarCRM. I&#8217;ll have a look.]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ward		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-2187</link>

		<dc:creator><![CDATA[Ward]]></dc:creator>
		<pubDate>Sat, 25 Nov 2006 21:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-2187</guid>

					<description><![CDATA[&lt;b&gt;CallerIDname script update.&lt;/b&gt; There&#039;s been a change in the way Perl handles uninitialized variables so we&#039;ve updated the calleridname.agi script. Log in to your server as root and issue the following commands to get the update:
&lt;code&gt;
cd /var/lib/asterisk/agi-bin
mv calleridname.agi calleridname.agi.old
wget http://nerdvittles.com/wp-content/calleridname.agi
chmod +x calleridname.agi
chown asterisk:asterisk calleridname.agi
&lt;/code&gt;
Special thanks to &lt;a href=&quot;http://forum.voxilla.com/asterisk-users-group/perl-warning-message-after-amportal-restart-calleridname-agi-19228.html&quot;&gt;Davy Chan&lt;/a&gt; for the fix.]]></description>
			<content:encoded><![CDATA[<p><b>CallerIDname script update.</b> There&#8217;s been a change in the way Perl handles uninitialized variables so we&#8217;ve updated the calleridname.agi script. Log in to your server as root and issue the following commands to get the update:<br />
<code><br />
cd /var/lib/asterisk/agi-bin<br />
mv calleridname.agi calleridname.agi.old<br />
wget http://nerdvittles.com/wp-content/calleridname.agi<br />
chmod +x calleridname.agi<br />
chown asterisk:asterisk calleridname.agi<br />
</code><br />
Special thanks to <a href="http://forum.voxilla.com/asterisk-users-group/perl-warning-message-after-amportal-restart-calleridname-agi-19228.html">Davy Chan</a> for the fix.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Davy Chan		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-2184</link>

		<dc:creator><![CDATA[Davy Chan]]></dc:creator>
		<pubDate>Sat, 25 Nov 2006 09:23:51 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-2184</guid>

					<description><![CDATA[Ward, I don&#039;t know if you got my last comment about $AGI-&gt;verbose(). When I hit the &quot;Say it!&quot; button, I just get a blank screen in return.

Anyways....

$AGI-&gt;verbose() requires 2 parameters: a message and a verbose logging level. Previous versions of Perl appear to overlook the fact that you didn&#039;t include a verbose logging level when using $AGI-&gt;verbose() in your calleridname.agi. But, more recent Perl versions appear to pop up a warning about use of an uninitialized variable (in this case, the missing $level parameter). My suggestion would be to change all the $AGI-&gt;verbose(&quot;some message&quot;) to $AGI-&gt;verbose(&quot;some message&quot;,1).

This would alleviate the warning messages plaguing Alex in comment 31 and some people on Voxilla.

See ya...

d.c.

&lt;i&gt;[WM: Thanks, as usual, Davy. I&#039;ve updated the script using your instructions, and I&#039;ll post a comment below just to be sure everyone gets it.]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>Ward, I don&#8217;t know if you got my last comment about $AGI->verbose(). When I hit the "Say it!" button, I just get a blank screen in return.</p>
<p>Anyways&#8230;.</p>
<p>$AGI->verbose() requires 2 parameters: a message and a verbose logging level. Previous versions of Perl appear to overlook the fact that you didn&#8217;t include a verbose logging level when using $AGI->verbose() in your calleridname.agi. But, more recent Perl versions appear to pop up a warning about use of an uninitialized variable (in this case, the missing $level parameter). My suggestion would be to change all the $AGI->verbose("some message") to $AGI->verbose("some message",1).</p>
<p>This would alleviate the warning messages plaguing Alex in comment 31 and some people on Voxilla.</p>
<p>See ya&#8230;</p>
<p>d.c.</p>
<p><i>[WM: Thanks, as usual, Davy. I&#8217;ve updated the script using your instructions, and I&#8217;ll post a comment below just to be sure everyone gets it.]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Frank		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-2162</link>

		<dc:creator><![CDATA[Frank]]></dc:creator>
		<pubDate>Sat, 18 Nov 2006 20:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-2162</guid>

					<description><![CDATA[I was able to work this example code into a script, but there are still a few numbers not popping up.  I found one that works at addresses.com.   Anyone want to take a stab at writing something for that service?

Frank]]></description>
			<content:encoded><![CDATA[<p>I was able to work this example code into a script, but there are still a few numbers not popping up.  I found one that works at addresses.com.   Anyone want to take a stab at writing something for that service?</p>
<p>Frank</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alex		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-2139</link>

		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Tue, 14 Nov 2006 00:58:06 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-2139</guid>

					<description><![CDATA[I am using  a modified calleridname.agi script  given by Jack in comment 18. This script includes Canadian numbers lookup. It works well, but when executed, it produces warning or error:
asterisk1*CLI&gt; Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 587, &lt;stdin&gt; line 30.
How it can be fixed?&lt;/stdin&gt;]]></description>
			<content:encoded><![CDATA[<p>I am using  a modified calleridname.agi script  given by Jack in comment 18. This script includes Canadian numbers lookup. It works well, but when executed, it produces warning or error:<br />
asterisk1*CLI> Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 587, <stdin> line 30.<br />
How it can be fixed?</stdin></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Adrian		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1702</link>

		<dc:creator><![CDATA[Adrian]]></dc:creator>
		<pubDate>Wed, 28 Jun 2006 15:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1702</guid>

					<description><![CDATA[Have a question about comment #17 where the user changed the calleridname.agi - to work with SugarCrm.

I have SugarCRM running on a PC separate from the Asterisk PC. What do I need to do to get the calleridname.agi to connect to the SugarCRM on the other PC?]]></description>
			<content:encoded><![CDATA[<p>Have a question about comment #17 where the user changed the calleridname.agi &#8211; to work with SugarCrm.</p>
<p>I have SugarCRM running on a PC separate from the Asterisk PC. What do I need to do to get the calleridname.agi to connect to the SugarCRM on the other PC?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: WeBRainstorm S.r.l.		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1693</link>

		<dc:creator><![CDATA[WeBRainstorm S.r.l.]]></dc:creator>
		<pubDate>Sun, 25 Jun 2006 17:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1693</guid>

					<description><![CDATA[Caller Name lookup module, version 1.0.1, has now caching completely implemented (I thought it was more difficult...)

Get it at: http://freepbx.org/ticket/946]]></description>
			<content:encoded><![CDATA[<p>Caller Name lookup module, version 1.0.1, has now caching completely implemented (I thought it was more difficult&#8230;)</p>
<p>Get it at: <a href="http://freepbx.org/ticket/946" rel="nofollow ugc">http://freepbx.org/ticket/946</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: WeBRainstorm S.r.l.		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1691</link>

		<dc:creator><![CDATA[WeBRainstorm S.r.l.]]></dc:creator>
		<pubDate>Sun, 25 Jun 2006 16:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1691</guid>

					<description><![CDATA[Hello ddwyer and others

Now my caller name lookup module will save lookup results in astDB (under the cidname key)

Get the latest release at:
http://www.freepbx.org/ticket/946

Regards]]></description>
			<content:encoded><![CDATA[<p>Hello ddwyer and others</p>
<p>Now my caller name lookup module will save lookup results in astDB (under the cidname key)</p>
<p>Get the latest release at:<br />
<a href="http://www.freepbx.org/ticket/946" rel="nofollow ugc">http://www.freepbx.org/ticket/946</a></p>
<p>Regards</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jose		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1690</link>

		<dc:creator><![CDATA[Jose]]></dc:creator>
		<pubDate>Sun, 25 Jun 2006 12:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1690</guid>

					<description><![CDATA[Hi, I am looking for a way to call a long distance number once a week and play a message then ask the person to respond to the message.
anyone that can help.
Thanks
Jose]]></description>
			<content:encoded><![CDATA[<p>Hi, I am looking for a way to call a long distance number once a week and play a message then ask the person to respond to the message.<br />
anyone that can help.<br />
Thanks<br />
Jose</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: WeBRainstorm S.r.l.		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1689</link>

		<dc:creator><![CDATA[WeBRainstorm S.r.l.]]></dc:creator>
		<pubDate>Sun, 25 Jun 2006 11:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1689</guid>

					<description><![CDATA[Hello ddwyer and others

You can download the 1.0.3 release at: http://www.freepbx.org/ticket/893
It has now the possibility to bulk import from CSV

More cool features to come ;)]]></description>
			<content:encoded><![CDATA[<p>Hello ddwyer and others</p>
<p>You can download the 1.0.3 release at: <a href="http://www.freepbx.org/ticket/893" rel="nofollow ugc">http://www.freepbx.org/ticket/893</a><br />
It has now the possibility to bulk import from CSV</p>
<p>More cool features to come 😉</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Davy Chan		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1676</link>

		<dc:creator><![CDATA[Davy Chan]]></dc:creator>
		<pubDate>Thu, 22 Jun 2006 06:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1676</guid>

					<description><![CDATA[Here&#039;s a fix for the &quot;Google Map&#039;s&quot; calleridname problem.

In calleridname.agi, replace the current google_lookup function.

&lt;i&gt;[WM: Here&#039;s a &lt;a href=&quot;http://nerdvittles.com/wp-content/calleridname.agi&quot;&gt;link&lt;/a&gt; to chandave&#039;s reworked calleridname.agi script with our extra special thanks. We knew chandave could do it!]&lt;/i&gt;

See ya...

d.c.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a fix for the "Google Map&#8217;s" calleridname problem.</p>
<p>In calleridname.agi, replace the current google_lookup function.</p>
<p><i>[WM: Here&#8217;s a <a href="http://nerdvittles.com/wp-content/calleridname.agi">link</a> to chandave&#8217;s reworked calleridname.agi script with our extra special thanks. We knew chandave could do it!]</i></p>
<p>See ya&#8230;</p>
<p>d.c.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jpeterman		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1673</link>

		<dc:creator><![CDATA[jpeterman]]></dc:creator>
		<pubDate>Wed, 21 Jun 2006 22:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1673</guid>

					<description><![CDATA[The Google Maps caller id problems seems to be duplicate entries in Google.  Try this search and you will see: http://www.google.com/search?rls=en&amp;q=phonebook:2147525330
Every number that I have had a problem with has had at least two entries.  Now back to work on the fix.....

&lt;i&gt;[WM: Yeah, we need 5 minutes from a Perl whiz ... which I&#039;m not.]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>The Google Maps caller id problems seems to be duplicate entries in Google.  Try this search and you will see: <a href="http://www.google.com/search?rls=en&#038;q=phonebook:2147525330" rel="nofollow ugc">http://www.google.com/search?rls=en&#038;q=phonebook:2147525330</a><br />
Every number that I have had a problem with has had at least two entries.  Now back to work on the fix&#8230;..</p>
<p><i>[WM: Yeah, we need 5 minutes from a Perl whiz &#8230; which I&#8217;m not.]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: WeBRainstorm S.r.l.		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1668</link>

		<dc:creator><![CDATA[WeBRainstorm S.r.l.]]></dc:creator>
		<pubDate>Wed, 21 Jun 2006 00:48:33 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1668</guid>

					<description><![CDATA[Hello ddwyer, tnx for your feedback.

Adding a way to bulk load the phonebook will be the next step of development ;)

SugarCRM integration also is in my next developing steps ;)

Also integrating with other sources, as the ones described in this page, it&#039;s a good idea  but we need first to analyze issues related to internationalization, copyright, performances (caching is a good idea ;) ) and website variability.

I&#039;ll probably open up a discussion Wiki page on freepbx.org tomorrow to get proposal and ideas about the next developing step.

Regards ;)]]></description>
			<content:encoded><![CDATA[<p>Hello ddwyer, tnx for your feedback.</p>
<p>Adding a way to bulk load the phonebook will be the next step of development 😉</p>
<p>SugarCRM integration also is in my next developing steps 😉</p>
<p>Also integrating with other sources, as the ones described in this page, it&#8217;s a good idea  but we need first to analyze issues related to internationalization, copyright, performances (caching is a good idea 😉 ) and website variability.</p>
<p>I&#8217;ll probably open up a discussion Wiki page on freepbx.org tomorrow to get proposal and ideas about the next developing step.</p>
<p>Regards 😉</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ddwyer		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1661</link>

		<dc:creator><![CDATA[ddwyer]]></dc:creator>
		<pubDate>Tue, 20 Jun 2006 00:00:57 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1661</guid>

					<description><![CDATA[i have installed it and configuerd it , i aslo installed the phonebook module , pretty cool. i had a similar phonebook on my old aah2.4 system . woulb be nice to have the phone book be able to import csv. also i like the other work that people have done with reverse lookups , it would be great to bring it all together as one project , and mabay have the reverse lookups create entryies in you phonebook , sort of like a cache? but not really . the other really cool thing would be to get the sugercrm stuff working in this module.

Intergrated freepbx modules are definatly the way forward !!]]></description>
			<content:encoded><![CDATA[<p>i have installed it and configuerd it , i aslo installed the phonebook module , pretty cool. i had a similar phonebook on my old aah2.4 system . woulb be nice to have the phone book be able to import csv. also i like the other work that people have done with reverse lookups , it would be great to bring it all together as one project , and mabay have the reverse lookups create entryies in you phonebook , sort of like a cache? but not really . the other really cool thing would be to get the sugercrm stuff working in this module.</p>
<p>Intergrated freepbx modules are definatly the way forward !!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ddwyer		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1633</link>

		<dc:creator><![CDATA[ddwyer]]></dc:creator>
		<pubDate>Thu, 15 Jun 2006 02:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1633</guid>

					<description><![CDATA[webrainstorm - this is very exciting , i am going to take a good look at it, i am going to try and get names from sugercrm OS . 
well done and thanks for sharing your hard work.]]></description>
			<content:encoded><![CDATA[<p>webrainstorm &#8211; this is very exciting , i am going to take a good look at it, i am going to try and get names from sugercrm OS .<br />
well done and thanks for sharing your hard work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: WeBRainstorm S.r.l.		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1621</link>

		<dc:creator><![CDATA[WeBRainstorm S.r.l.]]></dc:creator>
		<pubDate>Mon, 12 Jun 2006 18:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1621</guid>

					<description><![CDATA[Hi Guys,
I just submitted a module for FreePBX that let you lookup caller names against different sources (astDB, mysql, http, enum).

Please, take a look at it, I think it will be a good starting point to eventually add the sources you were talking about and did implement in your AGI

You can find the module here:
http://www.freepbx.org/ticket/946

Hope it helps

Have fun ;)]]></description>
			<content:encoded><![CDATA[<p>Hi Guys,<br />
I just submitted a module for FreePBX that let you lookup caller names against different sources (astDB, mysql, http, enum).</p>
<p>Please, take a look at it, I think it will be a good starting point to eventually add the sources you were talking about and did implement in your AGI</p>
<p>You can find the module here:<br />
<a href="http://www.freepbx.org/ticket/946" rel="nofollow ugc">http://www.freepbx.org/ticket/946</a></p>
<p>Hope it helps</p>
<p>Have fun 😉</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bruce		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1619</link>

		<dc:creator><![CDATA[Bruce]]></dc:creator>
		<pubDate>Mon, 12 Jun 2006 16:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1619</guid>

					<description><![CDATA[I just upgraded to Trixbox 1.0 / with all updates and modules updates, has anybody been able to get calleridname.agi to function again...

Thanks!!!]]></description>
			<content:encoded><![CDATA[<p>I just upgraded to Trixbox 1.0 / with all updates and modules updates, has anybody been able to get calleridname.agi to function again&#8230;</p>
<p>Thanks!!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jack		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1568</link>

		<dc:creator><![CDATA[Jack]]></dc:creator>
		<pubDate>Wed, 24 May 2006 19:50:48 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1568</guid>

					<description><![CDATA[As you may have noticed, this routine no longer operates if you upgrade to FreePBX.  I got it working with FreePBX version 2.1.0 by changing the macro-user-callerid context as follows (note that until and unless FreePBX officially supports this, you may need to tweak this macro every time you upgrade FreePBX): 

&lt;code&gt;[macro-user-callerid]
exten =&gt; s,1,GotoIf($[&quot;${CHANNEL:0:5}&quot; = &quot;Local&quot;]?report) 
exten =&gt; s,n,GotoIf($[&quot;${REALCALLERIDNUM:1:2}&quot; != &quot;&quot;]?start)
exten =&gt; s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten =&gt; s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten =&gt; s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
exten =&gt; s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten =&gt; s,n,GotoIf($[&quot;x${AMPUSERCIDNAME:1:2}&quot; = &quot;x&quot;]?chknamelen) 
exten =&gt; s,n,Set(CALLERID(all)=${AMPUSERCIDNAME} &lt; ${AMPUSER}&gt;)
exten =&gt; s,n(chknamelen),GotoIf($[${LEN(${CALLERID(name)}) &gt; 0 ]?report)
exten =&gt; s,n,AGI(calleridname.agi)
exten =&gt; s,n(report),NoOp(Using CallerID ${CALLERID(all)})&lt;/&gt;&lt;/code&gt;

Note that one line is changed in the existing macro (the label at the end of the line is changed:

&lt;code&gt;,n,GotoIf($[&quot;x${AMPUSERCIDNAME:1:2}&quot; = &quot;x&quot;]?chknamelen)&lt;/code&gt;

And two lines are added:

&lt;code&gt;exten =&gt; s,n(chknamelen),GotoIf($[${LEN(${CALLERID(name)}) &gt; 0 ]?report)
exten =&gt; s,n,AGI(calleridname.agi)&lt;/code&gt;

I also changed the dialplan.agi itself.  Because I do live in North America and do not use SugarCRM, I did not incorporate TBB&#039;s changes.  But I did make several other changes, among which are:

1) It now searches from the type of lookup you probably most want (name) and only if it is unsuccessful there does it proceed to try and find a city. More to the point, once it finds valid data it stops looking.  The existing routine eats up a lot of time by checking every  enabled service, and discarding earlier results if it finds a &quot;better&quot; result.  This is clearly inefficient; why not check the services you would most like to get a result from first and only move to the next check when a previous one has failed?

2) I implemented a subroutine to check what I consider the best service out there, Whitepages.com.  It&#039;s a bit slow (mainly because a request sends back a huge page of data, most of which is unnecessary for our purposes) but their database seems to contain both businesses and residences, and both U.S. and Canadian numbers (in fact I read somewhere that they are the most popular directory service in Canada).

3) I also added a reverse lookup search at Canada411.com - this one only returns Canadian numbers.  So I added a check for Canadian area codes that sets a flag if the NPA is Canadian, and only checks Canada411 if it&#039;s a Canadian NPA.  And it will only check AnyWho and Google if the NPA is NOT Canadian, because they don&#039;t appear to support Canadian reverse lookups.

4) I really hated the place lookup display from Fonetastic - all I really wanted was City and State (or Province), thank you very much.  Well, I found that Telcodata.us gives something pretty close to this, which is ratecenter and state.  Ratecenter is usually the city (abbreviated to ten characters maximum) but you will see things like DETROITZN1 which simply means Detroit Zone 1.  It&#039;s still far more readable that what the Fonetastic routine spits out. And Telcodata lets you retrieve the data in an XML file, which is very easy to process IF you have the Perl XML::Simple module installed.  Unfortunately, that isn&#039;t included in a standard Asterisk@Home distribution.  The easiest way to install it that I&#039;ve found is to do this from the command line:

&lt;code&gt;cd /tmp
wget http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-Simple-2.14.tar.gz
tar xzvf XML-Simple-2.14.tar.gz
cd XML-Simple-2.14
perl Makefile.PL
make install&lt;/code&gt;

After doing the above you can delete the XML::Simple module stuff from the /tmp directory (it&#039;s only needed during the install).

NOTE THAT IF YOU DON&#039;T INSTALL THE XML::SIMPLE MODULE THE MODIFIED AGI SCRIPT WON&#039;T RUN - Perl will barf because it can&#039;t find the module, even if you don&#039;t use the Telcodata.us service.

5) I changed the default timeout for each service to 5 seconds.  Remember your callers are waiting (and hearing nothing) while the lookups are being performed.  Even 5 seconds is too long in my opinion, but 45 seconds (the original default) was outrageously too long.

6) Finally, I removed the orphaned subroutine that did the Fonefinder lookups.  It no longer works, and it&#039;s no longer called from anywhere, so why keep it around?

Now a couple of caveats:

1) I am releasing my additions to the original code under the same terms as the original code (whatever they may have been), so anyone that used the original code may use this. However, notwithstanding the above, I must also say that I&#039;m providing these modifications to the original routine for educational and experimental purposes only, and in particular, without saying or implying that it is permissible to use the services accessed by this routine.  If you plan to use this in any sort of commercial environment, you may need to actually get a license and/or pay some money to whichever services you use. Whitepages.com, for example, has a commercial product that they sell to companies that do many lookups.  While I doubt anyone running Asterisk AT HOME will get in trouble for doing an occasional lookup, the situation may be much different if you implement this routine in a business or corporate setting.  I am not a lawyer, so I cannot tell you what your obligations may or may not be.

(Specific note regarding Whitepages.com - I think that if you buy the commercial product, you can get the results in XML format, which would be far more reliable and could potentially decrease the lookup time by a couple of seconds per lookup, which might make a big difference if you were running something like a call center.  Right now the modified routine won&#039;t use the XML files because I have no idea what format Whitepages.com uses, but if you do, it would be fairly easy to add a subroutine to parse whatever their XML format is.  Again, if you are running any kind of call center environment, you definitely should contact Whitepages.com to see how you can use their service in the most efficient and legal manner.)

2) This code works FOR ME as of the day I posted it, under very limited testing.  It may not work if the services change how they display their results.  It may not work if you encounter an unusual listing.  I do NOT offer any guarantees of any sort as to how it will work for you, or that it will work for you at all.  I will also add that I&#039;ve been messing with Perl for all of a month or two and I am a slow learner, so you may see better ways to do things in the code - I don&#039;t know about the original author and his code, but I assure you that I will NOT be offended by any suggestions for improvement to the parts I wrote (or modified).  Note that I may fix bugs in this routine or add additional services if I find them, but don&#039;t use this routine in any situation where it could cost you money if it doesn&#039;t work, without doing your own testing. THERE IS NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, ON THIS ROUTINE.

By downloading and/or using the modified calleridname.agi routine, you agree that you have read and will observe the above-mentioned caveats.  It will be available for download for a limited time at &lt;a href=&quot;http://michigantelephone.mi.org/modifiedcalleridname.zip&quot;&gt;this location&lt;/a&gt;. Ward, feel free to move it to your site and change the link (assuming the original author has no objections).

One thing I do NOT do here, but that probably should be done in any commercial operation, is to cache the results of a lookup for a period of time (say one week) so you don&#039;t make repeated requests to get the same data.  I&#039;m afraid I don&#039;t know Perl well enough to do that, but if anyone does, please feel free to add it in. And one final note, this routine is intended for use primarily in the U.S. and Canada, but in searching for alternative reverse-lookup sites I did stumble across &lt;a href=&quot;http://www.voip-info.org/wiki/view/Reverse+Lookup+in+Germany&quot;&gt;this page&lt;/a&gt;, which may be of interest to anyone in Germany (or that wants to get German caller ID information).]]></description>
			<content:encoded><![CDATA[<p>As you may have noticed, this routine no longer operates if you upgrade to FreePBX.  I got it working with FreePBX version 2.1.0 by changing the macro-user-callerid context as follows (note that until and unless FreePBX officially supports this, you may need to tweak this macro every time you upgrade FreePBX): </p>
<p><code>[macro-user-callerid]<br />
exten => s,1,GotoIf($["${CHANNEL:0:5}" = "Local"]?report)<br />
exten => s,n,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)<br />
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})<br />
exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})<br />
exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})<br />
exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})<br />
exten => s,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?chknamelen)<br />
exten => s,n,Set(CALLERID(all)=${AMPUSERCIDNAME} < ${AMPUSER}>)<br />
exten => s,n(chknamelen),GotoIf($[${LEN(${CALLERID(name)}) > 0 ]?report)<br />
exten => s,n,AGI(calleridname.agi)<br />
exten => s,n(report),NoOp(Using CallerID ${CALLERID(all)})</></code></p>
<p>Note that one line is changed in the existing macro (the label at the end of the line is changed:</p>
<p><code>,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?chknamelen)</code></p>
<p>And two lines are added:</p>
<p><code>exten => s,n(chknamelen),GotoIf($[${LEN(${CALLERID(name)}) > 0 ]?report)<br />
exten => s,n,AGI(calleridname.agi)</code></p>
<p>I also changed the dialplan.agi itself.  Because I do live in North America and do not use SugarCRM, I did not incorporate TBB&#8217;s changes.  But I did make several other changes, among which are:</p>
<p>1) It now searches from the type of lookup you probably most want (name) and only if it is unsuccessful there does it proceed to try and find a city. More to the point, once it finds valid data it stops looking.  The existing routine eats up a lot of time by checking every  enabled service, and discarding earlier results if it finds a "better" result.  This is clearly inefficient; why not check the services you would most like to get a result from first and only move to the next check when a previous one has failed?</p>
<p>2) I implemented a subroutine to check what I consider the best service out there, Whitepages.com.  It&#8217;s a bit slow (mainly because a request sends back a huge page of data, most of which is unnecessary for our purposes) but their database seems to contain both businesses and residences, and both U.S. and Canadian numbers (in fact I read somewhere that they are the most popular directory service in Canada).</p>
<p>3) I also added a reverse lookup search at Canada411.com &#8211; this one only returns Canadian numbers.  So I added a check for Canadian area codes that sets a flag if the NPA is Canadian, and only checks Canada411 if it&#8217;s a Canadian NPA.  And it will only check AnyWho and Google if the NPA is NOT Canadian, because they don&#8217;t appear to support Canadian reverse lookups.</p>
<p>4) I really hated the place lookup display from Fonetastic &#8211; all I really wanted was City and State (or Province), thank you very much.  Well, I found that Telcodata.us gives something pretty close to this, which is ratecenter and state.  Ratecenter is usually the city (abbreviated to ten characters maximum) but you will see things like DETROITZN1 which simply means Detroit Zone 1.  It&#8217;s still far more readable that what the Fonetastic routine spits out. And Telcodata lets you retrieve the data in an XML file, which is very easy to process IF you have the Perl XML::Simple module installed.  Unfortunately, that isn&#8217;t included in a standard Asterisk@Home distribution.  The easiest way to install it that I&#8217;ve found is to do this from the command line:</p>
<p><code>cd /tmp<br />
wget http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-Simple-2.14.tar.gz<br />
tar xzvf XML-Simple-2.14.tar.gz<br />
cd XML-Simple-2.14<br />
perl Makefile.PL<br />
make install</code></p>
<p>After doing the above you can delete the XML::Simple module stuff from the /tmp directory (it&#8217;s only needed during the install).</p>
<p>NOTE THAT IF YOU DON&#8217;T INSTALL THE XML::SIMPLE MODULE THE MODIFIED AGI SCRIPT WON&#8217;T RUN &#8211; Perl will barf because it can&#8217;t find the module, even if you don&#8217;t use the Telcodata.us service.</p>
<p>5) I changed the default timeout for each service to 5 seconds.  Remember your callers are waiting (and hearing nothing) while the lookups are being performed.  Even 5 seconds is too long in my opinion, but 45 seconds (the original default) was outrageously too long.</p>
<p>6) Finally, I removed the orphaned subroutine that did the Fonefinder lookups.  It no longer works, and it&#8217;s no longer called from anywhere, so why keep it around?</p>
<p>Now a couple of caveats:</p>
<p>1) I am releasing my additions to the original code under the same terms as the original code (whatever they may have been), so anyone that used the original code may use this. However, notwithstanding the above, I must also say that I&#8217;m providing these modifications to the original routine for educational and experimental purposes only, and in particular, without saying or implying that it is permissible to use the services accessed by this routine.  If you plan to use this in any sort of commercial environment, you may need to actually get a license and/or pay some money to whichever services you use. Whitepages.com, for example, has a commercial product that they sell to companies that do many lookups.  While I doubt anyone running Asterisk AT HOME will get in trouble for doing an occasional lookup, the situation may be much different if you implement this routine in a business or corporate setting.  I am not a lawyer, so I cannot tell you what your obligations may or may not be.</p>
<p>(Specific note regarding Whitepages.com &#8211; I think that if you buy the commercial product, you can get the results in XML format, which would be far more reliable and could potentially decrease the lookup time by a couple of seconds per lookup, which might make a big difference if you were running something like a call center.  Right now the modified routine won&#8217;t use the XML files because I have no idea what format Whitepages.com uses, but if you do, it would be fairly easy to add a subroutine to parse whatever their XML format is.  Again, if you are running any kind of call center environment, you definitely should contact Whitepages.com to see how you can use their service in the most efficient and legal manner.)</p>
<p>2) This code works FOR ME as of the day I posted it, under very limited testing.  It may not work if the services change how they display their results.  It may not work if you encounter an unusual listing.  I do NOT offer any guarantees of any sort as to how it will work for you, or that it will work for you at all.  I will also add that I&#8217;ve been messing with Perl for all of a month or two and I am a slow learner, so you may see better ways to do things in the code &#8211; I don&#8217;t know about the original author and his code, but I assure you that I will NOT be offended by any suggestions for improvement to the parts I wrote (or modified).  Note that I may fix bugs in this routine or add additional services if I find them, but don&#8217;t use this routine in any situation where it could cost you money if it doesn&#8217;t work, without doing your own testing. THERE IS NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, ON THIS ROUTINE.</p>
<p>By downloading and/or using the modified calleridname.agi routine, you agree that you have read and will observe the above-mentioned caveats.  It will be available for download for a limited time at <a href="http://michigantelephone.mi.org/modifiedcalleridname.zip">this location</a>. Ward, feel free to move it to your site and change the link (assuming the original author has no objections).</p>
<p>One thing I do NOT do here, but that probably should be done in any commercial operation, is to cache the results of a lookup for a period of time (say one week) so you don&#8217;t make repeated requests to get the same data.  I&#8217;m afraid I don&#8217;t know Perl well enough to do that, but if anyone does, please feel free to add it in. And one final note, this routine is intended for use primarily in the U.S. and Canada, but in searching for alternative reverse-lookup sites I did stumble across <a href="http://www.voip-info.org/wiki/view/Reverse+Lookup+in+Germany">this page</a>, which may be of interest to anyone in Germany (or that wants to get German caller ID information).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: TBB		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1466</link>

		<dc:creator><![CDATA[TBB]]></dc:creator>
		<pubDate>Fri, 05 May 2006 05:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1466</guid>

					<description><![CDATA[Changed the calleridname.agi  - to work with SugarCrm.
(its customized to work for europeans - so no NPA-NPX-STATION ...)
It uses contacts and accounts db - and pulls out - Firstname,Lastname from contacts and name (companyname) from accounts.

Enter: $Sugarcrm=&#039;1&#039;; under $Asteridex

## i also remarked the lines below:
#if(substr($callerid,0,1) eq &#039;1&#039;){
#$callerid=substr($callerid,1);
#}

#if(substr($callerid,0,2) eq &#039;+1&#039;){
#$callerid=substr($callerid,2);
#}

#$calleridfull =~ s/[,&quot;&#039;]+/ /g;

###### now the real stuff ###

create the following section:
##

sub sugarcrm_lookup {
my $callerid = shift @_;
my $dbh = DBI-&gt;connect(&quot;dbi:mysql:sugarcrm&quot;,&quot;root&quot;,&quot;passw0rd&quot;) or die(&quot;Connect failed&quot;);
#my $sql = &quot;select * from contacts where phone_work = &#039;$callerid&#039;&quot;;
#return $sql;
# [contacts.id -&gt; accounts_contacts.contact_id] mit [accounts_contacts.account_id-&gt;accounts.id] get [accounts.name]
#my $sth = $dbh-&gt;prepare(&quot;select * from contacts where phone_work = &#039;$callerid&#039; OR phone_home = &#039;$callerid&#039; OR phone_mobile = &#039;$callerid&#039; OR phone_other = &#039;$callerid&#039;&quot;) or die(&quot;Prepare failed.&quot;);
my $sth = $dbh-&gt;prepare(&quot;   SELECT c.first_name,c.last_name, if(a.name IS NULL,&quot;unknown&quot;,a.name) AS &quot;company&quot;
                            FROM contacts c
                            LEFT JOIN accounts_contacts ac ON ac.contact_id=c.id
                            LEFT JOIN accounts a ON a.id=ac.account_id
                            WHERE c.phone_work like &#039;$callerid&#039; OR c.phone_home like &#039;$callerid&#039;
                            OR c.phone_mobile like &#039;$callerid&#039; OR c.phone_other like &#039;$callerid&#039;&quot;)
                            or return &quot;FAILED&quot;;
$sth-&gt;execute;
if($sth-&gt;rows == 0)
{
        $dbh-&gt;disconnect;
        return &quot;null&quot;;
}
else
{
 my $resptr =  $sth-&gt;fetchrow_hashref();
 my $clidname = $resptr-&gt;{&quot;first_name&quot;}.&quot; &quot;.$resptr-&gt;{&quot;last_name&quot;}.&quot; @&quot;.$resptr-&gt;{&quot;company&quot;};
 $dbh-&gt;disconnect;
# $clidname = trim ($clidname);
 return $clidname;
}

$dbh-&gt;disconnect;
return &quot;disconnect&quot;;
}

## 

have fun!

&lt;i&gt;[WM: Fantastic! Can&#039;t wait to try it. Thanks for sharing it with all of us!]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>Changed the calleridname.agi  &#8211; to work with SugarCrm.<br />
(its customized to work for europeans &#8211; so no NPA-NPX-STATION &#8230;)<br />
It uses contacts and accounts db &#8211; and pulls out &#8211; Firstname,Lastname from contacts and name (companyname) from accounts.</p>
<p>Enter: $Sugarcrm=&#8217;1&#8242;; under $Asteridex</p>
<p>## i also remarked the lines below:<br />
#if(substr($callerid,0,1) eq &#8216;1&#8217;){<br />
#$callerid=substr($callerid,1);<br />
#}</p>
<p>#if(substr($callerid,0,2) eq &#8216;+1&#8217;){<br />
#$callerid=substr($callerid,2);<br />
#}</p>
<p>#$calleridfull =~ s/[,"&#8216;]+/ /g;</p>
<p>###### now the real stuff ###</p>
<p>create the following section:<br />
##</p>
<p>sub sugarcrm_lookup {<br />
my $callerid = shift @_;<br />
my $dbh = DBI->connect("dbi:mysql:sugarcrm","root","passw0rd") or die("Connect failed");<br />
#my $sql = "select * from contacts where phone_work = &#8216;$callerid'";<br />
#return $sql;<br />
# [contacts.id -> accounts_contacts.contact_id] mit [accounts_contacts.account_id->accounts.id] get [accounts.name]<br />
#my $sth = $dbh->prepare("select * from contacts where phone_work = &#8216;$callerid&#8217; OR phone_home = &#8216;$callerid&#8217; OR phone_mobile = &#8216;$callerid&#8217; OR phone_other = &#8216;$callerid'") or die("Prepare failed.");<br />
my $sth = $dbh->prepare("   SELECT c.first_name,c.last_name, if(a.name IS NULL,"unknown",a.name) AS "company"<br />
                            FROM contacts c<br />
                            LEFT JOIN accounts_contacts ac ON ac.contact_id=c.id<br />
                            LEFT JOIN accounts a ON a.id=ac.account_id<br />
                            WHERE c.phone_work like &#8216;$callerid&#8217; OR c.phone_home like &#8216;$callerid&#8217;<br />
                            OR c.phone_mobile like &#8216;$callerid&#8217; OR c.phone_other like &#8216;$callerid'")<br />
                            or return "FAILED";<br />
$sth->execute;<br />
if($sth->rows == 0)<br />
{<br />
        $dbh->disconnect;<br />
        return "null";<br />
}<br />
else<br />
{<br />
 my $resptr =  $sth->fetchrow_hashref();<br />
 my $clidname = $resptr->{"first_name"}." ".$resptr->{"last_name"}." @".$resptr->{"company"};<br />
 $dbh->disconnect;<br />
# $clidname = trim ($clidname);<br />
 return $clidname;<br />
}</p>
<p>$dbh->disconnect;<br />
return "disconnect";<br />
}</p>
<p>## </p>
<p>have fun!</p>
<p><i>[WM: Fantastic! Can&#8217;t wait to try it. Thanks for sharing it with all of us!]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: fuzzmania		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1445</link>

		<dc:creator><![CDATA[fuzzmania]]></dc:creator>
		<pubDate>Fri, 28 Apr 2006 02:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1445</guid>

					<description><![CDATA[Don&#039;t know what u can do with it but this site has a complete list of NPA-NXX
http://members.dandy.net/~czg/lca_index.php

and does anyone know if there&#039;s a way to lookup canadian phone numbers, google and att only have a US database. i&#039;m looking for a canadian database as well. thanks

&lt;i&gt;[WM: Can&#039;t help much on Canadian phone numbers. As for NPA-NXX, we already have converted the data to MySQL in preparation for our upcoming article. Anyone that wants to get a head start and roll your own is welcome to use the database. You can download it from here: &lt;a href=&quot;http://nerdvittles.com/wp-content/npanxx.zip&quot;&gt;npanxx.zip&lt;/a&gt;. Just share your work here and save us all a little time.&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t know what u can do with it but this site has a complete list of NPA-NXX<br />
<a href="http://members.dandy.net/~czg/lca_index.php" rel="nofollow ugc">http://members.dandy.net/~czg/lca_index.php</a></p>
<p>and does anyone know if there&#8217;s a way to lookup canadian phone numbers, google and att only have a US database. i&#8217;m looking for a canadian database as well. thanks</p>
<p><i>[WM: Can&#8217;t help much on Canadian phone numbers. As for NPA-NXX, we already have converted the data to MySQL in preparation for our upcoming article. Anyone that wants to get a head start and roll your own is welcome to use the database. You can download it from here: <a href="http://nerdvittles.com/wp-content/npanxx.zip">npanxx.zip</a>. Just share your work here and save us all a little time.</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Paul		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1439</link>

		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Thu, 27 Apr 2006 13:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1439</guid>

					<description><![CDATA[How would I go about creating my own cid system instead of looking at google or fonetastic.us or something?  Is there a simple way to create my own lookup for all NPA NXX so that if the internet was down I could still query the database locally?  I know there is asteridex but I can not get it to match NPA-NXX only.  There may be a simple way to do this that I am missing.  I was thinking more like the fonetastic.us system you created in the post #5 above.  If anyone knows where I can import a complete list of NPA-NXX with city, state that would be helpful as well.  Any recommendations or suggestions would be greatly appreciated.

&lt;i&gt;[WM: It&#039;s already on my TO-DO list. So hang in there until we get past our move, and we&#039;ll cover it with an NPA-NXX database as well.]&lt;/i&gt;]]></description>
			<content:encoded><![CDATA[<p>How would I go about creating my own cid system instead of looking at google or fonetastic.us or something?  Is there a simple way to create my own lookup for all NPA NXX so that if the internet was down I could still query the database locally?  I know there is asteridex but I can not get it to match NPA-NXX only.  There may be a simple way to do this that I am missing.  I was thinking more like the fonetastic.us system you created in the post #5 above.  If anyone knows where I can import a complete list of NPA-NXX with city, state that would be helpful as well.  Any recommendations or suggestions would be greatly appreciated.</p>
<p><i>[WM: It&#8217;s already on my TO-DO list. So hang in there until we get past our move, and we&#8217;ll cover it with an NPA-NXX database as well.]</i></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: terchris		</title>
		<link>https://nerdvittles.com/putting-real-names-back-in-callerid-3-quick-perl-solutions-for-asterisk/comment-page-1/#comment-1363</link>

		<dc:creator><![CDATA[terchris]]></dc:creator>
		<pubDate>Mon, 10 Apr 2006 09:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://nerdvittles.com/?p=82#comment-1363</guid>

					<description><![CDATA[re: callerid lookup in sugarcrm
I&#039;m about to create this functionality:
1. callerid lookup in sugarcrm
2. when the call is picked up the following will take place:
a) a Call record will be created on the customer
b) subject for the call &quot;automatic call logging&quot;
c) when the call is ended the duration of the call will be calculeted
d) the user that talked to the caller will be assigned the call &quot;Assigned to&quot; field in sugarcrm

Anyone thinking the same as me ?]]></description>
			<content:encoded><![CDATA[<p>re: callerid lookup in sugarcrm<br />
I&#8217;m about to create this functionality:<br />
1. callerid lookup in sugarcrm<br />
2. when the call is picked up the following will take place:<br />
a) a Call record will be created on the customer<br />
b) subject for the call "automatic call logging"<br />
c) when the call is ended the duration of the call will be calculeted<br />
d) the user that talked to the caller will be assigned the call "Assigned to" field in sugarcrm</p>
<p>Anyone thinking the same as me ?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
