<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mikedaddy.commikedaddy.com</title>
	<atom:link href="http://www.mikedaddy.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mikedaddy.com</link>
	<description>A blog about life, linux, networking, photography, and Perl</description>
	<lastBuildDate>Thu, 17 May 2012 05:42:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>LeatherCraft 1539 18 Multi-Compartment Tool Carrier</title>
		<link>http://www.mikedaddy.com/2012/05/new-tool-bag.html</link>
		<comments>http://www.mikedaddy.com/2012/05/new-tool-bag.html#comments</comments>
		<pubDate>Sun, 06 May 2012 16:10:42 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Blabber]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[analog lines]]></category>
		<category><![CDATA[cabling]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[phones]]></category>
		<category><![CDATA[t1]]></category>
		<category><![CDATA[toolbag]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=722</guid>
		<description><![CDATA[I&#8217;m constantly struggling with keeping my network tool bag organized. It&#8217;s great after I organize it, but one job needs to be done and it&#8217;s completely disorganized again. I have a ton of tools, carry everything I need to install network cabling, turn up T1 lines, troubleshoot analog lines, I can even do basic electrical&#8230; <a href="http://www.mikedaddy.com/2012/05/new-tool-bag.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe style="width: 120px; height: 240px; float: right;" src="http://rcm.amazon.com/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=mikedaddycom-20&amp;o=1&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=B000EDTSZG" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="320" height="240"></iframe></p>
<p>I&#8217;m constantly struggling with keeping my network tool bag organized. It&#8217;s great after I organize it, but one job needs to be done and it&#8217;s completely disorganized again.</p>
<p>I have a ton of tools, carry everything I need to install network cabling, turn up T1 lines, troubleshoot analog lines, I can even do basic electrical work with what&#8217;s in my bag. It&#8217;s exploding with stuff, since I carry everything I could possibly need. </p>
<p>So I&#8217;ve been looking into a new bag. </p>
<p>The one I&#8217;m probably going to settle on is: <a href="http://www.amazon.com/gp/product/B000EDTSZG/ref=as_li_ss_tl?ie=UTF8&amp;tag=mikedaddycom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000EDTSZG">Custom LeatherCraft 1539 18 Multi-Compartment Tool Carrier</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=mikedaddycom-20&amp;l=as2&amp;o=1&amp;a=B000EDTSZG" alt="" width="1" height="1" border="0" />. It looks like it&#8217;ll do the trick. My current bag is a &#8220;bucketmouth&#8221; type bag, so there&#8217;s not really much organization, it&#8217;s so full of stuff I can&#8217;t zip it, so maybe this one will be great!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2012/05/new-tool-bag.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T-Mobile &#8211; Outrageous Roaming Charges</title>
		<link>http://www.mikedaddy.com/2012/04/t-mobile-outrageous-roaming-charges.html</link>
		<comments>http://www.mikedaddy.com/2012/04/t-mobile-outrageous-roaming-charges.html#comments</comments>
		<pubDate>Fri, 27 Apr 2012 18:06:35 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Blabber]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Ranting]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[roaming charges]]></category>
		<category><![CDATA[suck]]></category>
		<category><![CDATA[T-Mobile]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=719</guid>
		<description><![CDATA[Come on T-Mobile! $38 for 2.5 megabytes??? Seriously. My contract is up. Guess its time to make a change!]]></description>
			<content:encoded><![CDATA[<p>Come on T-Mobile! $38 for 2.5 megabytes??? Seriously. My contract is up. Guess its time to make a change!</p>
<p><img src="https://s3.amazonaws.com/BlogShare/TmobileWTF.JPG" alt="T-Mobile Roaming Sucks" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2012/04/t-mobile-outrageous-roaming-charges.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kamailio &#8211; Changing the From URI for Level3</title>
		<link>http://www.mikedaddy.com/2012/04/kamailio-changing-the-from-uri-for-level3.html</link>
		<comments>http://www.mikedaddy.com/2012/04/kamailio-changing-the-from-uri-for-level3.html#comments</comments>
		<pubDate>Tue, 10 Apr 2012 15:55:43 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=714</guid>
		<description><![CDATA[So Level3 uses the E.164 recommendation for sending caller information. The problem with this is that they send a + prefix to the phone number. The problem with sending the + in the caller number, is that a common desk phone (Polycom/Cisco/Yealink/Aastra) will try to make an IP call to the number, or just fail.&#8230; <a href="http://www.mikedaddy.com/2012/04/kamailio-changing-the-from-uri-for-level3.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So Level3 uses the <a href="http://en.wikipedia.org/wiki/E.164" title="E.164">E.164</a> recommendation for sending caller information. The problem with this is that they send a + prefix to the phone number. The problem with sending the + in the caller number, is that a common desk phone (Polycom/Cisco/Yealink/Aastra) will try to make an IP call to the number, or just fail. It seems like only cell phones handle the + character in a number.</p>
<p>So to keep that plus out of the network, I added the following code to my kamailio.cfg to &#8220;filter&#8221; out the + before sending to the caller.</p>
<pre class="brush: php; ">

$avp(s:from)=$fu;
$avp(s:from) = $(fu{re.subst,/\+1//g});
  if ($(avp(s:from){s.len}) == 0) { $avp(s:from)  = $fu; }
uac_replace_from(&quot;$avp(s:from)&quot;);
</pre>
<p>Maybe there is a better way, but this is working in production. Let me know if anyone has a better method!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2012/04/kamailio-changing-the-from-uri-for-level3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco OIP &#8211; Registering deals can suck</title>
		<link>http://www.mikedaddy.com/2011/11/cisco-oip-registering-deals-can-suck.html</link>
		<comments>http://www.mikedaddy.com/2011/11/cisco-oip-registering-deals-can-suck.html#comments</comments>
		<pubDate>Fri, 18 Nov 2011 17:00:09 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ranting]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[Cisco OIP]]></category>
		<category><![CDATA[Economic Growth]]></category>
		<category><![CDATA[Registered Partner]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=707</guid>
		<description><![CDATA[Sometimes the Cisco OIP program can be a pain in the ass! Another partner registers the deal. You are awarded the business, taking less margin than the behemoth vendor in town, to get the deal. Now you&#8217;d like to increase your margins and you aren&#8217;t able to get the best pricing because behemoth vendor has&#8230; <a href="http://www.mikedaddy.com/2011/11/cisco-oip-registering-deals-can-suck.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes the Cisco OIP program can be a pain in the ass!</p>
<p>Another partner registers the deal. You are awarded the business, taking less margin than the behemoth vendor in town, to get the deal. Now you&#8217;d like to increase your margins and you aren&#8217;t able to get the best pricing because behemoth vendor has protected pricing.</p>
<p>Kinda makes for an unfair advantage, and prohibits Cisco&#8217;s other partners from growing their business. Keeping the big guy in town big and the small guys small.</p>
<p>My suggestion, OIP Rebate program. When the deal is registered by someone else, but I am awarded the business. I should get that OIP discount as a rebate check.</p>
<p>Come on Cisco! Help your partners grow! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/11/cisco-oip-registering-deals-can-suck.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new ExpertsExchange is coming in 2012!</title>
		<link>http://www.mikedaddy.com/2011/11/the-new-expertsexchange-is-coming-in-2012.html</link>
		<comments>http://www.mikedaddy.com/2011/11/the-new-expertsexchange-is-coming-in-2012.html#comments</comments>
		<pubDate>Tue, 08 Nov 2011 20:42:56 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Blabber]]></category>
		<category><![CDATA[Gear]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[EE v.10]]></category>
		<category><![CDATA[ExpertsExchange]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=702</guid>
		<description><![CDATA[ExpertsExchange has a complete redesign! Looks great guys! Can&#8217;t wait.]]></description>
			<content:encoded><![CDATA[<p>ExpertsExchange has a complete redesign! Looks great guys! Can&#8217;t wait.<br />
<a href="http://beta.experts-exchange.com" title="Check out the New Experts Exchange" style="border:0;display:block;width:200px;height:50px;padding:0;margin:0;"><br />
<img src="http://c746246.r46.cf2.rackcdn.com/eebeta-badge-small.png" alt="Small Experts Exchange VIP Badge" style="border:0;" width="200" height="50" /><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/11/the-new-expertsexchange-is-coming-in-2012.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Microsoft/Android war: Which patents are at stake?</title>
		<link>http://www.mikedaddy.com/2011/10/the-microsoftandroid-war-which-patents-are-at-stake.html</link>
		<comments>http://www.mikedaddy.com/2011/10/the-microsoftandroid-war-which-patents-are-at-stake.html#comments</comments>
		<pubDate>Thu, 27 Oct 2011 13:46:39 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ranting]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[lawsuit]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[patent]]></category>
		<category><![CDATA[patent war]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=700</guid>
		<description><![CDATA[Good article over at Network World about Patents Microsoft has claimed to hold. I&#8217;ve blogged about the silliness of patents like this in the past. People at the patent offices must be not tech savvy. I would NEVER have let such vague patents be allowed through. Check some of them out: The Microsoft/Android war: Which&#8230; <a href="http://www.mikedaddy.com/2011/10/the-microsoftandroid-war-which-patents-are-at-stake.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Good article over at Network World about Patents Microsoft has claimed to hold. I&#8217;ve blogged about the silliness of patents like this in the past. People at the patent offices must be not tech savvy. I would NEVER have let such vague patents be allowed through.</p>
<p>Check some of them out: <a href="http://www.networkworld.com/news/2011/070611-microsoft-android.html">The Microsoft/Android war: Which patents are at stake?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/10/the-microsoftandroid-war-which-patents-are-at-stake.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get an array of months in perl</title>
		<link>http://www.mikedaddy.com/2011/10/get-an-array-of-months-in-perl.html</link>
		<comments>http://www.mikedaddy.com/2011/10/get-an-array-of-months-in-perl.html#comments</comments>
		<pubDate>Tue, 04 Oct 2011 15:46:08 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Date::Format]]></category>
		<category><![CDATA[HTML::Mason]]></category>
		<category><![CDATA[Month]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Time::Local]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=692</guid>
		<description><![CDATA[I had a need to build an array of months between a set month and the current month. My purpose was to let the user choose a month to build a report for. I&#8217;m using HTML::Mason, but you get the idea. You&#8217;ll need Date::Manip::Recur &#60;select name=&#34;months&#34; id=&#34;months&#34;&#62; % # Loop through the date objects %&#8230; <a href="http://www.mikedaddy.com/2011/10/get-an-array-of-months-in-perl.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a need to build an array of months between a set month and the current month. My purpose was to let the user choose a month to build a report for.</p>
<p>I&#8217;m using HTML::Mason, but you get the idea.</p>
<p>You&#8217;ll need <a title="Date::Manip::Recur" href="http://search.cpan.org/~sbeck/Date-Manip-6.25/lib/Date/Manip/Recur.pod">Date::Manip::Recur</a></p>
<pre class="brush: perl; ">

&lt;select name=&quot;months&quot; id=&quot;months&quot;&gt;
% # Loop through the date objects
% for (@dates) {
%   # Assign the current month value to a scalar.
%   my $curMonth = $_-&gt;value();
%   # I only cared to see YYYYMM so I regex&#039;d it.
%   $curMonth =~ s/^(\d{4})(\d{2}).*$/$1$2/;
      &lt;option value=&quot;&lt;% $curMonth %&gt;&quot;&gt;&lt;% parseMonth($curMonth) %&gt;&lt;/option&gt;
% }
&lt;/select&gt;

&lt;%init&gt;
# Returns a date like &quot;2011-01-01&quot;
my $monStart = getOldestEntry($account);

use Date::Manip::Recur;
  my $recur = new Date::Manip::Recur;
  # Parse out the first of the month for every month since start until today.
  my $err = $recur-&gt;parse(&#039;0:0*0:0:0:0:0&#039;,$monStart,$monStart,&quot;Today&quot;);
  # Return an array object of dates
  my @dates = $recur-&gt;dates();

sub parseMonth {
use Time::Local;
use Date::Format;
  my $md = shift;

  # Match on YYYYMM
  $date =~ m/^(\d{4})(\d{2})/;
  my $year = $1; my $mon = $2;

  # Convert to epoch
  my $time = timelocal(0,0,0,1,$mon-1,$year);

# Return back (%B %Y) as &quot;August 2010&quot;
return(time2str(&quot;%B %Y&quot;, $time));
}
&lt;/%init&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/10/get-an-array-of-months-in-perl.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ryobi s430 4-Stroke leaky gas cap.</title>
		<link>http://www.mikedaddy.com/2011/10/ryobi-s430-4-stroke-leaky-gas-cap.html</link>
		<comments>http://www.mikedaddy.com/2011/10/ryobi-s430-4-stroke-leaky-gas-cap.html#comments</comments>
		<pubDate>Sun, 02 Oct 2011 16:58:06 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Blabber]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[4-stroke]]></category>
		<category><![CDATA[crap]]></category>
		<category><![CDATA[leaky gas cap]]></category>
		<category><![CDATA[Ryobi]]></category>
		<category><![CDATA[Ryobi S430]]></category>
		<category><![CDATA[weedeater]]></category>
		<category><![CDATA[weeds]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=687</guid>
		<description><![CDATA[My 4-Stroke Ryobi S430 Weed Trimmer has been great, I&#8217;ve not had problems like others have had with their, except it leaks gas on my right arm my from the fuel cap breather while I&#8217;m weed eating. I haven&#8217;t hung it up in my garage because when I do, it constantly drips fuel out. I&#8217;m&#8230; <a href="http://www.mikedaddy.com/2011/10/ryobi-s430-4-stroke-leaky-gas-cap.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My 4-Stroke Ryobi S430 Weed Trimmer has been great, I&#8217;ve not had problems like others have had with their, except it leaks gas on my right arm my from the fuel cap breather while I&#8217;m weed eating.</p>
<p>I haven&#8217;t hung it up in my garage because when I do, it constantly drips fuel out. I&#8217;m about to see if I can find a non-vented cap for storage, so I can hang it up without leaking. I know it needs the breather to run. I kinda wish I spent more money for a better built unit.</p>
<p>Any ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/10/ryobi-s430-4-stroke-leaky-gas-cap.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Amazon Silk</title>
		<link>http://www.mikedaddy.com/2011/09/introducing-amazon-silk.html</link>
		<comments>http://www.mikedaddy.com/2011/09/introducing-amazon-silk.html#comments</comments>
		<pubDate>Thu, 29 Sep 2011 13:39:37 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Gear]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[silk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=655</guid>
		<description><![CDATA[Amazon just released a video with their new idea on web browsing. They&#8217;re going to implement it with the new Kindle Fire edition. It sounds pretty cool, but what about privacy? Amazon filtering your internets?? Related articles Is Amazon&#8217;s Silk browser a copyright pirate? (csmonitor.com) Amazon Silk browser is the ultimate cache converter (techradar.com)]]></description>
			<content:encoded><![CDATA[<p>Amazon just released a video with their new idea on web browsing. They&#8217;re going to implement it with the new Kindle Fire edition. It sounds pretty cool, but what about privacy? Amazon filtering your internets??</p>
<span style="text-align:center; display: block;"><a href="http://www.mikedaddy.com/2011/09/introducing-amazon-silk.html"><img src="http://img.youtube.com/vi/_u7F_56WhHk/2.jpg" alt="" /></a></span>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.csmonitor.com/Business/Mises-Economics-Blog/2011/0929/Is-Amazon-s-Silk-browser-a-copyright-pirate" target="_blank">Is Amazon&#8217;s Silk browser a copyright pirate?</a> (csmonitor.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.techradar.com/news/mobile-computing/tablets/amazon-silk-browser-is-the-ultimate-cache-converter-1030112?src=rss&amp;attr=all" target="_blank">Amazon Silk browser is the ultimate cache converter</a> (techradar.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/pixy.gif?x-id=9e828318-408a-4a2e-b83c-c887b530bece" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/09/introducing-amazon-silk.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trixbox Polycom Directory of all extensions for IP650</title>
		<link>http://www.mikedaddy.com/2011/09/trixbox-polycom-directory-of-all-extensions-for-ip650.html</link>
		<comments>http://www.mikedaddy.com/2011/09/trixbox-polycom-directory-of-all-extensions-for-ip650.html#comments</comments>
		<pubDate>Tue, 27 Sep 2011 15:08:37 +0000</pubDate>
		<dc:creator>mikedaddy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[phone directory]]></category>
		<category><![CDATA[Polycom]]></category>
		<category><![CDATA[polycom 650]]></category>
		<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://www.mikedaddy.com/?p=650</guid>
		<description><![CDATA[I needed to quickly generate a full directory for a receptionist console. Since Trixbox doesn&#8217;t do this, I wrote some Perl to do so. It&#8217;s pretty simple, you will need to install Polycom::Contact::Directory from CPAN. It will connect to the localhost MySQL server and pull all extensions out, make an xml and save it to&#8230; <a href="http://www.mikedaddy.com/2011/09/trixbox-polycom-directory-of-all-extensions-for-ip650.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed to quickly generate a full directory for a receptionist console. Since Trixbox doesn&#8217;t do this, I wrote some Perl to do so. It&#8217;s pretty simple, you will need to install <strong>Polycom::Contact::Directory</strong> from <a class="zem_slink" title="CPAN" href="http://www.cpan.org" rel="homepage" target="_blank">CPAN</a>. It will connect to the localhost MySQL server and pull all extensions out, make an xml and save it to the appropriate path. You will need to supply the MAC address, I guess I could modify a bit to pull the MAC out of the Endpoint Manager table, but I like being able to just supply the MAC.</p>
<p>Thanks <a title="Zachary Blair At CPAN" href="http://search.cpan.org/~zblair/" target="_blank">Zachary Blair</a> for the easy module!</p>
<pre class="brush: perl; ">

#!/usr/bin/perl -w
# Quick script to hack out a directory for a mac address. I use it for the
# receptionist&#039;s BLF on her IP650 with sidecars.
use strict;
use Polycom::Contact::Directory;
use DBI;

# Grab the MAC address from ARGV and make a file
my $mac = $ARGV[0] or die &quot;No MAC Specified\n&quot;;
my $contactFile = &quot;/tftpboot/polycom/contacts/$mac-directory.xml&quot;;

# Create a new Empty Directory
my $dir = Polycom::Contact::Directory-&gt;new();
# Connect to the trixbox MySQL DB
my $dbh = DBI-&gt;connect(&#039;dbi:mysql:asterisk:localhost:3306&#039;,&#039;root&#039;,&#039;passw0rd&#039;,{ RaiseError =&gt; 1});

# Pull an array ref for the extensions
my $userAry = $dbh-&gt;selectall_arrayref(&quot;SELECT extension,name FROM users ORDER BY extension&quot;);

$dbh-&gt;disconnect();

# Set counter for speed dial index
my $x = 1;

# Loop through extensions
for my $a (@$userAry) {
# Split the trixbox name into first and last.
my ($fn,$ln) = split(/\s+/,$a-&gt;[1],2);

# My contacts are generally dirty, I&#039;ll make them look better. Some people may want
# to comment this out if you have people with unique capitalization.
$fn = ucfirst(lc($fn));
$ln = ucfirst(lc($ln));

# Insert the record into the object.
# I like the labels to be: extension firstname lastname &quot;3721 Awesome Dude&quot;
#  -- buddy_watching lets the polycom monitor BLF status. For this to work,
#     you must have feature.1.name=&quot;presence&quot; feature.1.enabled=&quot;1&quot; in
#     /tftpboot/sip.cfg
#  -- Check Polycom::Contact Documentation for Options
$dir-&gt;insert(
{   first_name =&gt; $fn,                  # &lt;fn&gt; in xml
last_name  =&gt; $ln,                  # &lt;ln&gt; in xml
contact    =&gt; &quot;$a-&gt;[0]&quot;,            # &lt;ct&gt; in xml
label      =&gt; &quot;$a-&gt;[0] $fn $ln&quot;,    # &lt;lb&gt; in xml
buddy_watching =&gt; 1,                # &lt;bw&gt; in xml
speed_index =&gt; $x,                  # &lt;sd&gt; in xml
buddy_block =&gt; 0,                   # &lt;bb&gt; in xml
auto_divert =&gt; 0,                   # &lt;ad&gt; in xml
auto_reject =&gt; 0,                   # &lt;ar&gt; in xml

},
);
$x++;
}

# Save the contact file.
$dir-&gt;save($contactFile);

1;
</pre>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/pixy.gif?x-id=ed89effd-be9a-4757-a6b1-378861931d58" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedaddy.com/2011/09/trixbox-polycom-directory-of-all-extensions-for-ip650.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

