<?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>The Open Sourcerer &#187; OSLEC</title>
	<atom:link href="http://www.theopensourcerer.com/tag/oslec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theopensourcerer.com</link>
	<description>The Magic of Open Source</description>
	<lastBuildDate>Fri, 23 Jul 2010 17:11:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Book Review: Trixbox CE 2.6 from Packt</title>
		<link>http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=book-review-trixbox-ce-2-6-from-packt</link>
		<comments>http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 14:45:04 +0000</pubDate>
		<dc:creator>Alan Lord</dc:creator>
				<category><![CDATA[Runes and tales]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[OSLEC]]></category>
		<category><![CDATA[Packt]]></category>
		<category><![CDATA[Trixbox]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.theopensourcerer.com/?p=1221</guid>
		<description><![CDATA[[Please Note: If you use the book links from this site to Packt's and decide to buy *any* book from their site, we will get a small commission that we'll use towards the upkeep of our servers etc.] Following on the heels of the Asterisk AGI Programming book review, Packt asked me to take a [...]]]></description>
			<content:encoded><![CDATA[<p>[<em>Please Note: If you use the book links from this site to Packt's and decide to buy *any* book from their site, we will get a small commission that we'll use towards the upkeep of our servers etc.</em>]
<div class="clear"></div>
<div id="attachment_1128" class="wp-caption alignleft" style="width: 210px"><a href="http://www.packtpub.com/trixbox-ce-2.6/book/mid/17040987bj0j"><img src="http://www.theopensourcerer.com/wp-content/uploads/2009/05/trixbox-ce.jpg" alt="Trixbox CE 2.6" title="Trixbox CE 2.6" width="200" height="247" class="size-full wp-image-1128" /></a><p class="wp-caption-text">Trixbox CE 2.6</p></div>
<p>Following on the heels of the <a href="http://www.theopensourcerer.com/2009/04/16/asterisk-agi-programming-with-packt/">Asterisk AGI Programming</a> book review, <a href="http://www.packtpub.com/">Packt</a> asked me to take a look at this one.</p>
<p><a href="http://www.trixbox.org/">trixbox</a> itself is a &#8220;packaged solution&#8221; comprising the operating system, Asterisk and a back-end/front-end configuration tool based on FreePBX. Personally, I&#8217;m from the &#8220;old school&#8221; when it comes to applications and I do like to know what makes them tick. So with Asterisk for example, when I first started looking at it I wanted to try and understand the configuration files and how it really worked so I installed from source and built everything from scratch. trixbox CE (Community Edition) on the other hand provides a user-friendly front end to Asterisk and wraps the whole thing up with an OS and delivers the bundle as a free <a href="http://www.trixbox.org/downloads">download</a> which is a ready-to-run ISO.</p>
<p>I guess one downside to the appliance package like trixbox is that you are tied into using the vendor&#8217;s choice of OS (<a href="http://www.centos.org">CentOS</a> in this instance) rather than your own. However, there are several advantages too: you know it works, has been tested all together and is supported, to whatever extent the community provides, by the producer. Anyway, this post isn&#8217;t a plug for <a href="http://www.ubuntu.com">Ubuntu</a> or a review of the trixbox product itself. This is a review of a <strong>book about trixbox</strong>.</p>
<p>Before we get into the book though, for those who are unfamiliar with what trixbox is, their website tells us:</p>
<blockquote><p>Beginning in 2004 as Asterisk@Home, the trixbox® Community Edition (CE) telephony application platform is the open source software that has quickly become the most popular Asterisk®-based distribution in the world. trixbox CE combines the best of the open source telephony tools into one easy-to-install package, along with the trixbox dashboard which provides a web-based interface to configure and manage a complete IP-PBX system. The most flexible and customizable communications platform available, trixbox CE averages over 65,000 downloads a month.</p></blockquote>
<p>And the Wikipedia, in what must be one of the shortest pages in the entire Wikiverse, <a href="http://en.wikipedia.org/wiki/TrixBox">states</a>:</p>
<blockquote><p>Trixbox CE is 100% free and licensed under the GPLv2. Founding members of the trixbox CE project are Kerry Garrison and Andrew Gillis.</p>
<p>The trixbox CE brand is now owned by Fonality. Documentation, help and community forums can be found at www.trixbox.org</p></blockquote>
<p>So that&#8217;s what the book is supposed to be telling us about. Let&#8217;s see if does&#8230; </p>
<p>It is subtitled &#8220;Implementing, managing, and maintaining an Asterisk-based telephony system&#8221; and written by Kerry Garrison. It&#8217;s quite a hefty tome weighing in at around 300 pages and is produced with Packt&#8217;s professional and easy-to-read layout &amp; styling.</p>
<p><strong>Chapter 1</strong> is a brief introduction into the whole telephony scene covering subject such as what a PBX is. It then moves the reader toward an overview of the key features of Asterisk. For the most part the author has a good writing style and gets the information over with clarity. There is some good advice too; whilst obviously the author wants to explain why trixbox is the bees knees, he does make a very sensible comment early on:</p>
<blockquote><p>While trixbox CE does make using Asterisk dramatically easier, it is certainly a good idea to really get in and learn all you can about the Asterisk configuration files. The more you know about how the system works under the hood the easier it will be for you to troubleshoot problems and even add features to your systems that aren&#8217;t available in trixbox CE.</p></blockquote>
<p><strong>Chapter 2</strong> introduces the reader to trixbox itself:</p>
<ul>
<li>Going over some of it&#8217;s history,</li>
<li>briefly mentioning the commercial trixbox packages available from Fonality,</li>
<li>looking at the core components that make up trixbox</li>
<li>trixbox features with lots of screenshots</li>
<li>and what you will need to try out trixbox such as a PC, perhaps an analogue line card and a SIP phone.</li>
</ul>
<p>There are lots of URLs scattered about where necessary directing the reader to further sources of reading or links to relevant vendors and downloads etc. For someone who is getting started this is a good resource and introduction.</p>
<p><div id="attachment_1692" class="wp-caption alignright" style="width: 310px"><a href="http://www.theopensourcerer.com/wp-content/uploads/2009/08/trixbox-1.png"><img src="http://www.theopensourcerer.com/wp-content/uploads/2009/08/trixbox-1-300x187.png" alt="trixbox console after first boot" title="trixbox console after first boot" width="300" height="187" class="size-medium wp-image-1692" /></a><p class="wp-caption-text">trixbox console after first boot</p></div><br />
In <strong>Chapter 3</strong> we get shown how to install trixbox, even showing novice readers how to burn a CD if you happen to be unfortunate enough to be using Windows.</p>
<p>I followed this chapter through myself and installed trixbox CE 2.6 in a VirtualBox VM. The instructions were good with plenty of screenshots and comments guiding the reader through the process. (Just FYI, on my PC Lobsang, the entire install in a Virtual Machine took just about 3 minutes!. During the first boot up I noticed that it uses the excellent <a href="http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/">OSLEC echo canceller</a> by default. That&#8217;s a plus mark from me.)
<div class="clear"></div>
<p><div id="attachment_1695" class="wp-caption alignleft" style="width: 310px"><a href="http://www.theopensourcerer.com/wp-content/uploads/2009/08/trixbox-2.png"><img src="http://www.theopensourcerer.com/wp-content/uploads/2009/08/trixbox-2-300x172.png" alt="The trixbox status screen" title="The trixbox status screen" width="300" height="172" class="size-medium wp-image-1695" /></a><p class="wp-caption-text">The trixbox status screen</p></div><br />
Continuing through the chapter, after installing and doing a <code>yum update</code> we are guided to the browser interface of trixbox&#8230;</p>
<p>The rest of Chapter 3 explains the various screens and basic navigation techniques to get around. Once again, I&#8217;d say the book is comprehensive and has plenty of screenshots and comments.</p>
<p>I&#8217;m not going to write about every chapter because, to be honest, the rest of the book is equally well put together and covers the subject in detail. Chapters 3 to 11 are what a good manual would be like. Having digested these chapters, the reader will know a good deal of how (and perhaps more importantly <strong>why</strong>) to plan, select hardware, install, setup, configure and maintain a trixbox system. There is plenty of &#8220;extra&#8221; information thrown in that explains what various features or aspects of the system are for and how they work. References to external sources abound and other vendors are given a decent mention where appropriate. Simply put, it&#8217;s good. If you want to use or manage a trixbox CE system this book would be an excellent resource in my opinion.</p>
<p>The final part of the book, Chapters 12 to 17, provide somewhat more orthogonal, but nevertheless valuable, information. We get to find out a little about:</p>
<ul>
<li>troubleshooting techniques and also where else to go to learn further skills,</li>
<li>some of the additional trixbox utilities that are available like the endpoint manager,</li>
<li>the basics of designing a decent callflow for the IVR,</li>
<li>an introduction to a new end-user interface called HUD (Head Up Display),</li>
<li>and an overview of the commercial trixbox Pro products.</li>
</ul>
<p>In summary then, this is another good book from Packt that hits all the right buttons. It is well written, very detailed, and has good explanations of technologies and applications related to IP telephony. </p>
<p>As to it&#8217;s main purpose, that is explaining how to deploy and use trixbox CE, in my opinion this what a decent product manual should be like.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Tell Someone Else!</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/&amp;title=Book+Review%3A+Trixbox+CE+2.6+from+Packt" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Del.icio.us"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Del.icio.us" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/&amp;title=Book+Review%3A+Trixbox+CE+2.6+from+Packt" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to digg"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to digg" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Technorati"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Technorati" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/&amp;title=Book+Review%3A+Trixbox+CE+2.6+from+Packt" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Stumble Upon"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Stumble Upon" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Bloglines"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/bloglines.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Bloglines" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to Bloglines" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Book+Review%3A+Trixbox+CE+2.6+from+Packt&amp;url=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to SlashDot"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to SlashDot" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to SlashDot" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/&amp;t=Book+Review%3A+Trixbox+CE+2.6+from+Packt" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to FaceBook"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to FaceBook" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Book+Review%3A+Trixbox+CE+2.6+from+Packt&amp;c=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to MySpace"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to MySpace" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Twitter"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Book Review: Trixbox CE 2.6 from Packt' to Twitter" alt="Add 'Book Review: Trixbox CE 2.6 from Packt' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.theopensourcerer.com/2009/08/06/book-review-trixbox-ce-2-6-from-packt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]</title>
		<link>http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=asterisk-zaptel-oslec-and-ubuntu-server</link>
		<comments>http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 18:03:20 +0000</pubDate>
		<dc:creator>Alan Lord</dc:creator>
				<category><![CDATA[Runes and tales]]></category>
		<category><![CDATA[The Open Learning Centre]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[low power server]]></category>
		<category><![CDATA[OSLEC]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[zaptel]]></category>

		<guid isPermaLink="false">http://www.theopensourcerer.com/?p=833</guid>
		<description><![CDATA[I have recently migrated my server at home from a custom Linux build to Ubuntu Server (8.10 Intrepid). The main migration went very smoothly and I learned a few new tricks on the way too. One function the server performs is as my telephone system for work and home. It runs Asterisk. I have a [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently migrated my server at home from a custom Linux build to Ubuntu Server (8.10 Intrepid). The main migration went very smoothly and I learned a few <a href="http://www.theopensourcerer.com/2009/02/09/bashscripting-snippets/">new tricks</a> on the way too.</p>
<p>One function the server performs is as my telephone system for work and home. It runs <a href="http://www.asterisk.org/" target="_blank">Asterisk</a>. I have a couple of <a href="http://en.wikipedia.org/wiki/Inter-Asterisk_eXchange" target="_blank">IAX2</a> trunks from our VOIP provider for mine and my wife&#8217;s businesses and I also have a cheap <a href="http://www.voip-info.org/wiki/view/X100P+clone" target="_blank">x100p</a> clone analogue card for PSTN backup purposes. On my old system software, I had compiled the device drivers (zaptel) and kernel modules for the card manually and used a, frankly fantastic, echo canceller called <a href="http://www.rowetel.com/ucasterisk/oslec.html" target="_blank">Oslec</a> (the Open Source Line Echo Canceller). You can read the couple of posts I made about when I first tried it out <a href="http://www.theopensourcerer.com/?s=oslec">here</a>.</p>
<p>On my new server OS, I installed the Asterisk server via Ubuntu&#8217;s package management system <code>sudo apt-get install asterisk</code>. After some digging around on the &#8216;net (and it wasn&#8217;t obvious) I discovered that the zaptel drivers (for the PSTN hardware) need to be installed slightly differently:</p>
<p><del><code>sudo m-a -t build zaptel</code> Which retrieves the zaptel package and builds it for your running kernel.</del> You might have to run <code>m-a prepare</code> in advance of this to retrieve your Linux kernel headers.</p>
<p>The m-a (Module Assistant) command will compile and create a <code>.deb</code> package in the <code>/usr/src</code> directory. On my system the package was called <code>zaptel-modules-2.6.27-11-server_1.4.11~dfsg-2+2.6.27-11.27_i386.deb</code>.</p>
<p><del>It can then be installed using dpkg: <code>sudo dpkg -i zaptel-modules-2.6.27-11-server_1.4.11~dfsg-2+2.6.27-11.27_i386.deb</code>.</del></p>
<p>This went fine and I had read on <a href="https://launchpad.net/ubuntu/+source/zaptel" target="_blank">launchpad</a> that as of an earlier version of the zaptel package the Oslec echo canceller was now the default. Unfortunately this didn&#8217;t quite work as I expected. The zaptel module was in fact using the standard MG2 EC which is not very good with my x100p card at all.</p>
<p>After a bit more digging around in the source code, there is a file in the zaptel package called zconfig.h which is where the chosen EC is defined. It is specified as MG2 in the package. <del datetime="2009-02-13T10:10:44+00:00">What I did to fix it was as follows.</del></p>
<ul>
<li><del>Unpack the <code>zaptel.tar.bz2</code> package that was in <code>/usr/src</code>.</del></li>
<li><del>Edit the <code>kernel/zconfig.h</code> file so the line <code>#define ECHO_CAN_MG2</code> is commented out</del></li>
<li><del>and added in a line that reads <code>#define ECHO_CAN_OSLEC</code> instead.</del></li>
<li><del>Re-assemble the zaptel package: <code>sudo tar jcvf zaptel.tar.bz2 modules</code> (&#8220;modules&#8221; is the directory name where the zaptel package extracts to).</del></li>
<li><del>Delete the existing zaptel-blah-blah.deb file and the modules directory too.</del></li>
<li><del>Re-run the <code>m-a -t build zaptel</code> command.</del></li>
</ul>
<p><strong>Thanks to Tzafir Cohen on the asterisk mailing list for this.</strong> There is a far simpler method to use for the time being although this is a known bug and is now fixed in the development tree so I guess it will be unnecessary once the package has been updated. Do please check first if you are following this in the months to come. Anyway, instead of the commands above, these commands work for me and are far simpler:</p>
<p><code>sudo m-a -f get zaptel-source</code> This simply gets the source package and saves it in <code>/usr/src</code>.<br />
<code>sudo ECHO_CAN_NAME=OSLEC m-a -t a-i zaptel</code> And this builds and installs the modules and tells the build scripts to choose the Oslec EC by default. The <code>-t</code> switch puts the command into text mode so you actually see what is going on. I find the process rather opaque and uninformative without this switch. </p>
<p>After rebuilding, the zaptel module now requires, and loads the Oslec EC by default. The command <code>modinfo zaptel</code> is a good test. The output of it should be something like this:</p>
<p><code>filename:          /lib/modules/2.6.27-11-server/misc/zaptel.ko<br />
version:            1.4.11<br />
license:            GPL<br />
description:      Zapata Telephony Interface<br />
author:             Mark Spencer &lt;markster@digium.com&gt;<br />
srcversion:       4433ADDE0493C798A455677<br />
depends:          oslec,crc-ccitt<br />
vermagic:         2.6.27-11-server SMP mod_unload modversions 686<br />
parm:               debug:int<br />
parm:               deftaps:int</code></p>
<p>Note the &#8220;depends&#8221; line. </p>
<p>You could also type <code>lsmod | grep 'zaptel'</code> once you have reloaded your server:</p>
<p><code>zaptel                199844  5 wcfxo<br />
oslec                  16668  1 zaptel<br />
crc_ccitt              10112  1 zaptel</code></p>
<p>This command shows the oslec ec module installed along with the the zaptel and wcfxo drivers.</p>
<p>One final point to note. If you just want to load a particular telephony hardware driver and not all of them, I think you need a file <code>/etc/default/zaptel</code> like this with the relevant driver(s) uncommented:</p>
<p><code>TELEPHONY=yes<br />
DEBUG=yes</p>
<p># Un-comment as per your requirements; modules to load/unload<br />
#Module Name                      Hardware</p>
<p>#MODULES="$MODULES tor2"            # T400P - Quad Span T1 Card<br />
                                                           #E400P - Quad Span E1 Card</p>
<p>#MODULES="$MODULES wct4xxp"      # TE405P - Quad Span T1/E1 Card (5v version)<br />
                                                           # TE410P - Quad Span T1/E1 Card (3.3v version)<br />
#wct4xxp_ARGS="t1e1override=15"       # Additional parameters for TE4xxP driver</p>
<p>#MODULES="$MODULES wct1xxp"       # T100P - Single Span T1 Card<br />
                                                            # E100P - Single Span E1 Card</p>
<p>#MODULES="$MODULES wcte11xp"      # TE110P - Single Span T1/E1 Card</p>
<p>#MODULES="$MODULES wctdm24xxp"  # TDM2400P - Modular FXS/FXO interface (1-24 ports)</p>
<p>MODULES="$MODULES wcfxo"              # X100P - Single port FXO interface<br />
                                                              # X101P - Single port FXO interface </p>
<p>#MODULES="$MODULES wctdm"           # TDM400P - Modular FXS/FXO interface (1-4 ports)</code></p>
<p>I can&#8217;t recall the exact origins of this file and whether or not it is really necessary, but I had it on my old system and the Ubuntu provided zaptel init script checks for it&#8217;s presence; although it doesn&#8217;t look like it does much with its contents though&#8230;</p>
<p>Hopefully this will help others and also act as a bit of an aide memoir for me when I next build an Ubuntu server with Asterisk.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Tell Someone Else!</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/&amp;title=Asterisk%2C+Zaptel%2C+Oslec+and+Ubuntu+Server+%5BUpdated%5D" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Del.icio.us"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Del.icio.us" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/&amp;title=Asterisk%2C+Zaptel%2C+Oslec+and+Ubuntu+Server+%5BUpdated%5D" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to digg"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to digg" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Technorati"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Technorati" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/&amp;title=Asterisk%2C+Zaptel%2C+Oslec+and+Ubuntu+Server+%5BUpdated%5D" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Stumble Upon"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Stumble Upon" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Bloglines"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/bloglines.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Bloglines" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Bloglines" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Asterisk%2C+Zaptel%2C+Oslec+and+Ubuntu+Server+%5BUpdated%5D&amp;url=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to SlashDot"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to SlashDot" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to SlashDot" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/&amp;t=Asterisk%2C+Zaptel%2C+Oslec+and+Ubuntu+Server+%5BUpdated%5D" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to FaceBook"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to FaceBook" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Asterisk%2C+Zaptel%2C+Oslec+and+Ubuntu+Server+%5BUpdated%5D&amp;c=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to MySpace"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to MySpace" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Twitter"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Twitter" alt="Add 'Asterisk, Zaptel, Oslec and Ubuntu Server [Updated]' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.theopensourcerer.com/2009/02/12/asterisk-zaptel-oslec-and-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Source Cars and More</title>
		<link>http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=open-source-cars-and-more</link>
		<comments>http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 19:58:49 +0000</pubDate>
		<dc:creator>Alan Lord</dc:creator>
				<category><![CDATA[FLOSS in the news]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[low power server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OSLEC]]></category>

		<guid isPermaLink="false">http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/</guid>
		<description><![CDATA[I love this article on zdnet from David Greenfield. It&#8217;s a round-up of what&#8217;s happening in the up and coming area of Open Source Hardware. According to David, A burgeoning trend in open source hardware is putting up some devices on the Web — from machines that make anything (including themselves) to cars — with [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://blogs.zdnet.com/Greenfield/?p=174">this article</a> on zdnet from David Greenfield. It&#8217;s a round-up of what&#8217;s happening in the up and coming area of Open Source Hardware. According to David,</p>
<blockquote><p>A burgeoning trend in open source hardware is putting up some devices on the Web — from machines that make anything (including themselves)  to cars — with the specs to make them yourself (See our list below). While still in its infancy, the trend could redefine hardware cost models much as its done for software.</p></blockquote>
<p>And there are some neat really ideas like this one which I have been following myself for a while:</p>
<blockquote><p>Now that you’ve got Asterisk, what hardware platform will you run the software on? Usually folk settle on a Intel or AMD based-server of one kind or another. You can <a href="http://www.astfin.org/">build your own PBX hardware</a> with the Astfin Project or buy one for just $450 from <a href="http://www.rowetel.com/ucasterisk/store.html">the Free Telephony Project</a> store.</p></blockquote>
<p>This Asterisk appliance project has the chap who wrote the brilliant Open Source Echo Canceller I <a title="OSLEC" href="http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/">mentioned before</a> in it.</p>
<p>But how about your own, Open Source Car&#8230;</p>
<blockquote><p>Open Source isn’t just for your office. The <a href="http://www.theoscarproject.org/">OScar</a> aims to be the first open source automobile. The goal is to create a utilitarian car that aims to move people from place-to-place sans a lot of the high-tech gadgetry that runs in today cards. Initial concepts call for a four-door, four meter length vehicle weighing about 1000 Kilo capable of reaching 145 KM/hour.</p></blockquote>
<p>Cool &#8211; just the thing to keep a man happy and content in his shed for months. <img src='http://www.theopensourcerer.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Tell Someone Else!</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/&amp;title=Open+Source+Cars+and+More" title="Add 'Open Source Cars and More' to Del.icio.us"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Open Source Cars and More' to Del.icio.us" alt="Add 'Open Source Cars and More' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/&amp;title=Open+Source+Cars+and+More" title="Add 'Open Source Cars and More' to digg"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Open Source Cars and More' to digg" alt="Add 'Open Source Cars and More' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/" title="Add 'Open Source Cars and More' to Technorati"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Open Source Cars and More' to Technorati" alt="Add 'Open Source Cars and More' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/&amp;title=Open+Source+Cars+and+More" title="Add 'Open Source Cars and More' to Stumble Upon"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Open Source Cars and More' to Stumble Upon" alt="Add 'Open Source Cars and More' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/" title="Add 'Open Source Cars and More' to Bloglines"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/bloglines.png" title="Add 'Open Source Cars and More' to Bloglines" alt="Add 'Open Source Cars and More' to Bloglines" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Open+Source+Cars+and+More&amp;url=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/" title="Add 'Open Source Cars and More' to SlashDot"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Open Source Cars and More' to SlashDot" alt="Add 'Open Source Cars and More' to SlashDot" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/&amp;t=Open+Source+Cars+and+More" title="Add 'Open Source Cars and More' to FaceBook"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Open Source Cars and More' to FaceBook" alt="Add 'Open Source Cars and More' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Open+Source+Cars+and+More&amp;c=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/" title="Add 'Open Source Cars and More' to MySpace"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Open Source Cars and More' to MySpace" alt="Add 'Open Source Cars and More' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/" title="Add 'Open Source Cars and More' to Twitter"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Open Source Cars and More' to Twitter" alt="Add 'Open Source Cars and More' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.theopensourcerer.com/2008/01/06/open-source-cars-and-more/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)</title>
		<link>http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec</link>
		<comments>http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 21:27:19 +0000</pubDate>
		<dc:creator>Alan Lord</dc:creator>
				<category><![CDATA[Runes and tales]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[low power server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OSLEC]]></category>

		<guid isPermaLink="false">http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/</guid>
		<description><![CDATA[O.K. I said I&#8217;d write a bit about an excellent new echo canceller which happens to work with Asterisk. Here it is it&#8217;s called OSLEC the Open Source Line Echo Canceller and it&#8217;s written by a chap called David Rowe. As readers may recall, I&#8217;ve built a small home server (VIA CN700) on which I [...]]]></description>
			<content:encoded><![CDATA[<p>O.K. I said I&#8217;d write a bit about an excellent new echo canceller which happens to work with Asterisk. <a title="OSLEC - Open Source Echo Canceller" href="http://www.rowetel.com/ucasterisk/oslec" target="_blank">Here it is</a> it&#8217;s called OSLEC the <em><strong>Open Source Line Echo Canceller</strong></em> and it&#8217;s written by a chap called <a title="David Rowe's Blog" href="http://www.rowetel.com/blog/" target="_blank">David Rowe</a>.</p>
<p>As readers may recall, I&#8217;ve built a <a title="Picture of the server" href="http://www.theopensourcerer.com/wp-content/uploads/2007/09/img_5991.JPG" target="_blank">small home server</a> (VIA CN700) on which I plan to run Asterisk, Samba and Untangle. Samba is up and running and Asterisk is too. I have a single port, very cheap (about £15 inc postage from the USA) x100p card providing an interface to a normal analogue PSTN telephone line.</p>
<p>When we got everything working, we noticed a great deal of echo on voice calls over the x100p. Lots of playing with gains and various settings in the zaptel configuration failed to make any noticeable difference.</p>
<p>I came across <a title="OSLEC - Open Source Echo Canceller" href="http://www.rowetel.com/ucasterisk/oslec.html" target="_blank">this site</a> whilst looking for something completely different and started to read&#8230; It sounded like just the thing. A bit of jiggery and a quick patch to the zaptel-1.4.5.1 sources &#8211; thanks to the <a title="Patch to fix OSLEC on Zaptel-1.4.5.1" href="http://lists.digium.com/pipermail/asterisk-users/2007-October/199126.html" target="_blank">asterisk mailing list</a> &#8211; and I got the OSLEC canceller working.</p>
<p>Basically here&#8217;s what to do:</p>
<ol>
<li>Build the OSLEC module (it will need to find your kernel sources &#8211; just like zaptel) according to the instructions on the website. Once built and you&#8217;ve checked that you can install it by inserting the module into your running kernel, copy it (oslec.ko) to your kernel&#8217;s loadable module directory: on my system the zaptel modules reside in <code>/lib/modules/2.6.23/misc/</code> so that&#8217;s where I put the oslec module too.</li>
<li>Patch your zaptel source tree (if you have version 1.4.5.1 you will need to <a title="Patch to fix OSLEC on Zaptel-1.4.5.1" href="http://lists.digium.com/pipermail/asterisk-users/2007-October/199126.html" target="_blank">patch</a> <code>Makefile.kernel26</code> or OSLEC will never get loaded) and rebuild and re-install as described. (<em>Caution:</em> Backup your <code>/etc/zaptel.conf, /etc/asterisk/zapata.conf</code> and your modified SysV init scripts so you can simply overwrite the default files installed when you rerun <code>make install</code> on the zaptel sources.)</li>
<li>Edit your zapata.conf so the following are as below:<br />
<code>echocancel=yes<br />
echocancelwhenbridged=no<br />
;echotraining=400</code>
</li>
<li>Reload everything (if in doubt, stop asterisk and zaptel using your SysV init scripts, e.g # /etc/rc.d/init.d/{asterisk,zaptel} stop. Then start them again. When zaptel starts you should see a message saying Echo canceller OSLEC or something like that; if it says MG2 then it isn&#8217;t working so you need to go back and recheck your build and patching and module loading.</li>
</ol>
<p>That&#8217;s it.</p>
<p>Now make or receive a call through your cheap x100p card and marvel at the clear echo free sound! It worked brilliantly for me. Of course YMMV but it is definitely worth a try. Most of the reports on the &#8216;net are incredibly positive about this.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Tell Someone Else!</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/&amp;title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7.1+%28OSLEC%29" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Del.icio.us"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Del.icio.us" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/&amp;title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7.1+%28OSLEC%29" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to digg"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to digg" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Technorati"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Technorati" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/&amp;title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7.1+%28OSLEC%29" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Stumble Upon"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Stumble Upon" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Bloglines"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/bloglines.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Bloglines" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Bloglines" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7.1+%28OSLEC%29&amp;url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to SlashDot"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to SlashDot" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to SlashDot" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/&amp;t=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7.1+%28OSLEC%29" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to FaceBook"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to FaceBook" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7.1+%28OSLEC%29&amp;c=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to MySpace"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to MySpace" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Twitter"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Twitter" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7.1 (OSLEC)' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-71-oslec/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Untangle, Asterisk PBX and File Server; All-in-One. Part 7</title>
		<link>http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=untangle-asterisk-pbx-and-file-server-all-in-one-part-7</link>
		<comments>http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 12:39:17 +0000</pubDate>
		<dc:creator>Alan Lord</dc:creator>
				<category><![CDATA[Runes and tales]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[low power server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OSLEC]]></category>

		<guid isPermaLink="false">http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/</guid>
		<description><![CDATA[There&#8217;s no Untangle in this installment &#8211; I&#8217;m awaiting a new kernel from the developers before I can get any further; it should be here shortly however. In the previous article of this series I mentioned that I&#8217;d explain how to get Asterisk built and running as a non-root user. It wasn&#8217;t too hard to [...]]]></description>
			<content:encoded><![CDATA[<p><em>There&#8217;s no Untangle in this installment &#8211; I&#8217;m awaiting a new kernel from the developers before I can get any further; it should be here shortly however. </em></p>
<p>In the <a title="Part 6" href="http://www.theopensourcerer.com/2007/10/11/untangle-asterisk-pbx-and-file-server-all-in-one-part-6/">previous article</a> of this series I mentioned that I&#8217;d explain how to get Asterisk built and running as a non-root user. It wasn&#8217;t too hard to be honest but I&#8217;ll document it anyway.</p>
<p>The problem: Asterisk by default, when compiled from source, expects to be run as root. For userspace applications, this is <strong>NEVER</strong> a good idea in my opinion. After all we&#8217;re running on a multi user system that can support non-root processes &#8211; unlike Windows &#8211; so we really should&#8230; <img src='http://www.theopensourcerer.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The solution for Asterisk-1.4.13 on my <a title="Linux From Scratch" href="http://www.linuxfromscratch.org" target="_blank">LFS</a> based system, is as follows:</p>
<p>Build any hardware add-ons and codecs you need <em>before</em> building Asterisk. I built the Zaptel module for my x100p card and the <a title="Speex.org" href="http://www.speex.org/" target="_blank">Speex</a> Open Source VBR codec. The zaptel module needs to find your kernel source tree (usually in /usr/src/linux-2.6.x.x). To build the zaptel source:</p>
<p><code>./configure --prefix=/usr<br />
make menuselect</code> (to select/deselect the modules you wish to build)<br />
<code>make</code></p>
<p>then as root:</p>
<p><code>make install</code></p>
<p>and optionally:</p>
<p><code>make config </code> This will install the SysV init scripts and some default configuration files. You may need to modify the init scripts depending on your system.</p>
<p>Simply follow a similar process for the Speex codec&#8230;</p>
<p>For Asterisk, start off by creating a group and user that will run and own the asterisk process and files (select {G,U}IDs and names that are appropriate for your system).</p>
<p><code>groupadd -g 75 asterisk<br />
useradd -c "Asterisk PBX" -d /var/lib/asterisk -g asterisk -s /bin/false -u 75 asterisk</code></p>
<p>Edit the Makefile in the top of the asterisk source tree so that the line:</p>
<p><code>ASTVARRUNDIR=${localstatedir}/run</code> becomes <code>ASTVARRUNDIR=${localstatedir}/run/asterisk</code></p>
<p>Then build as normal</p>
<p><code>./configure --prefix=/usr<br />
make menuselect</code> (Turn on/off various modules and options. Select sound files/language/format and extra sounds. Type &#8220;s&#8221; to save and exit)<br />
<code>make</code></p>
<p>Then as root:</p>
<p><code>make install</code></p>
<p>Asterisk is now installed. But because we will run the process as non-root it needs write permissions for these directories and their contents:</p>
<p><code>/var/lib/asterisk, /var/log/asterisk, /var/run/asterisk, /var/spool/asterisk, /dev/zap/*</code>.</p>
<p><em>If you installed the zaptel modules and used the &#8216;make config&#8217; command, a udev rules file (zaptel.rules) will be written to /etc/udev/rules.d. This enables, by default, udev to create the zaptel device files as user:group asterisk. If you chose another name above you will need to edit this file accordingly.</em></p>
<p>O.K., lets sort out the ownership and access to the files Asterisk needs. First change the owner:</p>
<p><code>chown -R asterisk:asterisk /var/{lib/asterisk,log/asterisk,run/asterisk,spool/asterisk}</code></p>
<p>Now set <em>read/write</em> only by owner, <em>read</em> only by group and <em>no</em> access by other:</p>
<p><code>chmod 750 /var/{lib/asterisk,log/asterisk,run/asterisk,spool/asterisk}<br />
chmod -R o= /var/{lib/asterisk,log/asterisk,run/asterisk,spool/asterisk}</code></p>
<p>This switch (<code>chmod -R o=</code>) is pretty cool by the way. It removes all access to all files and directories for the &#8220;other&#8221; classification, effectively setting them to &#8220;0&#8243; but does not change or overwrite any of the permissions for owner and/or group access.</p>
<p>The asterisk process itself only needs read permission for the configuration directory (<code>/etc/asterisk</code>) and its contents (almost<a href="#1"><sup>1</sup></a>):</p>
<p><code>chown -R root:asterisk /etc/asterisk<br />
chmod 750 /etc/asterisk<br />
chmod 640 /etc/asterisk/*</code></p>
<p>Some of Asterisk&#8217;s &#8216;.conf&#8217; files contain cleartext passwords and other potentially sensitive information. Setting the files as above permits <em>read/write</em> only by the user <strong>root</strong> and <em>read only</em> by members of the group <strong>asterisk</strong>.</p>
<p>That&#8217;s it basically.  When you start asterisk from the SysV init scripts, pass the following arguments to have it run, safely, as your new user:</p>
<p><code>asterisk ${DEBUG} ${ZAP_TIMING} -U ${USER} -G ${GROUP}</code></p>
<p>In my startup script, I&#8217;ve set those constants above to be:<br />
<code># If you want debug messages to the console and the logs switch the<br />
# comments below<br />
DEBUG=""<br />
#DEBUG="-d"</code><br />
<code># The user and group we created earlier<br />
GROUP="asterisk"<br />
USER="asterisk"</code><br />
<code># Use this if you want to limit the maximum number of simultaneous calls<br />
# to prevent system failure for example<br />
MAXCALLS=""<br />
#MAXCALLS="-m 20"</code><br />
<code># If you have a Zaptel card/timing source, enable it here<br />
#ZAP_TIMING=""<br />
ZAP_TIMING="-I"</code></p>
<p>That&#8217;s it.</p>
<p>When asterisk starts, it will run as the user and group defined above. In the next installment, I will write a bit about a fantastic new echo canceler which sorts out cheap x100p cards and makes them work properly&#8230; It&#8217;s really excellent.</p>
<p><em><a name="1"><strong>1</strong></a>. Except for voicemail.conf. When a user changes their pin asterisk writes these changes to the voicemail.conf file.</em></p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Tell Someone Else!</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/&amp;title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Del.icio.us"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Del.icio.us" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/&amp;title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to digg"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to digg" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Technorati"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Technorati" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/&amp;title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Stumble Upon"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Stumble Upon" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Bloglines"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/bloglines.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Bloglines" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Bloglines" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7&amp;url=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to SlashDot"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to SlashDot" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to SlashDot" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/&amp;t=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to FaceBook"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to FaceBook" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Untangle%2C+Asterisk+PBX+and+File+Server%3B+All-in-One.+Part+7&amp;c=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to MySpace"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to MySpace" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Twitter"><img src="http://www.theopensourcerer.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Twitter" alt="Add 'Untangle, Asterisk PBX and File Server; All-in-One. Part 7' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.theopensourcerer.com/2007/10/30/untangle-asterisk-pbx-and-file-server-all-in-one-part-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
