<?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>BarryODonovan.com &#187; Recipes</title>
	<atom:link href="http://www.barryodonovan.com/index.php/category/recipes/feed" rel="self" type="application/rss+xml" />
	<link>http://www.barryodonovan.com</link>
	<description>Thoughts, ramblings and rants...</description>
	<lastBuildDate>Wed, 18 Jan 2012 10:31:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Asterisk with SS7 via Wanpipe, Dahdi and libss7 – with ISUP SAM support</title>
		<link>http://www.barryodonovan.com/index.php/2012/01/12/asterisk-ss7-sam-support</link>
		<comments>http://www.barryodonovan.com/index.php/2012/01/12/asterisk-ss7-sam-support#comments</comments>
		<pubDate>Thu, 12 Jan 2012 08:05:08 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[My Links]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[asterisk chan_ss7]]></category>
		<category><![CDATA[chan_ss7]]></category>
		<category><![CDATA[dahdi ss7]]></category>
		<category><![CDATA[isup sam]]></category>
		<category><![CDATA[libss7]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[sam]]></category>
		<category><![CDATA[sangoma]]></category>
		<category><![CDATA[sangoma ss7]]></category>
		<category><![CDATA[ss7]]></category>
		<category><![CDATA[ss7 sam]]></category>
		<category><![CDATA[subsequent address message]]></category>
		<category><![CDATA[zaptel ss7]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=385</guid>
		<description><![CDATA[A howto on installing Asterisk with SS7 supported via libss7 on Sangoma hardware along with support for ISUP SAM messages. <a href="http://www.barryodonovan.com/index.php/2012/01/12/asterisk-ss7-sam-support">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After much head banging in bringing up an SS7 link with SAM support, I am documented what worked here.</p>
<p>Firstly, what is <em>SAM support</em>? One end of an SS7 link initialises a new call by sending an <em>Initial Address Message (IAM)</em>. All SS7 software stacks support this and usually it&#8217;s enough. One case where it&#8217;s not enough is when one wants to address a phone number with more than the E.164 standard max length of 16  (usually to pass additional information tacked on the start, end of or even replacing an A or B number). In this scenario, SS7 uses a <em>Subsequent Address Message (SAM)</em> to send the additional digits. Most / all mainstream Asterisk SS7 software stacks do not support this.</p>
<p>The platform and software used is as follows:</p>
<ul>
<li>Ubuntu 10.04 LTS standard CLI install;</li>
<li>dahdi-linux-complete-2.4.0 from the archives (<a title="dahdi-linux-complete-2.4.0" href="http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.4.0+2.4.0.tar.gz">direct link</a>);</li>
<li>a patched version of libss7 supporting SAM via SVN (see below);</li>
<li>a patched version of chan-dahdi via SVN (see below);</li>
<li>Asterisk 1.6.0.28 from the archives (<a href="http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.6.0.28.tar.gz">direct link</a>);</li>
<li>Asterisk Addons 1.6.0.6 from the archives (<a href="http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-addons-1.6.0.6.tar.gz">direct link</a>);</li>
<li>Sangoma Wanpipe 3.5.24 (<a href="ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.5.24.tgz">direct link</a>).</li>
</ul>
<p><strong>Yes, I know some of the above are obsolete. Unfortunately it&#8217;s what&#8217;s required for everything to play nicely together. And, guess what, it works!</strong></p>
<h3>Before You Start</h3>
<p>Ensure you have all the necessary packages for building the packages:</p>
<pre>apt-get install build-essential libnewt-dev subversion    \
   libsqlite3-dev libsnmp-dev bison libtool flex          \
   autoconf2.13 libmysqlclient-dev</pre>
<p>You can assume the working directory is <em>/usr/local/src</em> in the following.</p>
<h3>Installing dahdi-linux-complete</h3>
<p>Download and extract dahdi-linux-complete into /usr/local/src. Then, in the same directory, create some symbolic links:</p>
<pre>ln -s dahdi-linux-complete-2.4.0+2.4.0/linux dahdi-linux
ln -s dahdi-linux-complete-2.4.0+2.4.0/tools dahdi-tools</pre>
<p>Now build dahdi-linux:</p>
<pre>cd dahdi-linux
make
make install</pre>
<p>Now move onto dahdi-tools:</p>
<pre>cd dahdi-tools
./configure
make menuconfig # (and select tools or accept defaults)
make
make install
make config</pre>
<h3>Installing libss7</h3>
<p>There is a patched version of Digium&#8217;s libss7 referred to as <em>Attila&#8217;s libss7 </em>available via SVN. Download and install it:</p>
<pre>svn co https://observer.router.hu/repos_pub/libss7/trunk alibss7
cd alibss7
make
make install</pre>
<h3>Installing Asterisk</h3>
<p>Download and extract the Asterisk 1.6.0.28 package reference above.</p>
<pre>cd asterisk-1.6.0.28</pre>
<p>Now this next bit <strong>is very important and easy to miss</strong> - you also need a patched version of chan_dahdi.c that is compatible with the patched version of libss7. This is also available from SVN:</p>
<pre>svn co https://observer.router.hu/repos_pub/chan_dahdi/trunk achan_dahdi</pre>
<p>Then copy it to your Asterisk source:</p>
<pre>cp achan_dahdi/chan_dahdi.c asterisk-1.6.0.28/channels/chan_dahdi.c</pre>
<p>Now continue with the Asterisk installation:</p>
<pre>./configure
make menuconfig
make
make install
make samples
make config</pre>
<h3>Install Asterisk Addons (optional)</h3>
<p>Download and unpack the above referenced add ons package and build and install:</p>
<pre>cd asterisk-addons-1.6.0.6
./configure
make menuconfig
make
make install
make samples</pre>
<h3>Sangoma Wanpipe</h3>
<p>I&#8217;m using one of Sangoma&#8217;s E1 / T1 interface cards and so I need Wanpipe also. I&#8217;m using version 3.5.24 and preceed as follows after unpacking:</p>
<pre>cd wanpipe-3.5.24./Setup install</pre>
<p>During the install, follow these prompts:</p>
<ul>
<li>select option 2 =&gt; Asterisk/Dahdi Support;</li>
<li>enter path /usr/local/src/dahdi-linux (for Zaptel path prompt);</li>
<li>select defaults for everything else;</li>
<li>you DO want to install start-up scripts;</li>
<li>you DO to configure wanpipe devices for DAHDI;</li>
<li>you DO want to generate /etc/asterisk/chan_dahdi.conf and:
<ul>
<li>select E1 / T1 as appropriate;</li>
<li>select line framing and encoding;</li>
<li>choose clock source;</li>
<li>select <em>Zaptel/Dahdi &#8211; PRI CPE</em> as signalling;</li>
<li>select <em>National ISDN 2</em> as switch type;</li>
<li>do not enable hardware DTMF detection;</li>
<li>use all channels;</li>
<li>select dial plan context as appropriate;</li>
</ul>
</li>
<li>and continue for other ports as necessary;</li>
<li>finally, choose Save cfg: Stop Asterisk &amp; Wanpipe now</li>
<li>you would like wanrouter to start on system boot;</li>
<li>and you would like to execute &#8216;dahdi_cfg&#8217; each time wanrouter starts.</li>
</ul>
<h3>Configuration Steps</h3>
<p>We now need to set various options in Wanpipe, Dahdi and Asterisk for SS7 as it&#8217;s PRI/ISDN by default.</p>
<p>Edit all <em>/etc/wanpipe/wanpipeX.conf</em> files as necessary and change:</p>
<pre> TDMV_DCHAN              = 16</pre>
<p>to</p>
<pre>TDMV_DCHAN              = 0</pre>
<p>Now edit <em>/etc/dahdi/system.conf</em> and change (for example):</p>
<pre>span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
echocanceller=mg2,1-15,17-31
hardhdlc=16</pre>
<p>to</p>
<pre>span=1,1,0,ccs,hdb3,crc4
bchan=2-31
echocanceller=mg2,2-31
mtp2=1</pre>
<p>which of course assumes signalling is on channel 1. If you have voice only links, you might need something like:</p>
<pre>span=1,0,0,ccs,hdb3,crc4bchan=1-31
echocanceller=mg2,2-31</pre>
<p>Lastly, we need to configure Asterisk. Replace lines such as:</p>
<pre>;Sangoma A102 port 1 [slot:4 bus:5 span:1]
switchtype=national
context=from-pstn
group=0
echocancel=yes
signalling=pri_cpe
channel =&gt;1-15,17-31</pre>
<p>with an appropriate configuration. Mine follows below with some edits and <strong>some important notes at the end</strong>:</p>
<pre>;Sangoma A102 port 1 [slot:4 bus:5 span:1]
switchtype=national
context=from-pstn
group=0
echocancel=yes

signaling=ss7
ss7type=itu
ss7_called_nai=dynamic
ss7_calling_nai=dynamic
ss7_internationalprefix=00
ss7_nationalprefix=0
ss7_subscriberprefix=
ss7_unknownprefix=
linkset=1
pointcode=1
adjpointcode=2
defaultdpc=3
networkindicator=national_spare
cicbeginswith=2
channel=2-31
sigchan=1</pre>
<ul>
<li>Set <em>pointcode, adjpointcode and defaultdpc</em> as appropriate;</li>
<li>set <em>networkindicator</em> as appropriate and ensure it matches the other end (you can see what you’re being sent and what you’re sending via <em>ss7 debug</em>;</li>
<li><em>cicsbeginwith</em> is normally 1 but the telco on my end are starting at 2 – this was <em>groping in the dark</em> diagnostics and issues such as no audio, CICs not in service when both sides claim they are, etc may point to misaligned CICs;</li>
<li>make sure you have configured <em>from-pstn</em> or the appropriate context in your<em>extensions.conf</em>.</li>
</ul>
<h3>Confirming Your Link Is Up</h3>
<p>Now start wanrouter <em>(/etc/init.d/wanrouter start)</em>; dahdi <em>(/etc/init.d/dahdi start);</em> and Asterisk <em>(/etc/init.d/asterisk start)</em>. You should see your link come up via logs available with the <em>dmesg</em> command. Launch the Asterisk console and check the status of your links:</p>
<pre>ast-deg1-1*CLI&gt; ss7 show cics 1
  CIC   DPC  DAHDI        STATE   BLOCKING
    2    3      2         Idle
    3    3      3         Idle
    4    3      4         Idle
    5    3      5         Idle
    6    3      6         Idle
    7    3      7         Idle
    8    3      8         Idle
    9    3      9         Idle
   10    3     10         Idle
   11    3     11         Idle
   12    3     12         Idle
   13    3     13         Idle
   14    3     14         Idle
   15    3     15         Idle
   16    3     16         Idle
   17    3     17         Idle
   18    3     18         Idle
   19    3     19         Idle
   20    3     20         Idle
   21    3     21         Idle
   22    3     22         Idle
   23    3     23         Idle
   24    3     24         Idle
   25    3     25         Idle
   26    3     26         Idle
   27    3     27         Idle
   28    3     28         Idle
   29    3     29         Idle
   30    3     30         Idle
   31    3     31         Idle</pre>
<p>You should now be okay to make test calls.</p>
<h3>Do You Need Professional Support / Consultancy?</h3>
<p>While I will try to respond to comments and questions on this blog, I don’t have the time to provide one on one assistance pro-bono. Professional consultancy on Asterisk and SS7 is available worldwide through my company, <a href="http://www.opensolutions.ie/">Open Solutions</a> with <a href="http://www.opensolutions.ie/about-us/contact">contact details here</a>.</p>
<h3>References</h3>
<p>For posterity, I have added Domjan Attila patched libss7 and chan_dahdi to GitHub:</p>
<ul>
<li><a href="https://github.com/barryo/attila-libss7">https://github.com/barryo/attila-libss7</a></li>
<li><a href="https://github.com/barryo/attila-libss7-chan_dahdi">https://github.com/barryo/attila-libss7-chan_dahdi</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2012/01/12/asterisk-ss7-sam-support/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doctrine ORM &#8211; Find Many to Many Objects Without a Relationship</title>
		<link>http://www.barryodonovan.com/index.php/2011/03/09/doctrine-orm-find-many-to-many-objects-without-a-relationship</link>
		<comments>http://www.barryodonovan.com/index.php/2011/03/09/doctrine-orm-find-many-to-many-objects-without-a-relationship#comments</comments>
		<pubDate>Wed, 09 Mar 2011 19:28:30 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=294</guid>
		<description><![CDATA[Hmmm, does the title of this post make sense? Probably not but it&#8217;s not an easy concept to squeeze into a few words. Here&#8217;s the scenario, I have two tables A and B in Doctrine ORM with a many-to-many relationship &#8230; <a href="http://www.barryodonovan.com/index.php/2011/03/09/doctrine-orm-find-many-to-many-objects-without-a-relationship">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hmmm, does the title of this post make sense? Probably not but it&#8217;s not an easy concept to squeeze into a few words.</p>
<p>Here&#8217;s the scenario, I have two tables A and B in Doctrine ORM with a many-to-many relationship defined in table AB.</p>
<p>Now, I want to find all objects in A that do not have a relationship with an object in B via AB.</p>
<p>Here&#8217;s what I have:</p>
<pre>Doctrine_Query::create()
    -&gt;from( 'A a' )
    -&gt;leftJoin( 'A.AB ab' )
    -&gt;where( 'ab.id IS NULL' )
    -&gt;fetchArray()</pre>
<p>This works but is it the best way?</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2011/03/09/doctrine-orm-find-many-to-many-objects-without-a-relationship/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Querying for DNS Glue Records (using dig)</title>
		<link>http://www.barryodonovan.com/index.php/2011/02/16/querying-for-dns-glue-records</link>
		<comments>http://www.barryodonovan.com/index.php/2011/02/16/querying-for-dns-glue-records#comments</comments>
		<pubDate>Wed, 16 Feb 2011 15:45:29 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=268</guid>
		<description><![CDATA[On a project I&#8217;m working on, I need to establish if a domain has IPv6 glue records or not. If I had to do it on a once off, a whois lookup would answer that nicely: $ /usr/bin/whois opensolutions.ie &#60;snip&#62; &#8230; <a href="http://www.barryodonovan.com/index.php/2011/02/16/querying-for-dns-glue-records">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>On a project I&#8217;m working on, I need to establish if a domain has IPv6 glue records or not. If I had to do it on a once off, a <code>whois</code> lookup would answer that nicely:</p>
<pre>$ /usr/bin/whois opensolutions.ie
&lt;snip&gt;
nserver:     dns1.dns.opensolutions.ie 87.232.1.40 2a01:268:4::40
nserver:     dns2.dns.opensolutions.ie 87.232.1.41 2a01:268:4::41
nserver:     dns3.dns.opensolutions.ie 87.232.16.61 2a01:268:3002::61</pre>
<p>However, in this case, I will need to do it many times on many domains and do not need to have to worry about whois servers limiting the queries or parsing the output from different whois servers.</p>
<p>After some digging, it looks like the nameservers of TLDs return glue records in the additional section. Let&#8217;s look by example on opensolutions.ie. First, find the TLD servers for .ie:</p>
<pre>$ dig NS ie
&lt;snip&gt;
;; ANSWER SECTION:
ie.                     172800  IN      NS      gns1.domainregistry.ie.
ie.                     172800  IN      NS      uucp-gw-1.pa.dec.com.
ie.                     172800  IN      NS      uucp-gw-2.pa.dec.com.
ie.                     172800  IN      NS      ns3.ns.esat.net.
ie.                     172800  IN      NS      banba.domainregistry.ie.
ie.                     172800  IN      NS      ice.netsource.ie.
ie.                     172800  IN      NS      gns2.domainregistry.ie.
ie.                     172800  IN      NS      ns-ie.nic.fr.
ie.                     172800  IN      NS      b.iedr.ie.</pre>
<p>Now query one of these for the nameservers for opensolutions.ie:</p>
<pre>$ dig NS opensolutions.ie @banba.domainregistry.ie.
&lt;snip&gt;
;; AUTHORITY SECTION:
opensolutions.ie.       172800  IN      NS      dns3.dns.opensolutions.ie.
opensolutions.ie.       172800  IN      NS      dns2.dns.opensolutions.ie.
opensolutions.ie.       172800  IN      NS      dns1.dns.opensolutions.ie.

;; ADDITIONAL SECTION:
dns1.dns.opensolutions.ie. 172800 IN    A       87.232.1.40
dns1.dns.opensolutions.ie. 172800 IN    AAAA    2a01:268:4::40
dns2.dns.opensolutions.ie. 172800 IN    A       87.232.1.41
dns2.dns.opensolutions.ie. 172800 IN    AAAA    2a01:268:4::41
dns3.dns.opensolutions.ie. 172800 IN    A       87.232.16.61
dns3.dns.opensolutions.ie. 172800 IN    AAAA    2a01:268:3002::61</pre>
<p>As you can see, the authority section contains the nameservers for opensolutions.ie which are all on the opensolutions.ie domain. We then find the glue records for these nameservers in the additional section.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2011/02/16/querying-for-dns-glue-records/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing a User&#8217;s UID on Apple XServe / Snow Leopard</title>
		<link>http://www.barryodonovan.com/index.php/2010/12/14/changing-a-users-uid-on-apple-xserve-snow-leopard</link>
		<comments>http://www.barryodonovan.com/index.php/2010/12/14/changing-a-users-uid-on-apple-xserve-snow-leopard#comments</comments>
		<pubDate>Tue, 14 Dec 2010 13:42:18 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[uid]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=243</guid>
		<description><![CDATA[Due to exporting NFS file systems from Linux boxes to an XServe, I had need to match the new users&#8217; UID on the XServe to the Linux UIDs. Unfortunately this was not so obvious. There&#8217;s a good how-to here: http://www.inteller.net/notes/change-user-id-on-snow-leopard]]></description>
			<content:encoded><![CDATA[<p>Due to exporting NFS file systems from Linux boxes to an XServe, I had need to match the new users&#8217; UID on the XServe to the Linux UIDs. Unfortunately this was not so obvious.</p>
<p>There&#8217;s a good how-to here:</p>
<p><a href="http://www.inteller.net/notes/change-user-id-on-snow-leopard">http://www.inteller.net/notes/change-user-id-on-snow-leopard</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/12/14/changing-a-users-uid-on-apple-xserve-snow-leopard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irish Radio Stations on Linux</title>
		<link>http://www.barryodonovan.com/index.php/2010/10/21/irish-radio-stations-on-linux</link>
		<comments>http://www.barryodonovan.com/index.php/2010/10/21/irish-radio-stations-on-linux#comments</comments>
		<pubDate>Thu, 21 Oct 2010 09:40:14 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[internet radiio]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[newstalk]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[rte radio]]></category>
		<category><![CDATA[today fm]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=231</guid>
		<description><![CDATA[I&#8217;m a bit of a newstalk junky and like to have the radio on in the back ground. It&#8217;s quite painful jumping between websites and even more painful getting them all to work under Linux so I have some simple &#8230; <a href="http://www.barryodonovan.com/index.php/2010/10/21/irish-radio-stations-on-linux">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit of a newstalk junky and like to have the radio on in the back ground. It&#8217;s quite painful jumping between websites and even more painful getting them all to work under Linux so I have some simple Bash aliases for VLC and RTE Radio 1, Today FM and Newstalk:</p>
<pre>alias 2fm='cvlc http://dynamic.rte.ie/av/live/radio/2fm.asx'
alias newstalk='cvlc http://newstalk.fmstreams.com:8008/listen.pls'
alias rteradio1='cvlc http://dynamic.rte.ie/av/live/radio/radio1.asx'
alias todayfm='cvlc http://audiostore.todayfm.com/audio/todayfmIRL_64K.asx'</pre>
<p><strong>UPDATED 2011-02-07:</strong> 2FM added.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/10/21/irish-radio-stations-on-linux/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://dynamic.rte.ie/av/live/radio/radio1.asx" length="0" type="video/asf" />
<enclosure url="http://audiostore.todayfm.com/audio/todayfmIRL_64K.asx" length="203" type="video/asf" />
<enclosure url="http://dynamic.rte.ie/av/live/radio/2fm.asx" length="0" type="video/asf" />
		</item>
		<item>
		<title>Testing SPAM and Virus Filters</title>
		<link>http://www.barryodonovan.com/index.php/2010/10/04/testing-spam-and-virus-filters</link>
		<comments>http://www.barryodonovan.com/index.php/2010/10/04/testing-spam-and-virus-filters#comments</comments>
		<pubDate>Mon, 04 Oct 2010 12:57:31 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[clam]]></category>
		<category><![CDATA[clam anti-virus]]></category>
		<category><![CDATA[clam av]]></category>
		<category><![CDATA[content filtering]]></category>
		<category><![CDATA[eicar]]></category>
		<category><![CDATA[gtube]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mail filtering]]></category>
		<category><![CDATA[spam assassin]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=209</guid>
		<description><![CDATA[I&#8217;ve recently performed a complete upgrade of Open Solutions&#8217; mail servers and I&#8217;ve now moved onto doing likewise for one of our ISP customers with a lot of users. These retrofits include installing virus and SPAM filters to protect both &#8230; <a href="http://www.barryodonovan.com/index.php/2010/10/04/testing-spam-and-virus-filters">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently performed a complete upgrade of <a href="http://www.opensolutions.ie/">Open Solutions&#8217;</a> mail servers and I&#8217;ve now moved onto doing likewise for one of our ISP customers with a lot of users.</p>
<p>These retrofits include installing <a href="http://www.clamav.net/">virus</a> and <a href="http://spamassassin.apache.org/">SPAM</a> filters to protect both ourselves and the ISP customers but also to stop customers who have infected computers from spewing these emails out.</p>
<p>When everything&#8217;s up and appears to be working, I like to test both filtering systems to ensure they&#8217;re working. Quoting from <a href="http://eicar.org/">eicar</a>:</p>
<blockquote><p>Using real viruses for testing in the real world is rather like setting fire to the dustbin in your office to see whether the smoke detector is working. Such a test will give meaningful results, but with unappealing, unacceptable risks.</p></blockquote>
<p>Fortunately, test <em>files</em> exist for virus checkers and SpamAssassin:</p>
<ul>
<li>The EICAR standard anti-virus test file can be found <a href="http://eicar.org/anti_virus_test_file.htm">here</a>.</li>
<li>SpamAssassin created the GTUBE (Generic Test for Unsolicited Bulk Email) for the same purpose and this can be found <a href="http://spamassassin.apache.org/gtube/">here</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/10/04/testing-spam-and-virus-filters/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk SIP Brute Force Attacks on the Rise</title>
		<link>http://www.barryodonovan.com/index.php/2010/09/17/asterisk-sip-brute-force-attacks</link>
		<comments>http://www.barryodonovan.com/index.php/2010/09/17/asterisk-sip-brute-force-attacks#comments</comments>
		<pubDate>Fri, 17 Sep 2010 10:54:44 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[brute force]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[sip attacks]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=194</guid>
		<description><![CDATA[See my article on the company blog for a discussion on this, and a how to on using Fail2ban to help stop these attacks.]]></description>
			<content:encoded><![CDATA[<p>See my <a href="http://www.opensolutions.ie/blog/2010/09/sip-brute-force-attacks/">article on the company blog</a> for a discussion on this, and a how to on using Fail2ban to help stop these attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/09/17/asterisk-sip-brute-force-attacks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Streaming with Encryption under Linux</title>
		<link>http://www.barryodonovan.com/index.php/2010/08/30/http-streaming-with-encryption-under-linux</link>
		<comments>http://www.barryodonovan.com/index.php/2010/08/30/http-streaming-with-encryption-under-linux#comments</comments>
		<pubDate>Mon, 30 Aug 2010 13:00:45 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video encoding ffmpeg]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=165</guid>
		<description><![CDATA[For a customer of Open Solutions, we need to mass encode thousands of video files and also segment and encrypt them for use with Apple&#8217;s HTTP Streaming. (using Amazon EC2 instances for the leg work). The one piece of the &#8230; <a href="http://www.barryodonovan.com/index.php/2010/08/30/http-streaming-with-encryption-under-linux">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a customer of <a href="http://www.opensolutions.ie/">Open Solutions</a>, we need to mass encode thousands of video files and also segment and encrypt them for use with <a href="http://developer.apple.com/iphone/library/documentation/networkinginternet/conceptual/streamingmediaguide/introduction/introduction.html">Apple&#8217;s HTTP Streaming</a>. (using Amazon EC2 instances for the leg work). </p>
<p>The one piece of the jigsaw we were missing was encryption and after some work ourselves and with the help of a <a href="http://stackoverflow.com/questions/3010638/using-openssl-encryption-for-apples-http-live-streaming">stack<strong>overflow</strong></a> question, we have a working sequence of commands to successfully and compatibly encrypt segments for playback on Safari and other supported HTTP streaming clients.</p>
<p>Head on over to <a href="http://www.opensolutions.ie/blog/2010/08/http-streaming-with-encryption-under-linux/">Open Solutions&#8217; blog</a> to read how we did it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/08/30/http-streaming-with-encryption-under-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encoding Video for the HTC Desire</title>
		<link>http://www.barryodonovan.com/index.php/2010/08/17/encoding-video-for-the-htc-desire</link>
		<comments>http://www.barryodonovan.com/index.php/2010/08/17/encoding-video-for-the-htc-desire#comments</comments>
		<pubDate>Tue, 17 Aug 2010 12:23:16 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[video encoding ffmpeg]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=139</guid>
		<description><![CDATA[A useful script to encode all files passed as parameters(s) for viewing on a HTC Desire. <a href="http://www.barryodonovan.com/index.php/2010/08/17/encoding-video-for-the-htc-desire">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m <a href="http://www.barryodonovan.com/index.php/2010/08/17/encoding-full-hd-as-flv-for-gallery3">writing about video encoding</a>, another task I did recently was encode a load of video files for my HTC Desire (a handset I&#8217;d strongly recommend for anyone). The main reason being that I like to watch something while pounding the threadmill in the gym.</p>
<p>A useful script to encode all files passed as parameters(s) (must all end in <code>.avi</code>) is:</p>
<pre>
#! /bin/bash

src="$*"
dst="_${*%%avi}mp4"

echo -en "Encoding $src\t\t\tPASS1"

ffmpeg -b 600kb -i "$src" -v 0 -pass 1 -passlogfile FF -vb 600Kb \
    -r 25 -an -threads 2 -y "$dst" </dev/null &#038;>/dev/null

echo -e "\tPASS2"

ffmpeg -b 600kb -i "$src" -v 0 -pass 2 -passlogfile FF -vb 600Kb \
    -r 25 -threads 2 -y -vol 1536 "$dst" </dev/null &#038;>/dev/null

rm FF-0.log
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/08/17/encoding-video-for-the-htc-desire/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encoding Full HD as FLV (for Gallery3)</title>
		<link>http://www.barryodonovan.com/index.php/2010/08/17/encoding-full-hd-as-flv-for-gallery3</link>
		<comments>http://www.barryodonovan.com/index.php/2010/08/17/encoding-full-hd-as-flv-for-gallery3#comments</comments>
		<pubDate>Tue, 17 Aug 2010 12:08:40 +0000</pubDate>
		<dc:creator>Barry O'Donovan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[gallery3]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[x264]]></category>

		<guid isPermaLink="false">http://www.barryodonovan.com/?p=120</guid>
		<description><![CDATA[I have a full HD camcorder and I wanted to stick some good quality video on my gallery for relatives to view. So, I needed to convert my sample 100MB MP4 full HD file to a suitably sized FLV for the Gallery. Here's what I did... <a href="http://www.barryodonovan.com/index.php/2010/08/17/encoding-full-hd-as-flv-for-gallery3">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have a very nice <a href="http://www.amazon.co.uk/gp/product/B0023W6QFQ/ref=oss_product">Samsung R10 Full HD Camcorder</a> which I bought last year. After a recent family holiday, I wanted to stick some good quality video on my <a href="http://gallery.barryodonovan.com/">gallery</a> for relatives to view. The gallery is RC2 of the excellent <a href="http://gallery.menalto.com/">Gallery 3</a> package which uses another excellent open source tool called <a href="http://flowplayer.org/">Flow Player</a> to play movies.</p>
<p>So, I needed to convert my test 100MB MP4 full HD file to a suitably sized FLV for the Gallery. My initial attempts with <em>ffmpeg</em> worked fine but the quality (<a href='http://www.barryodonovan.com/wp-content/uploads/2010/08/Test_vb600.flv'>sample</a>) was very poor and changing the bit rate in different ways seemed to make no difference:</p>
<pre>
ffmpeg -i HDV_0056.MP4 -vb 600k -s vga -ar 22050 -y Test.flv
ffmpeg -i HDV_0056.MP4 -b 600k -s vga -ar 22050 -y Test.flv
ffmpeg -i HDV_0056.MP4 -vb 600k -s vga -ar 22050 -y Test.flv
</pre>
<p>I then turned to <em>x264</em> and broke the process down to a number of stages:</p>
<ol>
<li> Extract the raw video to YUV4MPEG (this creates a 7GB file from my 100MB MP4):
<pre>ffmpeg -i HDV_0056.MP4 HDV_0056.y4m</pre>
</li>
<li> Encode the video component to H.264/FLV at the specified bit rate with good quality:
<pre>x264 --pass 1 --preset veryslow --threads 0 --bitrate 4000 \
        -o HDV_0056.flv HDV_0056.y4m
x264 --pass 2 --preset veryslow --threads 0 --bitrate 4000 \
        -o HDV_0056.flv HDV_0056.y4m</pre>
<p>Note that I&#8217;m using the <em>veryslow</em> preset which is&#8230; very slow! You can use other presets as explained in the <code>x264</code> man page.
</li>
<li> Extract and convert the audio component to MP3 (the sample rate is important):
<pre>ffmpeg -i HDV_0056.MP4 -vn -ar 22050 HDV_0056.mp3</pre>
</li>
<li> Merge the converted audio and video back together:
<pre>ffmpeg -i HDV_0056.flv -i HDV_0056.mp3 -acodec copy \
        -vcodec copy -y FullSizeVideo.flv</pre>
<p><strong>This yields a near perfect encoding at 22MB. It&#8217;s still full size though (HD at 1920&#215;1080).</strong>
</li>
<li> The last step is to then use <em>ffmpeg</em> to resize the video and it now seems to respect bit rate parameters:
<pre>ffmpeg -i FullSizeVideo.flv -s vga -b 2000k \
        -vb 2000k SmallSizeVideo.flv</pre>
</li>
</ol>
<p>The resultant video can be seen <a href="http://gallery.barryodonovan.com/index.php/France-August-2010/France-Frejus-Zoo-1297031143">here</a>.</p>
<p><a href="http://rob.opendot.cl/">Robert Swain</a> has a useful <a href="http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/">guide for ffmpeg x264 encoding</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryodonovan.com/index.php/2010/08/17/encoding-full-hd-as-flv-for-gallery3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://www.barryodonovan.com/wp-content/uploads/2010/08/Test_vb600.flv" length="6886225" type="video/x-flv" />
		</item>
	</channel>
</rss>

