<?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>Voip Phreak &#187; FreePBX Multi-Language Directory keeps playing &#8220;dir_intro&#8221; in English instead of your chosen language? Quick Hack to fix it!</title>
	<atom:link href="http://www.voipphreak.ca/category/howtos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.voipphreak.ca</link>
	<description>Cool sh!t about Asterisk, VOIP, XMPP 'n stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 11:57:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>FreePBX Multi-Language Directory keeps playing &#8220;dir_intro&#8221; in English instead of your chosen language? Quick Hack to fix it!</title>
		<link>http://www.voipphreak.ca/2009/01/13/freepbx-multi-language-directory-keeps-playing-dir_intro-in-english-instead-of-your-chosen-language-quick-hack-to-fix-it/</link>
		<comments>http://www.voipphreak.ca/2009/01/13/freepbx-multi-language-directory-keeps-playing-dir_intro-in-english-instead-of-your-chosen-language-quick-hack-to-fix-it/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 06:26:35 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Asterisk 1.4]]></category>
		<category><![CDATA[FreePBX]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Instructions]]></category>
		<category><![CDATA[Multi-Language]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/?p=992</guid>
		<description><![CDATA[Tonight we were debugging a customers PBX system for them because of what seemed like a really simple issue with their company directory. As they are located in a bi-lingual area they wanted to have english and french menus available to them. They use a combination of Asterisk 1.4 and FreePBX 2.5.

With this software they already had the Languages module available to them, so they were able to create one main IVR, and then several branching IVR's dependant on the language that was selected.

In this case, English and French. So, that's all well and good, then we noticed that when you dial the company directory from the French menu, the prompt for the instructions (and only that prompt) is always played in english, instead of our desired language of french. This is really weird. So, we debugged it a little bit and found this in the logs:]]></description>
			<content:encoded><![CDATA[<p>Tonight we were debugging a customers PBX system for them because of what seemed like a really simple issue with their company directory. As they are located in a bi-lingual area they wanted to have english and french menus available to them. They use a combination of Asterisk 1.4 and FreePBX 2.5.</p>
<p>With this software they already had the Languages module available to them, so they were able to create one main IVR, and then several branching IVR's dependant on the language that was selected.</p>
<p>In this case, English and French. So, that's all well and good, then we noticed that when you dial the company directory from the French menu, the prompt for the instructions (and only that prompt) is always played in english, instead of our desired language of french. This is really weird. So, we debugged it a little bit and found this in the logs:</p>
<blockquote><p><span style="color: #888888;">-- Executing [3@app-languages:2] Set("DAHDI/1-1", "CHANNEL(language)=fr") in new stack<br />
-- &lt;DAHDI/1-1&gt; Playing 'dir-intro-oper' (language 'fr')<br />
directory|default|from-did-direct|lo: -- Playing 'dir-instr' (language 'en')</span></p></blockquote>
<p>Hmm, that's weird - it says it's playing it in french, but it's playing it in english that first time. Then it goes on to correctly say that it's playing the english soundfile, not the french one. Hm, even weirder. So, maybe it's permissions.</p>
<p>We checked the permissions in /var/lib/asterisk/sounds and /var/lib/asterisk/sounds/fr and everything was correct. They were owned by the asterisk user and asterisk group, we don't run as root and neither should you. The permissions were rw-r-r so that was fine too. Hmmmf. So, now we began to search google. We found one post on the subject from the <a href="http://freepbx.org/trac/ticket/3286">freepbx bug tracker</a> where the user was basically told it was his problem, so, we thought it was our problem too and continued searching for another hour or two trying everything possible:</p>
<ul>
<li>Replaced the sound files a couple times, deleting in between</li>
<li>Re-did the permissions</li>
<li>Symlinked them to various directories</li>
<li>Added a hard coding of "fr/" to all soundfiles in the FreePBX AGI - Directory</li>
<li>Ensured we have support for en and fr enabled</li>
<li>Manually created the Directory with another Language and Misc Destination in FreePBX (complex!)</li>
<li>Asked on IRC</li>
</ul>
<p>Well, if you're reading this, none of that probably worked for you either. So, this is what we did - not sure how "right" it is, but it avoids this issue if you're trying to run your IVR with a company directory in english and french. It's pretty simple too.</p>
<p>First, login to your FreePBX interface.</p>
<p>Then click over to the Tools tab on the left.</p>
<p>Go to Custom Destinations, and Create a new one</p>
<blockquote><p>Custom Destination: <strong>from-internal-custom,s,1<br />
</strong>Name:<strong> French-Directory</strong></p></blockquote>
<p>Now press the submit button.</p>
<p>Now Flip over to the Setup Tab of FreePBX and go to your French IVR menu with the Directory in it.</p>
<p>Change the destination to go from the default (#) or whatever you have it set to, to instead go to your new Custom Destination (French-Directory)</p>
<p>Now you're done the setup in FreePBX.</p>
<p>SSH to your PBX system, and then edit the custom extensions file</p>
<blockquote><p># sudo nano /etc/asterisk/extensions_custom.conf</p></blockquote>
<p>Now Paste the following in there</p>
<blockquote><p>[from-internal-custom]<br />
exten =&gt; s,1,Answer<br />
exten =&gt; s,n,Wait(1)<br />
exten =&gt; s,n,Set(LANGUAGE()=fr)<br />
;exten =&gt; s,n,AGI(directory,${DIR-CONTEXT},from-did-direct,${DIRECTORY:0:1}${DIRECTORY_OPTS}o)<br />
exten =&gt; s,n,Directory(default|from-did-direct|lo)<br />
exten =&gt; s,n,Playback(vm-goodbye)<br />
exten =&gt; s,n,Hangup()<br />
exten =&gt; o,1,Goto(from-internal,${OPERATOR_XTN},1)</p></blockquote>
<p>Exit and save the file then reload asterisk.</p>
<blockquote><p># sudo asterisk -rx "reload"</p></blockquote>
<p>Now, you should test the calling into your menu to make sure the proper directory is working. Does for us. Comments are open if anyone has better suggestions, or a way to fix the directory agi that comes with FreePBX to properly support the instructions/intro being played in french (or any other language) instead of only english.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2009/01/13/freepbx-multi-language-directory-keeps-playing-dir_intro-in-english-instead-of-your-chosen-language-quick-hack-to-fix-it/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tutorial: Fixing Kayako&#8217;s broken SSL so Gmail can be used without STunnel.</title>
		<link>http://www.voipphreak.ca/2008/12/09/tutorial-fixing-kayakos-broken-ssl-so-gmail-can-be-used-without-stunnel/</link>
		<comments>http://www.voipphreak.ca/2008/12/09/tutorial-fixing-kayakos-broken-ssl-so-gmail-can-be-used-without-stunnel/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 03:14:23 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Kayako]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Stunnel]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/?p=933</guid>
		<description><![CDATA[A little while ago we posted an article on configuring STunnel to use with Kayako because SSL over POP3 with Google Mail/Google Applications wasn't working properly. Today we finally had some time to sit down and think about this and worked out a much better solution that doesn't require STunnel to be involved in the [...]]]></description>
			<content:encoded><![CDATA[<p>A little while ago we posted an article on <a href="http://www.voipphreak.ca/2008/06/19/using-ssl-pop3-google-appsgmail-with-kayako-supportsuite/">configuring STunnel to use with Kayako</a> because SSL over POP3 with Google Mail/Google Applications wasn't working properly. Today we finally had some time to sit down and think about this and worked out a much better solution that doesn't require <a href="http://www.stunnel.org/">STunnel</a> to be involved in the mix.</p>
<p>In the <a href="http://www.kayako.com/">Kayako</a> cron script, they have hard-set a “notls” option when trying to connect to the IMAP or POP3 email servers.  It seems when using the imap_open() function in PHP, you must only specify the “notls” option when you explicitly do NOT want any SSL encryption. Since <a href="http://www.kayako.com/">Kayako</a> is forcing the “notls” option on all connection strings, it was cancelling out the “ssl” option that’s enabled when you select pop3-ssl or imap-ssl in your <a href="http://www.kayako.com/">Kayako</a> configuration settings.</p>
<p>As you can see from this sample code here, <a href="http://www.kayako.com/">Kayako</a> is hard setting the “notls” option:</p>
<blockquote><p><strong>/modules/parser/cron_parser.php: </strong><br />
dbCore-&gt;Record4["port"] ."/". $fetchtype ."/notls}</p></blockquote>
<p>So, in order to make your <a href="http://www.kayako.com/">Kayako</a> installation work with Gmail or Google Apps you must go into the file and change the above into the following (simply remove the “/notls”):</p>
<blockquote><p><strong>/modules/parser/cron_parser.php: </strong><br />
dbCore-&gt;Record4["port"] ."/". $fetchtype ."}</p></blockquote>
<p>Now make sure you go in and modify your server settings for each support queue:</p>
<blockquote><p><strong>Pop server:</strong> pop.gmail.com<br />
<strong>POP Port:</strong> 995<br />
<strong>Queue Type:</strong> POP3-SSL</p></blockquote>
<p>Now, once you’ve made the changes to test your server, send a couple emails to each of your queues and hit the cron script from a web browser so you can see the debug output. This is done like this:</p>
<blockquote><p><strong>Testing your server:</strong><br />
<a href="http://support.yourserver.com/cron/index.php?_t=parser">http://support.yourserver.com/cron/index.php?_t=parser</a></p></blockquote>
<p>We’re not sure why this was hard coded in the original <a href="http://www.kayako.com/">Kayako</a> source, because you can’t use TLS when you specify legacy SSL for a connection, so in effect the “notls” option that was hard coded performed no function except to prevent SSL from ever working in the first place.</p>
<p>The preferred fix would be to use the “notls” option only for POP3 connections that do not require SSL or TLS, and to add an option to the interface to select “IMAP-TLS” and “POP3-TLS” along with the code required to specify “tls” to those connection types (which would force TLS negotiation). Hopefully <a href="http://www.kayako.com/">Kayako</a> is reading this and integrates it to their new release – the hardest part being the addition of the two extra user interface configuration options.</p>
<p>Download the <a href="http://www.voipphreak.ca/wp-content/uploads/2008/12/kayako_ssl.patch">Kayako SSL Patch</a> here if you'd prefer this over manually editing the file mentioned above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/12/09/tutorial-fixing-kayakos-broken-ssl-so-gmail-can-be-used-without-stunnel/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Provision your Cisco 79xx SIP Phone from Active Directory with these Auto Provisioning Scripts</title>
		<link>http://www.voipphreak.ca/2008/11/06/provision-your-cisco-79xx-sip-phone-from-active-directory-with-these-auto-provisioning-scripts/</link>
		<comments>http://www.voipphreak.ca/2008/11/06/provision-your-cisco-79xx-sip-phone-from-active-directory-with-these-auto-provisioning-scripts/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 21:00:10 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/11/06/provision-your-cisco-79xx-sip-phone-from-active-directory-with-these-auto-provisioning-scripts/</guid>
		<description><![CDATA[Our friend over at Dave.vc has released a new set of scripts for provisioning your Cisco phones from Active Directory. Visit Dave's site for more awesome tools like this. You can download the Cisco Provisioning scripts. Here's his tutorial, and provisioning scripts. Here are the scripts I use to automatically provision cisco phones via AD [...]]]></description>
			<content:encoded><![CDATA[<p>Our friend over at <a href="http://www.dave.vc/wordpress/?p=38">Dave.vc</a> has released a new set of scripts for <a href="http://www.dave.vc/wordpress/?p=38">provisioning your Cisco phones from Active Directory</a>.</p>
<p><a href="http://www.dave.vc/wordpress/">Visit Dave's site for more awesome tools like this.</a></p>
<p>You can download the <a href="http://www.voipphreak.ca/wp-content/uploads/2008/11/phoneadd.zip">Cisco Provisioning scripts</a>.</p>
<p>Here's his tutorial, and provisioning scripts.</p>
<blockquote><p>Here are the scripts I use to automatically provision cisco phones via AD information. The phone number (extension)  is taken from ADâ€™s â€˜phone numberâ€™ field and the mac address comes from ADâ€™s â€˜IP Phoneâ€™ field.</p>
<p>As with the reboot script below, these scripts require PHP to be installed and compiled with LDAP and CLI on the asterisk server. It is possible (obviously) to perform these tasks remotely (not on the asterisk server) but thatâ€™s outside the scope of this post.</p>
<p>The PHP script reads the template files and does simple string replacement as needed. If the user is brand new, it adds their voicemail account, picks a psuedo-random extension password and tells asterisk what their email address is for the voicemail-to-email setup. The email information will only be in AD if you put it there or are running an exchange server in the same forest (as in the example).</p>
<p>Itâ€™s useful to note that all of the extensions I use in this example setup are in the format of 3xx. We then have another extension of the format 4xx set up to auto-answer so that we can do paging and intercom. You may need to modify if you have more than 100 extensions.</p>
<p>In order to add the extension, we read the config template in the directory listed and perform string replacement:</p>
<blockquote><p>function add_extension($name,$extension,$secret,$email){</p>
<p>$template = file_get_contents(â€/etc/asterisk/phones/conf.templateâ€);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;mainextension&gt;&gt;&gt;â€,$extension,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;email&gt;&gt;&gt;â€,$email,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;fullname&gt;&gt;&gt;â€,$name,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;secret&gt;&gt;&gt;â€,$secret,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;pageextension&gt;&gt;&gt;â€,â€4?.substr($extension,1),$template);</p>
<p>file_put_contents(â€/etc/asterisk/phones/â€.$extension.â€.confâ€,$template);</p>
<p>}</p></blockquote>
<p>The XML config file creation/modification follows the same format:</p>
<blockquote><p>function provision_phone($name,$extension,$secret,$mac){</p>
<p>$template = file_get_contents(â€/tftpboot/SEPCONF.templateâ€);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;mainextension&gt;&gt;&gt;â€,$extension,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;email&gt;&gt;&gt;â€,$email,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;fullname&gt;&gt;&gt;â€,$name,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;secret&gt;&gt;&gt;â€,$secret,$template);</p>
<p>$template = str_replace(â€&lt;&lt;&lt;pageextension&gt;&gt;&gt;â€,â€4?.substr($extension,1),$template);</p>
<p>file_put_contents(â€/tftpboot/SEPâ€.$mac.â€.cnf.xmlâ€,$template);</p>
<p>}</p></blockquote>
<p>And finally we add the voicemail account:</p>
<blockquote><p>function add_voicemail($name,$extension,$email){</p>
<p>$template = file_get_contents(â€/etc/asterisk/voicemail.confâ€);</p>
<p>$template .= â€œ\nâ€.$extension.â€ =&gt; 1234,â€.$name.â€,â€.$email;</p>
<p>file_put_contents(â€/etc/asterisk/voicemail.confâ€,$template);</p>
<p>}</p></blockquote>
<p>These functions are really rather trivial but save a world of time when it comes to installing 75 new phones in one fell swoop â€” or even when youâ€™re attempting to maintain continuity between installations separated lots of time.</p>
<p>I attached the the script to this post as well as some screen shots and config templates (SEPCONF and EXTENCONF) to facilitate setting up your AD objects to allow for automatic phone provisioning.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/11/06/provision-your-cisco-79xx-sip-phone-from-active-directory-with-these-auto-provisioning-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Custom Themes with Trac 10.x. Beautify your Development and set yourself Apart.</title>
		<link>http://www.voipphreak.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/</link>
		<comments>http://www.voipphreak.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 21:37:25 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/</guid>
		<description><![CDATA[Ever wanted to install a new theme to your TRAC installation? Often we'll want our development environments to look a little different from every other trac site on the Internet. We'd never tried to change the theme before, so decided to write a small tutorial on how it's done for our archiving purposes, and for [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to install a new theme to your TRAC installation? Often we'll want our development environments to look a little different from every other trac site on the Internet. We'd never tried to change the theme before, so decided to write a small tutorial on how it's done for our archiving purposes, and for anyone else that wants to change their TRAC theme.</p>
<p>We're using Ubuntu Linux, and this tutorial assume you've already installed TRAC on a global basis to your development server.</p>
<p>So, lets get some themes installed on our Trac 10.x installation shall we?</p>
<p>First, install the pre-requisites if not already installed.</p>
<blockquote>
<p># apt-get install python2.5-setuptools</p>
</blockquote>
<p>We had to change a couple permissions as well so Trac and everything can read/write where it needs to</p>
<blockquote>
<p># chown -R www-data:www-data /var/www</p>
</blockquote>
<p>Now we had to install <a href="http://trac.edgewall.org/wiki/WebAdmin">WebAdmin for Trac 10.x</a>:</p>
<blockquote>
<p># svn export <a href="http://svn.edgewall.com/repos/trac/sandbox/webadmin/">http://svn.edgewall.com/repos/trac/sandbox/webadmin/</a><br />
# cd webadmin<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg</p>
</blockquote>
<p>Note that WebAdmin is included with Trac 11.x if you're bleeding edge, you probably don't need this.</p>
<p>Now we had to install <a href="http://trac-hacks.org/wiki/ThemeEnginePlugin">ThemeEnginePlugin</a> for Trac 10.x:</p>
<blockquote>
<p># svn checkout <a href="http://trac-hacks.org/svn/themeengineplugin">http://trac-hacks.org/svn/themeengineplugin</a><br />
# cd themeengineplugin<br />
# cd 0.10<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg</p>
</blockquote>
<p>Now, lets install some themes for Trac 10.x:</p>
<blockquote>
<p># svn checkout <a href="http://trac-hacks.org/svn/pydotorgtheme/">http://trac-hacks.org/svn/pydotorgtheme/</a><br />
# cd pydotorgtheme/0.10/<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg<br />
# cd ../../<br />
# svn checkout <a href="http://trac-hacks.org/svn/gamedevtheme/">http://trac-hacks.org/svn/gamedevtheme/</a><br />
# cd gamedevtheme/0.10<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg<br />
# cd ../../<br />
# svn checkout <a href="http://trac-hacks.org/svn/consultanttheme/">http://trac-hacks.org/svn/consultanttheme/</a><br />
# cd consultanttheme/0.10<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg<br />
# cd ../../</p>
</blockquote>
<p>Now we added the following to our Trac.ini within the project we want the themes to be used for:</p>
<blockquote>
<p># cd /var/local/trac/trac.yourdomain.com/conf/<br />
# nano trac.ini</p>
</blockquote>
<p>Add this to the components section of your configuration file</p>
<blockquote>
<p>[components]<br />
webadmin.* = enabled<br />
themeengine.* = enabled</p>
</blockquote>
<p>Then we restarted Apache and we were able to select themes to make available, and attach to our Trac Installation. Note that with each new theme added, you will have to restart Apache in our experience.</p>
<p>This should get you going with installing some themes for Trac on your Ubuntu Linux server. Have Fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tutorial on how to Install Apache, Subversion and Trac with Virtual Hosting suppor in Ubuntu Linux</title>
		<link>http://www.voipphreak.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/</link>
		<comments>http://www.voipphreak.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 21:22:06 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Local]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/</guid>
		<description><![CDATA[We recently had to setup Apache, Subversion and Trac all within a virtual hosting environment for one of our Clients to be able to develop easily and effictively among team members. They wanted to use multiple domain names for separate projects. Made sense to us, so we started looking for instructions on setting this up. [...]]]></description>
			<content:encoded><![CDATA[<p>We recently had to setup Apache, Subversion and Trac all within a virtual hosting environment for one of our Clients to be able to develop easily and effictively among team members. They wanted to use multiple domain names for separate projects. Made sense to us, so we started looking for instructions on setting this up.</p>
<p>We wanted to setup LigHTTPD, however it's not nearly as easy because of no svn-dav module available, so we stuck with Apache 2 for now.  </p>
<p>We found <a href="http://www.howtoforge.com/subversion-trac-virtual-hosts-on-ubuntu-server">a howto</a> on doing this, however there were a few vital steps and explanations missing so we've re-written it in hopes it will help others the trouble of searching to find this information.</p>
<p>So, lets move on to the tutorial shall we.</p>
<p>First install the required packages on your system. We started with a clean Ubuntu JEOS 8.0.4 Install on our server.</p>
<blockquote>
<p># sudo aptitude install enscript libapache2-mod-python python-docutils trac db4.3-util libapache2-svn subversion-tools</p>
</blockquote>
<p>Now create a virtual host for your SVN container.</p>
<blockquote>
<p># mkdir -p /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Now create a development group, and add the web user to it.</p>
<blockquote>
<p># addgroup svngroup; adduser www-data svngroup</p>
</blockquote>
<p>Now Add a user to the system and add them to that group</p>
<blockquote>
<p># adduser username<br />
# passwd username</p>
</blockquote>
<p>Now add that user to the group required for SVN</p>
<blockquote>
<p># adduser username svngroup</p>
</blockquote>
<p>Now setup the permissions for your SVN site.</p>
<blockquote>
<p># chmod 2770 /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Now setup the repo as you normally would</p>
<blockquote>
<p># svnadmin create /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Remove the current password file. We're using HTTPS (or HTTP) instead of SVNSERVE so no need for it.</p>
<blockquote>
<p># rm /var/local/svn/svn.yourdomain.com/conf/passwd<br />
# touch /var/local/svn/svn.yourdomain.com/conf/passwd</p>
</blockquote>
<p>Allow your group to write to the repo</p>
<blockquote>
<p># chmod -R g+w www-data:svngroup /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Now set the repo access permissions.</p>
<blockquote>
<p># nano /var/local/svn/svn.yourdomain.com/conf/authz</p>
</blockquote>
<p>It should look something similar to the following. If in doubt, refer to the <a href="http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html">Path-Based Auth section</a> of Subversion.</p>
<blockquote>
<p>[groups]</p>
<p>svngroup = username1,username2,username2</p>
<p>[/]<br />
@svngroup = rw</p>
</blockquote>
<p>Now, create a log directory within apache for your development site.</p>
<blockquote>
<p># mkdir /var/log/apache2/svn.yourdomain.com</p>
</blockquote>
<p>Now create your virtual host.</p>
<blockquote>
<p># nano /etc/apache2/sites-available/svn.yourdomain.com</p>
</blockquote>
<p>Copy the following in, editing to suit your environment. Note we're using a self signed certificate, you can change this to a properly signed one if you have it.</p>
<blockquote>
<p>&lt;VirtualHost [server's IP address]:443&gt;<br />
ServerName svn.yourdomain.com<br />
&lt;Location /&gt;<br />
DAV svn<br />
AuthType Basic<br />
AuthName "svn.yourdomain.com"<br />
AuthUserFile /var/local/svn/svn.yourdomain.com/conf/passwd<br />
AuthzSVNAccessFile /var/local/svn/svn.yourdomain.com/conf/authz<br />
SVNPath /var/local/svn/svn.yourdomain.com<br />
Require valid-user<br />
&lt;/Location&gt;<br />
CustomLog /var/log/apache2/svn.yourdomain.com/access.log combined<br />
ErrorLog /var/log/apache2/svn.yourdomain.com/error.log<br />
SSLEngine on<br />
SSLCertificateFile /etc/ssl/certs/selfsigned.pem<br />
# Add this once there is a real (non self-signed) certificate.<br />
# SSLCertificateKeyFile /etc/apache2/ssl/server.key<br />
&lt;/VirtualHost&gt;<br />
&lt;VirtualHost [server's IP address]:80&gt;<br />
ServerName svn.yourdomain.com<br />
Redirect / <a href="https://svn.yourdomain.com/">https://svn.yourdomain.com/</a><br />
&lt;/VirtualHost&gt;</p>
</blockquote>
<p>Now, enable the site</p>
<blockquote>
<p># a2ensite svn.yourdomain.com</p>
</blockquote>
<p>Now, create a username and password to access the svn site.</p>
<blockquote>
<p># htpasswd /var/local/svn/svn.yourdomain.com/conf/passwd username1</p>
</blockquote>
<p>Now, create your SSL certificate. <a href="http://articles.slicehost.com/2007/11/26/ubuntu-gutsy-generating-a-self-signed-ssl-certificate">Details are here if you need them</a>.</p>
<blockquote>
<p># sudo aptitude install ssl-cert</p>
</blockquote>
<p>Now, we found out that the default Ubuntu SSL cert is only for 30 days, so, we changed this to be 365 a little more sane no? <a href="http://devio.wordpress.com/2008/07/16/extending-default-validity-for-self-generated-ssl-certificates/">Thanks for the tip</a> Devio.</p>
<blockquote>
<p># which make-ssl-cert<br />
/usr/sbin/make-ssl-cert<br />
# nano /usr/sbin/make-ssl-cert</p>
</blockquote>
<p>Replace the line near the bottom that looks like this</p>
<blockquote>
<p>openssl req -config $TMPFILE -new -x509 -nodes -out $output -keyout $output</p>
</blockquote>
<p>With a line that looks like this instead</p>
<blockquote>
<p>openssl req -config $TMPFILE -new -x509 <strong>-days 365</strong> -nodes -out $output -keyout $output</p>
</blockquote>
<p>Exit and save the file. Now we're ready to generate our final self signed SSL certificate for Apache on Ubuntu. Like this;</p>
<blockquote>
<p># make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/certs/selfsigned.pem</p>
</blockquote>
<p>Make sure to set your "common name" to your server name - ie: svn.yourdomain.com</p>
<p>Now you can go ahead and restart Apache to verify your DAV enabled SVN site functions.</p>
<blockquote>
<p># /etc/init.d/apache2 restart</p>
</blockquote>
<p>To verify, hit it's url in a browser</p>
<blockquote>
<p><a href="https://svn.yourdomain.com/">https://svn.yourdomain.com/</a></p>
</blockquote>
<p>If everthing was successful, you now have SVN setup, with WEB-Dav support in Apache2 on Ubuntu. Continue to setup Trac.</p>
<p>First we have to create the web directory for Trac.</p>
<blockquote>
<p># mkdir -p /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Now we setup the permissions</p>
<blockquote>
<p># chmod 2770 /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Create a Trac instance for your project</p>
<blockquote>
<p># trac-admin /var/local/trac/trac.yourdomain.com initenv</p>
</blockquote>
<p>Setup the proper ownerships for the directory</p>
<blockquote>
<p># chown -R www-data:svngroup /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Now make sure the group is added to the repo</p>
<blockquote>
<p># chmod -R g+w /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Configure Trac where required</p>
<blockquote>
<p># nano /var/local/trac/trac.yourdomain.com/conf/trac.ini</p>
</blockquote>
<p>Create a directory for log files</p>
<blockquote>
<p># mkdir /var/log/apache2/trac.yourdomain.com</p>
</blockquote>
<p>Now create a virtual host for your trac instance</p>
<blockquote>
<p># nano /etc/apache2/sites-available/trac.yourdomain.com</p>
</blockquote>
<p>Now, copy the following into the virtual host configuration, changing to suit your domain and configuration</p>
<blockquote>
<p># Trac Configuration<br />
&lt;VirtualHost [server's IP address]:80&gt;<br />
ServerName trac.yourdomain.com<br />
Redirect / <a href="https://trac.yourdomain.com/">https://trac.yourdomain.com/</a><br />
&lt;/VirtualHost&gt;<br />
&lt;VirtualHost [server's IP address]:443&gt;<br />
ServerName trac.yourdomain.com<br />
DocumentRoot /var/local/trac/trac.yourdomain.com/<br />
Alias /trac/ /usr/share/trac/htdocs<br />
&lt;Directory "/usr/share/trac/htdocs/"&gt;<br />
Options Indexes MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Directory&gt;<br />
&lt;Location /&gt;<br />
SetHandler mod_python<br />
PythonHandler trac.web.modpython_frontend<br />
PythonInterpreter main_interpreter<br />
PythonOption TracEnv /var/local/trac/trac.yourdomain.com/<br />
PythonOption TracUriRoot /<br />
AuthType Basic<br />
AuthName "trac.yourdomain.com"<br />
# Use the SVN password file.<br />
AuthUserFile /var/local/svn/svn.yourdomain.com/conf/passwd<br />
Require valid-user<br />
&lt;/Location&gt;<br />
CustomLog /var/log/apache2/trac.yourdomain.com/access.log combined<br />
ErrorLog /var/log/apache2/trac.yourdomain.com/error.log<br />
SSLEngine on<br />
SSLCertificateFile /etc/ssl/certs/selfsigned.pem<br />
# Add this once there is a real (non self-signed) certificate.<br />
# SSLCertificateKeyFile /etc/apache2/ssl/server.key<br />
&lt;/VirtualHost&gt;</p>
</blockquote>
<p>Now, enable this virtual host as well</p>
<blockquote>
<p># a2ensite trac.yourdomain.com</p>
</blockquote>
<p>Configure Trac Permissions for your Trac instance.</p>
<blockquote>
<p># trac-admin /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Use the following commands to view permissions, and set permissions.</p>
<blockquote>
<p>"help permission"</p>
</blockquote>
<p>We set the following permissions to one of our users from the command line</p>
<blockquote>
<p># trac-admin /var/local/trac/trac.yourdomain.com permission add username1 TRAC_ADMIN</p>
</blockquote>
<p>Now you're ready to restart Apache with your new Trac VHOST.</p>
<blockquote>
<p># /etc/init.d/apache2 restart</p>
</blockquote>
<p>Now you're ready to restart Apache and visit your Trac installation</p>
<blockquote>
<p><a href="https://trac.yourdomain.com/">https://trac.yourdomain.com/</a></p>
</blockquote>
<p>Login with your user (username1) and password you setup earlier.</p>
<p>We hope this tutorial helps others when trying to setup SVN and Trac on Ubuntu with Virtual Hosts. Let us know if you have any other handy tips!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto Setup Emergency Queues with Separate Outbound PRI channel using FreePBX and Ring Groups.</title>
		<link>http://www.voipphreak.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/</link>
		<comments>http://www.voipphreak.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 08:04:20 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Asterisk 1.4]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/</guid>
		<description><![CDATA[One of our clients recently had a question about his system using FreePBX 2.5.1 and Asterisk 1.4 regarding using specific lines to reach staff. He runs a support queue for his company. During the day he has a regular IVR with Call queues enabled to handle customer calls and direct them to the appropriate staff [...]]]></description>
			<content:encoded><![CDATA[<p>One of our clients recently had a question about his system using FreePBX 2.5.1 and Asterisk 1.4 regarding using specific lines to reach staff.</p>
<p>He runs a support queue for his company. During the day he has a regular IVR with Call queues enabled to handle customer calls and direct them to the appropriate staff member to deal with customer inquiries etc. After hours the menu functions the same way, however there are less staff to answer the phones so mainly the emergency extension is the only one being monitored, for - well, emergencies!</p>
<p>Of course, the people monitoring for emergencies don't want to get a call on their blackberry asking what the company address is at 4 o'clock in the morning. So our client wanted the ability to set his system up so all calls to the emergency queue would be directed out a specific channel on his DID with a specific CallerID.</p>
<p>This enables his staff to set their cell phones to "ignore all calls except for those from this number". Of course they set "this number" to the one being used by the outbound PRI channel on the PBX.</p>
<p>Setup of is type of scenario is detailed below.</p>
<p>1. Login to your FreePBX Control Panel.</p>
<p>2. Go to the <strong>Trunks Menu</strong> and add a new <strong>ZAP</strong> trunk. Note this is different if you're using <strong>SIP</strong> or <strong>IAX</strong>. Here, we're using a <strong>T1 PRI</strong>.</p>
<p>3. When you create the new trunk, put in the following configuration variables.</p>
<blockquote><p>Outbound Caller ID: "emer" &lt;5555551212&gt;<br />
Never Override CallerID: &lt;checked&gt;<br />
Maximum Channels: &lt;set to max cellular phones used&gt;<br />
Disable Trunk: &lt;unchecked&gt;<br />
Dial Rules: .<br />
Outbound Dial Prefix: &lt;blank&gt;<br />
Zap Identifier: g2</p></blockquote>
<p>4. Your new trunk is now created in Asterisk.</p>
<p>5. Click on the <strong>Outbound Routes</strong> link item on the left of the FreePBX Control Panel.</p>
<p>6. Add a new <strong>Route</strong> and put in the following information:</p>
<blockquote><p>Route Name: Emergency<br />
Route Password: &lt;blank&gt;<br />
PIN Set: None<br />
Emergency Dialing: &lt;unchecked&gt;<br />
Intra Company Route: &lt;unchecked&gt;<br />
Music On Hold: Default<br />
Dial Patters:</p>
<p><strong>2133|NXXXXXX<br />
2133|NXXXXXXXXX<br />
</strong><br />
Trunk Sequence: g2</p></blockquote>
<p>Note the above and the "2133" used. This number can be anything you want, we just chose something we knew wouldn't be used in the next step of the configuration. This number will get stripped out before getting sent out the trunk so it's really not a big deal what you pick here. Just use something that won't be used anywhere.</p>
<p>7. Click on Submit changes in this menu to add your new route</p>
<p>8. Click on the <strong>Ring Groups Menu</strong> on the left side of FreePBX 2.5.1 Interface</p>
<p>9. Edit, or Create a new Ring Group for the Emergency Group and ensure that it has the following settings along with your own configuration customizations if you have made them (merge these in):</p>
<blockquote><p>Ring Strategy: Ringall<br />
Ring Time: 50 Seconds (Time appropriately for Cell Voicemail!)<br />
Extension List:</p>
<p><strong>21335555551212#<br />
21335555551212#</strong></p>
<p>Announcement: Change to your own if you want<br />
Play MOH: Ring<br />
CID Name Prefix: CompanyName<br />
Confirm Calls: Checked<br />
Remote Announce: Same as "Announcement"</p>
<p>Destination if no answer: Hangup (or whatever you need)</p>
<p>Note that the <strong>2133</strong> prefix's the cellular phone example numbers above. If you changed that earlier make sure to change it here when you're changing the mobile phone number.</p></blockquote>
<p>10. Click on the submit button and you're done adding your ring group to the configuration for this portion.</p>
<p>11. Click the "<strong>Queues</strong>" button on the left side of the FreePBX Management Interface and either modify or create a new queue for your Emergency staff.</p>
<p>12. When creating the new Queue use similar information to the following:</p>
<blockquote><p>Queue Number: A extension for queue<br />
CID Name: EMR-<br />
Wait Time: No<br />
Alert Info: Blank<br />
Static Agents:</p>
<p><strong>1234</strong>,0</p></blockquote>
<p>Note that <strong>1234</strong> in this section is the number of your Ring Group used for the Emergency Dialing feature for Outbound calls.</p>
<p>Set your Agent Timeout to something respectible.</p>
<blockquote><p>Agent Timeout: <strong>40 seconds</strong></p></blockquote>
<p>Keep scrolling down the settings and set the "fail over destination" to your Emergency Queue (to itself).</p>
<p>13. Now you should ssh to the FreePBX server and create a change in the zaptel/dahdi configuration.</p>
<p>14. Edit the file like this</p>
<blockquote><p># nano /etc/asterisk/zapata.conf</p></blockquote>
<p>15. Change it to something like this matching your system. We originally were using all 23 channels for the main line. Now we've separated it out into two groups (g1 and g2). G2 is the Trunk you setup earlier.</p>
<p>So, we started with:</p>
<blockquote><p>group = 1<br />
context=ext-did<br />
switchtype=national<br />
signalling=pri_cpe<br />
stripmsd=1<br />
channel=1-23</p></blockquote>
<p>We ended with:</p>
<blockquote><p>group = 1<br />
context=ext-did<br />
switchtype=national<br />
signalling=pri_cpe<br />
stripmsd=1<br />
channel=1-22</p>
<p>group = 2<br />
context=ext-did<br />
switchtype=national<br />
signalling=pri_cpe<br />
stripmsd=0<br />
channel=23</p></blockquote>
<p>16. Exit and save the zapata.conf file.</p>
<p>17. Now you are ready to add this to your IVR menu and start testing.</p>
<p>18. Go back to FreePBX and go to the <strong>IVR</strong> menu option on the left of the Administration Panel. Find your IVR menu tree and add a new menu option to it that will dial your Emergency Queue.</p>
<p>19. You're done. Give your menu a call, and hit the emergency queue!</p>
<p>If it doesn't work, try the instructions again. If it still doesn't work, leave us a comment and we'll try to give you hand. Have you done something similar with FreePBX and Asterisk? Tell us about it below, we'd love to hear what other cool things people are doing.</p>
<p>We hope you enjoyed this howto!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and Configuring chan_mobile for Bluetooth Presence support in Asterisk 1.6</title>
		<link>http://www.voipphreak.ca/2008/10/30/installing-and-configuring-chan_mobile-for-bluetooth-presence-support-in-asterisk-16/</link>
		<comments>http://www.voipphreak.ca/2008/10/30/installing-and-configuring-chan_mobile-for-bluetooth-presence-support-in-asterisk-16/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 02:10:18 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Asterisk 1.6]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/10/30/installing-and-configuring-chan_mobile-for-bluetooth-presence-support-in-asterisk-16/</guid>
		<description><![CDATA[Following this tutorial on how to get Chan_Mobile working with Asterisk for Bluetooth support for our headsets and mobile phones we worked out how to get it working on Asterisk 1.6. We figured we would share this information with our readers incase they were interested in Bluetooth for Asterisk and the capabilities it will open [...]]]></description>
			<content:encoded><![CDATA[<p>Following <a href="http://www.geek-pages.com/articles/asterisk/howto_build_and_configure_chan_mobile_on_trixbox.html">this tutorial</a> on how to get <a href="http://www.voip-info.org/wiki/view/chan_mobile">Chan_Mobile</a> working with <a href="http://www.asterisk.org/">Asterisk</a> for Bluetooth support for our headsets and mobile phones we worked out how to get it working on <a href="http://www.asterisk.org/">Asterisk 1.6</a>.</p>
<p>We figured we would share this information with our readers incase they were interested in <a href="http://www.voip-info.org/wiki/view/chan_mobile">Bluetooth for Asterisk</a> and the capabilities it will open up to their system. Just think, the server will know when you're in the room or out of the office and other fancy things.</p>
<p>First you should make sure that your Bluetooth Dongle works with Asterisk, and that your Cellular Phone is known to work with Asterisk and Bluetooth. You can verify all this information over at the <a href="http://www.voip-info.org/wiki/view/chan_mobile">Voip-Info Chan_Mobile</a> page.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li>Asterisk PBX</li>
<li>Bluetooth Support (Motherboard or Dongle)</li>
<li>Cellular Phone with Bluetooth support</li>
<li>Bluez Bluetooth Libraries and Development Headers</li>
</ul>
<p><strong>Tutorial:</strong></p>
<p>So, first we have to install some pre-requisite software. We'll assume that you already have Linux installed, your kernel is compiled, Asterisk is installed and working, and that you have a basic familiarity with Linux commands. We've written this tutorial for Ubuntu, using FreePBX so instructions may change based on your OS or Asterisk Configuration GUI.</p>
<p>So, lets get down to business shall we.</p>
<p>First, install Bluez Utilities on your Server</p>
<blockquote><p># apt-get install bluez-utils bluez-hcidump</p></blockquote>
<p>Now Configure Bluez to work with your server and dongle. We won't go into depth on this as it mostly "just works" but there are ample tutorials and documentation if your dongle is a little finiky on your system.</p>
<p>Now, open up the file hcid.conf in the Bluetooth configuration directory, and match the contents to the following.</p>
<blockquote><p># nano /etc/bluetooth/hcid.conf</p></blockquote>
<p>Erase the contents, and replace it with this</p>
<blockquote><p># HCId options<br />
options {<br />
autoinit yes;<br />
security auto;<br />
pairing multi;<br />
passkey "1234";<br />
}</p>
<p>device {<br />
name "Our PBX System";<br />
class 0x3e0100;<br />
iscan enable; pscan enable;<br />
discovto 0;<br />
lm accept;<br />
lp rswitch,hold,sniff,park;<br />
}</p>
<p>options {<br />
autoinit yes;<br />
security auto;<br />
pairing multi;<br />
pin_helper /etc/bluetooth/pin;<br />
}</p></blockquote>
<p>Note you can also experiment with making Asterisk a handsfree headset, but we won't go over this in this tutorial. The following lines can be added to your hcid.conf in replacement of the "Our PBX System" device mentioned above if you want to try this:</p>
<blockquote><p>device {<br />
name "Asterisk";<br />
class 0x200404;<br />
iscan enable;<br />
pscan enable;<br />
lm accept;<br />
lp rswitch,hold,sniff,park;<br />
}</p></blockquote>
<p>Now that our bluetooth is configured, we can go back to configuring Asterisk to work with Chan Mobile for Bluetooth Support. We'll assume you already have Asterisk 1.6 running on your machine for this to work. If not, compile it and instal it!</p>
<p>Now, Enter the directory with your Asterisk-Addons 1.6 source.</p>
<blockquote><p># cd /opt/asterisk/asterisk-addons-1.6.0/</p></blockquote>
<p>Issue your configure line</p>
<blockquote><p># make distclean<br />
# ./configure --with-bluetooth</p></blockquote>
<p>Now, issue the configure menu tree</p>
<blockquote><p># make menuselect</p></blockquote>
<p>Now, on the left hand side, hit the down arrow button until you get to the Channel Drivers section. On the right hand side, you should see "chan_mobile" with a little "*" next to it telling us it's enabled.</p>
<blockquote><p>[*] chan_mobile</p></blockquote>
<p>If you don't, pretty right on your arrow keys, and then press the enter key to select chan_mobile. Exit the configuration menu by pressing F12 to save your changes.</p>
<p>Now, build Asterisk-Addons 1.6 as you normally would</p>
<blockquote><p># make<br />
# make install</p></blockquote>
<p>This will place chan_mobile.so into /usr/lib/asterisk/modules so the next time you start Asterisk it will be available.</p>
<p>We're pretty much done the "difficult" stuff now, and just need to go on and start bluetooth on our system and then configure Asterisk to work with it.</p>
<p>So, start up bluetooth</p>
<blockquote><p># /etc/init.d/bluetooth start</p></blockquote>
<p>Now, lets make sure that Bluetooth is running and sees our devices</p>
<blockquote><p># hcitool dev</p></blockquote>
<p>This should output some information like this:</p>
<blockquote><p>Devices:<br />
hci0 00:50:B6:80:34:DD</p></blockquote>
<p>Make a note of the "hardware" address in a text file or somewhere handy because we will need it later. The hardware address is the one that looks like a MAC address. In this case it's "00:50:B6:80:34:DD" note that your system will be different.</p>
<p>Now, lets edit Asterisk's mobile configuration file</p>
<blockquote><p># nano /etc/asterisk/mobile.conf</p></blockquote>
<p>Add your Bluetooth Adapter to the file like this, using the Hardware ID from the hcitool command you ran above. There should already be an entry that looks similar to this (with an id=blue) just replace the hardware ID in this entry with yours.</p>
<blockquote><p>[adapter]<br />
id=blue<br />
address=00:50:B6:80:34:DD<br />
;forcemaster=yes<br />
;alignmentdetection=yes</p></blockquote>
<p>Now exit and save the file.</p>
<p>Before we forget, we should add bluetooth to the startup options of the server if it's not already there. Do so like this;</p>
<blockquote><p># update-rc.d bluetooth defaults</p></blockquote>
<p>Now, in order for other devices to be able to see your server and vice-versa we have to make it discoverable. That's done with the following command.</p>
<blockquote><p># dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable</p></blockquote>
<p>The fun begins right about now. Go and get your mobile phone. Turn bluetooth on on the phone. You should see your Asterisk PBX in the list of discoverable devices. Double click on it to add it to your device, and input the security key of 1234 when prompted.</p>
<p>Note that on our windows mobile 6.1 devices, after adding the Asterisk PBX to our bluetooth list, we also had to click on it and then hit refresh services list a few times until it showed us "Bluetooth Headset" as a list of supported options. We selected it on the screen, and closed the bluetooth configuration on our HTC Tytn II (Kaiser) test devices.</p>
<p>Now it's time to make your phone discoverable so the PBX can attach to it. Go back to your phone, and find the option to enable bluetooth discovery. Turn it on.</p>
<p>Now from the Asterisk Server Command Line we should be able to issue this command to search for our Bluetooth Mobile Phone.</p>
<blockquote><p># hcitool scan</p></blockquote>
<p>It should show you a list of results like this</p>
<blockquote><p>Scanning ...<br />
00:16:BC:1F:E1:E8 Phone1<br />
00:17:83:6F:BD:51 Phone2</p></blockquote>
<p>In our example, we'll only be connecting to Phone2. One finicky thing we noticed is that if you want to connect more than one mobile phone at a time, you need a dongle to match. So, for example if you want to connect 5 bluetooth mobile phones, you would also need 5 bluetooth dongles, and 5 free USB ports (or a USB HUB) to get it all working. We've never tried with more than 2 bluetooth phones, so your mileage may vary.</p>
<p>If you don't see your phone, something is wrong - try the above steps again to see if it fixes it.</p>
<p>Now continue on by stopping Asterisk PBX, and reloading it to take advantage of our new chan_mobile module.</p>
<blockquote><p># /etc/init.d/asterisk stop</p></blockquote>
<p>Now start Asterisk in debug mode so you can verify everything is working.</p>
<blockquote><p># asterisk -vvvvvvvvvvvvvgc</p></blockquote>
<p>Now type this command on the Asterisk CLI to find your mobile devices</p>
<blockquote><p>*CLI&gt; mobile search</p></blockquote>
<p>You should see something similar to the following</p>
<blockquote><p>Address Name Usable Type Port<br />
00:17:83:6F:BD:51 Phone2 Yes Phone 2<br />
00:13:33:44:4d:23 Phone1 Yes Phone 5</p></blockquote>
<p>The above is a listing of all Bluetooth devices available to your Asterisk PBX.</p>
<ul>
<li>The <strong>Address</strong> Field is the Device Identifier Code (MAC Address)</li>
<li>The <strong>Name</strong> Field holds the name of the device (Phone1)</li>
<li>The <strong>Usable</strong> Field tells us if the phone is Usable by Asterisk or not (Yes/No)</li>
<li>The <strong>Type</strong> Field tells us if it's a Phone (FXO) or a Headset (FXS) device</li>
<li>The <strong>Port</strong> Field tells us which port the phone is using</li>
</ul>
<p>Make a note of this information and continue on to the next step.</p>
<p>Now, exit Asterisk by typing "stop now" on the command line</p>
<blockquote><p>*CLI&gt; stop now</p></blockquote>
<p>You'll be back at the CLI now.</p>
<p>In our example, we'll be using Phone2 to configure to work with Asterisk.</p>
<p>Go back and edit your mobile configuration file in /etc/asterisk to look similar to this</p>
<blockquote><p># nano /etc/asterisk/mobile.conf</p></blockquote>
<p>Add something similar to the following below the adapter configuration you added earlier in the tutorial.</p>
<blockquote><p>[TytnII]<br />
address=00:17:83:6F:BD:51<br />
port=2<br />
context=from-pstn<br />
adapter=blue<br />
;group=1</p></blockquote>
<p>If you are configuring a headset, the line would look something like this instead</p>
<blockquote><p>[headset]<br />
address=xx:xx:xx:xx:xx:xx ; the address of the headset<br />
port=x ; the port number<br />
type=headset ; tells asterisk it is a headset<br />
adapter=blue ; adapter to use</p></blockquote>
<p>Now you can start asterisk again. I would start it in debug mode so you can verify your phone is connected.</p>
<blockquote><p># asterisk -vvvvvvvvvvvvvvvgc</p></blockquote>
<p>You should see messages similar to the following on the Asterisk Console letting you know your device has connected to Asterisk</p>
<blockquote><p>-- Bluetooth Device TytnII has connected.<br />
-- Bluetooth Device TytnII initialised and ready.</p></blockquote>
<p>And if you issue the show devices command</p>
<blockquote><p>*CLI&gt; mobile show devices</p></blockquote>
<p>You should see something like this</p>
<blockquote><p>ID Address Group Adapter Connected State SMS<br />
TytnII 00:17:83:6F:BD:51 0 blue Yes Free No</p></blockquote>
<p>This means your phone is now connected to Asterisk. Depending on the context you put it in, if a call comes in to your cellular phone and you are within proximity of your Asterisk server it should route over to your one of your SIP extensions. Asterisk will automatically pair and unpair with your mobile phone as you come in and out of range respectively. Cool huh?</p>
<p>It is worth it to mention this warning from the <a href="http://www.geek-pages.com/articles/asterisk/howto_build_and_configure_chan_mobile_on_trixbox_4.html">original article</a> as well: <strong><em>"Important: Watch what your cell phone is doing the first few times. Asterisk wonâ€™t make random calls but if chan_mobile fails to hang up for some reason and you get a huge bill from your telco, donâ€™t blame me."</em></strong></p>
<p>Hope you enjoyed this tutorial, let us know if you have any comments or other fun ideas to do with chan_mobile, bluetooth and Asterisk in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/10/30/installing-and-configuring-chan_mobile-for-bluetooth-presence-support-in-asterisk-16/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Enable SNMP on your Cisco Routers to watch SIP and other traffic</title>
		<link>http://www.voipphreak.ca/2008/10/28/enable-snmp-on-your-cisco-routers-to-watch-sip-and-other-traffic/</link>
		<comments>http://www.voipphreak.ca/2008/10/28/enable-snmp-on-your-cisco-routers-to-watch-sip-and-other-traffic/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 19:32:51 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Asterisk 1.4]]></category>
		<category><![CDATA[Asterisk 1.6]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/10/28/enable-snmp-on-your-cisco-routers-to-watch-sip-and-other-traffic/</guid>
		<description><![CDATA[It&#8217;s pretty easy, just ssh (or telnet if you&#8217;re crazy) to your router and do this: # en # conf t # snmp-server community YOUR.SNMP.COMMUNITY ro # access-list 60 permit IP.OF.SNMP.DAEMON # snmp-server host IP.OF.SNMP.DAEMON YOUR.SNMP.COMMUNITY # snmp-server enable traps Now your favourite graphing software should be able to collect all the data you need. [...]]]></description>
			<content:encoded><![CDATA[<p>It&rsquo;s pretty easy, just ssh (or telnet if you&rsquo;re crazy) to your router and do this: </p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr">
<p># en</p>
<p># conf t</p>
<p># snmp-server community YOUR.SNMP.COMMUNITY ro</p>
<p># access-list 60 permit IP.OF.SNMP.DAEMON</p>
<p># snmp-server host IP.OF.SNMP.DAEMON YOUR.SNMP.COMMUNITY</p>
<p># snmp-server enable traps</p>
</blockquote>
<p>Now your favourite graphing software should be able to collect all the data you need. </p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/10/28/enable-snmp-on-your-cisco-routers-to-watch-sip-and-other-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk SNMP with Cacti Howto upgraded for Asterisk 1.6 and Ubuntu!</title>
		<link>http://www.voipphreak.ca/2008/10/28/asterisk-snmp-with-cacti-howto-upgraded-for-asterisk-16-and-ubuntu/</link>
		<comments>http://www.voipphreak.ca/2008/10/28/asterisk-snmp-with-cacti-howto-upgraded-for-asterisk-16-and-ubuntu/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 18:48:46 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Asterisk 1.6]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/10/28/asterisk-snmp-with-cacti-howto-upgraded-for-asterisk-16-and-ubuntu/</guid>
		<description><![CDATA[Here's an update to our popular article Asterisk 1.4 with SNMP and Cacti using a remote box. This howto will be a little different in that it will be using Asterisk 1.6, the latest in the pipeline for Opensource PBX solutions from Digium. This process should be a little easier than it was last time, [...]]]></description>
			<content:encoded><![CDATA[<p>Here's an update to our <a title="popular article Asterisk 1.4 with SNMP and Cacti" href="http://www.voipphreak.ca/2007/04/16/monitoring-asterisk-14-with-snmp-and-cacti-for-pretty-graphs/">popular article Asterisk 1.4 with SNMP and Cacti</a> using a remote box. This howto will be a little different in that it will be using <a title="Asterisk 1.6" href="http://asterisk.org/">Asterisk 1.6</a>, the latest in the pipeline for Opensource PBX solutions from <a href="http://www.digium.com/">Digium</a>. This process should be a little easier than it was last time, however will sacrifice a little bit of the "cool factor" (ie: security, etc) because it will be running local to <a title="Asterisk" href="http://www.asterisk.org/">Asterisk</a>. Our test system won't be affected by this, but if you're running this on a live production server, you may want to combine information from the other howto for <a href="http://www.voipphreak.ca/2007/04/16/monitoring-asterisk-14-with-snmp-and-cacti-for-pretty-graphs/">Asterisk 1.4 and remote Cacti monitoring</a> instead of using this one.</p>
<p><strong>REQUIREMENTS:</strong></p>
<ul>
<li>Asterisk Server with Apache Installed (weâ€™ll call it ASTERISK-BOX)</li>
<li>Ubuntu or equivalent Linux dist installed</li>
<li>Some Time</li>
<li>Interest in nerdy graphs</li>
</ul>
<p>So, lets get this party started right? First we'll need to be clear on a few things, this tutorial expects that you have a fully functional PBX running on your network already, with Apache, PHP and MySQL already installed. We happen to be using FreePBX on our Asterisk 1.6 system so this is already taken care of for us. If you use command line Asterisk, or another GUI for Asterisk then your mileage may vary, but probably only by one or two sideroads if you catch my meaning.</p>
<p>First, lets get some stuff installed on our Asterisk/Apache server.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># apt-get install snmp snmpd libsnmp-base libsnmp-dev</p></blockquote>
<p>Now, we have to recompile Asterisk 1.6 to use snmp, easy enough.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># cd /opt/asterisk/asterisk-1.6.0/<br />
# ./configure --with-ssl --with-netsnmp --with-cap<br />
# make menuselect</p></blockquote>
<p>Now make sure that the res_snmp module is enabled under the resource modules submenu by pressing space when it's selected if the "asterisk" character isn't visible that means it's disabled.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>[*] res_snmp</p></blockquote>
<p>A little aside here, I know I've mentioned this in the past but wow does the ncurses interface for Asterisk Configuration really blow me away. I always thought the Linux Kernel's was cool, but it doesn't even compare to what Digium and the Community has done for Asterisk PBX.</p>
<p>Okay, enough other crap, back to the task at hand.</p>
<p>Exit the configuration by pressing <strong>F12 to save</strong> and exit.</p>
<p>Now you're back at your prompt and ready to build your Asterisk Source. Do so like this:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># make<br />
# make install</p></blockquote>
<p>We'll have to enable res_snmp within asterisk now. If you haven't, copy over the default configuration file to the Asterisk configuration directory. If you've already configured res_snmp from 1.4 you should compare the files for differences to make sure they match up between the Asterisk 1.4 and 1.6 Changes.</p>
<p>Still in the Asterisk 1.6 Source directory run this command</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># cp configs/res_snmp.conf.sample /etc/asterisk/res_snmp.conf</p></blockquote>
<p>Now enable NET-SNMP with Asterisk</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># nano /etc/asterisk/res_snmp.conf</p></blockquote>
<p>Make sure it looks like this.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>[general]<br />
subagent = yes<br />
enabled = yes</p></blockquote>
<p>Now, we should configure some NET-SNMP Options</p>
<p>First we'll start with removing and backing up the original configuration file</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># mv /etc/snmpd.conf /etc/snmpd.conf.orig</p></blockquote>
<p>Now we'll create our new file</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># nano /etc/snmpd.conf</p></blockquote>
<p>Input the following, editing to suit your environment</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>rocommunity YOUR.COMMUNITY.NAME<br />
master agentx<br />
#agentXSocket tcp:10.0.3.20:705<br />
agentXperms 0660 0550 nobody asterisk<br />
com2sec local localhost YOUR.COMMUNITY.NAME<br />
com2sec mynetwork0 10.0.1.0/24 YOUR.COMMUNITY.NAME<br />
com2sec mynetwork1 10.0.2.0/24 YOUR.COMMUNITY.NAME<br />
com2sec mynetwork2 10.0.3.0/24 YOUR.COMMUNITY.NAME<br />
com2sec mynetwork3 10.0.4.0/24 YOUR.COMMUNITY.NAME<br />
group MyROGroup any local<br />
group MyROGroup any mynetwork0<br />
group MyROGroup any mynetwork1<br />
group MyROGroup any mynetwork2<br />
group MyROGroup any mynetwork3<br />
view all included .1<br />
access MyROGroup "" any noauth 0 all none none</p></blockquote>
<p><em><strong>*Note in the above script the permissions, and the nobody, asterisk. This is because I am running asterisk as asterisk:asterisk, so this is where agentX needs to connect. The username doesnâ€™t matter apparently, but the group does.</strong></em></p>
<p>Now, we have to modify the snmp default command line in the initialization script for NET-SNMP</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># nano /etc/default/snmpd</p></blockquote>
<p>Change the lines that looks like this</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'<br />
TRAPDRUN=no<br />
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'</p></blockquote>
<p>To ones that looks like this</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1 -x /var/agentx/master'<br />
TRAPDRUN=yes<br />
TRAPDOPTS='-a -Lf /var/log/snmptrapd.log -p /var/run/snmptrapd.pid'</p></blockquote>
<p>Exit the file now</p>
<p>Now we should stop asterisk and net-snmp (if they are running)</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># /etc/init.d/asterisk stop<br />
# /etc/init.d/snmpd stop</p></blockquote>
<p>Now we should start both back up. I use screen so I can do all of this.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># screen<br />
screen#asterisk -vvvvvvvvvvvvvvvvvvvvgc<br />
&lt;hit CTRL-A-D&gt;</p></blockquote>
<p>Now we can start SNMPD</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># /etc/init.d/snmpd start</p></blockquote>
<p>If we enter our screen session again, we should be back at the Asterisk CLI with this message:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># screen -r<br />
*CLI&gt; NET-SNMP version 5.3.1 AgentX subagent connected</p></blockquote>
<p>You can now exit asterisk and close the GNU Screen session.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>*CLI&gt; stop now<br />
# exit<br />
[screen is terminating]<br />
#</p></blockquote>
<p>First stop SNMP again, and then start them both up normally.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># /etc/init.d/snmpd stop<br />
# /etc/init.d/asterisk start<br />
# /etc/init.d/snmpd start</p></blockquote>
<p>Now the configuration for SNMP and Asterisk is pretty much complete, but we should ensure that snmpd is going to run on the next boot of the Ubuntu 8.0.4 Server.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># update-rc.d snmpd defaults</p></blockquote>
<p>Okay, so we're pretty much done the setup now, lets just test it out. We should copy the Asterisk SNMP MIB's over to the local MIB directory so we can walk the tree.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># cp /opt/asterisk/asterisk-1.6.0/doc/asterisk-mib.txt /usr/share/snmp/mibs/<br />
# cp /opt/asterisk/asterisk-1.6.0/doc/digium-mib.txt /usr/share/snmp/mibs/</p></blockquote>
<p>Now lets get to testing.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># export MIBS=+ASTERISK-MIB<br />
# snmpwalk -c YOUR.COMMUNITY.NAME -v 1 localhost asterisk</p></blockquote>
<p>You should see a big long list like this but with a lot more information:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>&lt;snip&gt;<br />
ASTERISK-MIB::astChanTypeDesc.6 = STRING: Local Proxy Channel Driver<br />
ASTERISK-MIB::astChanTypeDesc.7 = STRING: Standard Linux Telephony API Driver<br />
ASTERISK-MIB::astChanTypeDesc.8 = STRING: Call Agent Proxy Channel<br />
ASTERISK-MIB::astChanTypeDesc.9 = STRING: Objective Systems H323 Channel Driver<br />
ASTERISK-MIB::astChanTypeDesc.10 = STRING: UNISTIM Channel Driver<br />
ASTERISK-MIB::astChanTypeDesc.11 = STRING: Session Initiation Protocol (SIP)<br />
ASTERISK-MIB::astChanTypeDeviceState.1 = INTEGER: true(1)<br />
ASTERISK-MIB::astChanTypeDeviceState.2 = INTEGER: true(1)<br />
ASTERISK-MIB::astChanTypeDeviceState.3 = INTEGER: false(2)<br />
ASTERISK-MIB::astChanTypeDeviceState.4 = INTEGER: true(1)<br />
ASTERISK-MIB::astChanTypeDeviceState.5 = INTEGER: true(1)<br />
ASTERISK-MIB::astChanTypeDeviceState.6 = INTEGER: true(1)<br />
ASTERISK-MIB::astChanTypeDeviceState.7 = INTEGER: false(2)<br />
ASTERISK-MIB::astChanTypeDeviceState.8 = INTEGER: true(1)<br />
ASTERISK-MIB::astChanTypeDeviceState.9 = INTEGER: false(2)<br />
ASTERISK-MIB::astChanTypeDeviceState.10 = INTEGER: false(2)<br />
ASTERISK-MIB::astChanTypeDeviceState.11 = INTEGER: true(1)<br />
&lt;/snip&gt;</p></blockquote>
<p>If this all worked, then you're ready to move over to setting up Cacti because it's all working. If this isn't working, then go back and try this again to make sure you're not missing a step or something.</p>
<p>So, lets begin the Cacti Setup for Asterisk 1.6 and SNMP portion of this tutorial yes?</p>
<p>First install Cacti the "ubuntu" way, and configure it with their prompts (selecting Apache2, and entering your mysql passwords for the cacti installation). If you've already installed Cacti on this server then please check the Cacti docs for what you have to do.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># apt-get install cacti</p></blockquote>
<p>Now create our polling script</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># nano /usr/local/bin/snmp_poller.sh</p></blockquote>
<p>Copy this into it, modifying paths if you need to</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>#!/bin/bash<br />
# filename: snmp_poller.sh<br />
# created this to make the polling process easier<br />
# Can make updates to it and such to add functionality<br />
MIBS=+ASTERISK-MIB<br />
export MIBS<br />
/usr/bin/php /usr/share/cacti/site/poller.php</p></blockquote>
<p>Now make it executable</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># chmod 755 /usr/local/bin/snmp_poller.sh</p></blockquote>
<p>Now, edit your crontab file so we can enable the polling script we just created.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># crontab -e</p></blockquote>
<p>Then add this line, which will run the script every 5 minutes</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>*/5 * * * * /usr/local/bin/snmp_poller.sh &gt; /dev/null 2&gt;&amp;1</p></blockquote>
<p>Now we'll have to chown the cacti configuration file because we're running Asterisk and Apache as "asterisk:asterisk" on our system. Please customize this dependant on your configuration.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># chown root:asterisk /etc/cacti/debian.php<br />
# chown root:asterisk /var/lib/cacti/rra</p></blockquote>
<p>Exit and save the file, and now we are done on the console and can go into Cactiâ€™s web interface for the rest of this tutorial.</p>
<p>In a browser hit your cacti installation</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>http :// your.cacti.ip.box /</p></blockquote>
<p>Install Cacti as you normally would by following the prompts.</p>
<p>Now we have to setup Cacti as per markâ€™s instructions, just like in the old article.</p>
<blockquote><p><em>The first step is to add the server to the Cacti database. First, click Create devices on the front page. Click the Add link on the right side of the screen. </em></p>
<p><em>Clicking add reveals a new screen where you will input basic information about connecting to the server. Fill out the fields, making sure to set the community name to COMMUNITY_NAME (what you put in snmpd.conf) Also, make sure the template is set to None, unless you know for sure you want another set of services automatically setup to be monitored. After clicking create, youâ€™ll come to a screen with the systems in cacti, click the one you just created. Select â€œSNMP ? Generic OID Templateâ€ from the drop down menu under â€œAssociated Graph Templatesâ€ and click add. Add more services if you like, but this is the one we will use to connect to the Asterisk SNMP module.<br />
Advertisment</em></p>
<p><em>Now that the server is setup, we need some graphs. Click the create graphs for this host link at the top. On this page, select the â€œSNMP ? Generic OID Templateâ€ by clicking the checkbox next to it. Select â€œSNMP ? Generic OID templateâ€ from the drop down menu and click â€œcreateâ€. Fill in the form with your basic information about the particular graph youâ€™re looking at. The vertical label will basically be the number of current calls in use.</em></p></blockquote>
<p>To elaborate on the above, hereâ€™s a sample of one of my entries into Cacti</p>
<p>After you create the device, and add the Generic OID Template do this.</p>
<p>Go to your device, create a new graph, generic OID template, and enter your values like the following example:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>Title: |host_description| - Asterisk Channels In Use<br />
Vertical Lable: Current Channels Used<br />
Legend Color: Your Choice<br />
Legend Text: Current Channels Used<br />
Name: |host_description| - Asterisk Channels<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.5.1.0</p>
<p>Title: |host_description| - Asterisk Bridged Channels<br />
Vertical Lable: Current Bridged Channels<br />
Legend Color: Your Choice<br />
Legend Text: Current Bridged Channels<br />
Name: |host_description| - Asterisk Bridged Channels<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.5.5.1.0</p>
<p>Title: |host_description| - Asterisk Active Calls<br />
Vertical Lable: Current Active Calls<br />
Legend Color: Your Choice<br />
Legend Text: Current Active Calls<br />
Name: |host_description| - Asterisk Active Calls<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.2.5.0</p>
<p>Title: |host_description| - Asterisk Calls Processed<br />
Vertical Lable: Current Calls Processed<br />
Legend Color: Your Choice<br />
Legend Text: Current Calls Processed<br />
Name: |host_description| - Asterisk Calls Processed<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.2.6.0</p>
<p>Title: |host_description| - Asterisk SIP Channels<br />
Vertical Lable: SIP Channels Used<br />
Legend Color: Your Choice<br />
Legend Text: SIP Channels Used<br />
Name: |host_description| - Asterisk SIP Channels<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.13</p>
<p>Title: |host_description| - Asterisk IAX Channels<br />
Vertical Lable: IAX Channels Used<br />
Legend Color: Your Choice<br />
Legend Text: IAX Channels Used<br />
Name: |host_description| - Asterisk IAX Channels<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.6</p>
<p>Title: |host_description| - Asterisk DAHDI Channels<br />
Vertical Lable: DAHDI Channels Used<br />
Legend Color: Your Choice<br />
Legend Text: DAHDI Channels Used<br />
Name: |host_description| - Asterisk DAHDI Channels<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.3</p>
<p>Title: |host_description| - Asterisk Bluetooth Use<br />
Vertical Lable: Bluetooth Channels Used<br />
Legend Color: Your Choice<br />
Legend Text: Bluetooth Channels Used<br />
Name: |host_description| - Asterisk Bluetooth Channels<br />
Maximum Value: 100<br />
Data Source: GUAGE<br />
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.5</p></blockquote>
<p>Since the writing of the last article on the subject of SNMP and Asterisk 1.4, the values have again changed for Asterisk 1.6. Below is a listing of them for your convienience. This is where things have changed sinceÂ we wrote our article in 2007 and when MarkÂ wrote his article in April 2006. Now we have new OIDâ€™s to deal with which I will provide a listing of belowâ€¦</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>Channel.1 = Media Gateway Control Protocol (MGCP)<br />
Channel.2 = Skinny Client Control Protocol (Skinny)<br />
Channel.3 = DAHDI Telephony Driver<br />
Channel.4 = Gtalk Channel Driver<br />
Channel.5 = Bluetooth Mobile Device Channel Driver<br />
Channel.6 = Inter Asterisk eXchange Driver (Ver 2)<br />
Channel.7 = Jingle Channel Driver<br />
Channel.8 = Local Proxy Channel Driver<br />
Channel.9 = Standard Linux Telephony API Driver<br />
Channel.10 = Call Agent Proxy Channel<br />
Channel.11 = Objective Systems H323 Channel Driver<br />
Channel.12 = UNISTIM Channel Driver<br />
Channel.13 = Session Initiation Protocol (SIP)</p></blockquote>
<p>And a couple others that may be of interest to us number of channels, and bridged channels respectively.</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>ASTERISK-MIB::astConfigCallsActive.0<br />
ASTERISK-MIB::astConfigCallsProcessed.0<br />
ASTERISK-MIB::astNumChannels.0<br />
ASTERISK-MIB::astNumChanBridge.0</p></blockquote>
<p>Here are the ones Iâ€™m using</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p>Overall Channels:<br />
ASTERISK-MIB::astNumChannels.0</p>
<p>Overall Bridged:<br />
ASTERISK-MIB::astNumChanBridge.0</p>
<p>Active Calls:<br />
ASTERISK-MIB::astConfigCallsActive.0</p>
<p>Calls Processed:<br />
ASTERISK-MIB::astConfigCallsProcessed.0</p>
<p>Overall SIP:<br />
ASTERISK-MIB::astChanTypeChannels.13</p>
<p>Overall IAX:<br />
ASTERISK-MIB::astChanTypeChannels.6</p>
<p>Overall DAHDI:<br />
ASTERISK-MIB::astChanTypeChannels.3</p>
<p>Bluetooth In use:<br />
ASTERISK-MIB::astChanTypeChannels.5</p></blockquote>
<p>Now weâ€™ll need to convert these into numerical OID format so Cacti can access them. This is very straight forward and done like this:</p>
<p>Here are the commands used to translate between numerical and alphabetic:</p>
<p>To convert from Alphabetic just do this for example:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY ASTERISK &lt;MIB&gt;</p></blockquote>
<p>A real world example yields this:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astNumChannels.0<br />
.1.3.6.1.4.1.22736.1.5.1.0</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astNumChanBridge.0<br />
.1.3.6.1.4.1.22736.1.5.5.1.0</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astConfigCallsActive.0<br />
.1.3.6.1.4.1.22736.1.2.5.0</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astConfigCallsProcessed.0<br />
.1.3.6.1.4.1.22736.1.2.6.0</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.13<br />
.1.3.6.1.4.1.22736.1.5.4.1.7.13</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.6<br />
.1.3.6.1.4.1.22736.1.5.4.1.7.6</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.3<br />
.1.3.6.1.4.1.22736.1.5.4.1.7.3</p>
<p># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.5<br />
.1.3.6.1.4.1.22736.1.5.4.1.7.5</p></blockquote>
<p><strong>Here are the commands used to translate between numerical and alphabetic:</strong></p>
<p>To convert from Alphabetic just do this for example:</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p><code># snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY ASTERISK-MIB::astChanTypeChannels.9 </code></p></blockquote>
<p>and it will spit out the numerical version of the OID, to see the alpha one just do this instead</p>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr"><p><code># snmpwalk -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY .1.3.6.1.4.1.22736.1.5.4.1.7.9</code></p></blockquote>
<p>And now after we have that all sorted out and you have what you want to graph all figured out.</p>
<p>Now youâ€™re ready to let the poller do itâ€™s work. Make some calls, or stress test your Asterisk system using our <a href="http://www.voipphreak.ca/2007/04/17/using-sipp-to-stress-test-your-asterisk-14-pbx-system/">SIPP howto</a> and watch the graphs come to life. Hereâ€™s some samples right after we created our graphs.</p>
<p><img src="http://www.voipphreak.ca/wp-content/uploads/2008/10/vp-allchan-small.jpg" border="0" alt="Vp_allchan" /></p>
<p><img src="http://www.voipphreak.ca/wp-content/uploads/2008/10/vp-bridged-small.jpg" border="0" alt="Vp_bridged" /></p>
<p>Let me know how you make out and if you have any issues. We're still trying to figure out how we can go about getting constant information instead of polled every 5 minutes, let us know if you have any tips!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/10/28/asterisk-snmp-with-cacti-howto-upgraded-for-asterisk-16-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Quick Fix for Windows Mobile Devices with Connection Manager on Bootup</title>
		<link>http://www.voipphreak.ca/2008/10/18/quick-fix-for-windows-mobile-devices-with-connection-manager-on-bootup/</link>
		<comments>http://www.voipphreak.ca/2008/10/18/quick-fix-for-windows-mobile-devices-with-connection-manager-on-bootup/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 09:01:49 +0000</pubDate>
		<dc:creator>Voip Phreak</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Programs]]></category>

		<guid isPermaLink="false">http://www.voipphreak.ca/2008/10/18/quick-fix-for-windows-mobile-devices-with-connection-manager-on-bootup/</guid>
		<description><![CDATA[When you start up your Windows Mobile device (with a custom ROM) in Canada and probably some other parts of the world, the handy little wizard will tell you that there's no operator in the database, with a message like this: "The operator does not exist in the database. Please contact your operator for the [...]]]></description>
			<content:encoded><![CDATA[<p>When you start up your Windows Mobile device (with a custom ROM) in Canada and probably some other parts of the world, the handy little wizard will tell you that there's no operator in the database, with a message like this:</p>
<blockquote>
<p>"The operator does not exist in the database. Please contact your operator for the connection settings".</p>
</blockquote>
<p>If you want to fix it, just do this:</p>
<blockquote>
<p>Start-&gt;Settings-&gt;Connections-&gt;Connection Wizard-&gt;Menu-&gt;untick auto check</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.voipphreak.ca/2008/10/18/quick-fix-for-windows-mobile-devices-with-connection-manager-on-bootup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: www.voipphreak.ca @ 2012-02-07 17:39:39 -->
