<?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>whizzy.org</title>
	<atom:link href="http://www.whizzy.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whizzy.org</link>
	<description>On code and gadgets. And stuff I’ve seen on the telly</description>
	<lastBuildDate>Wed, 14 Dec 2011 14:57:28 +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>Overriding Outbound Dial Command Options</title>
		<link>http://www.whizzy.org/2011/09/overriding-outbound-dial-command-options/</link>
		<comments>http://www.whizzy.org/2011/09/overriding-outbound-dial-command-options/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 19:03:24 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[asterisk]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=365</guid>
		<description><![CDATA[I&#8217;ve previously noted that you can apply time limits to calls going out of your Asterisk box: http://www.whizzy.org/2011/02/more-asterisk-hints/ using the L(nnn,mmm,yyy) options for DIAL_TRUNK_OPTIONS. But, what if you don&#8217;t want to limit the length of calls for a specific trunk? Well, FreePBX has a context called [macro-dialout-trunk-predial-hook] which lets you jump in at the very [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve previously noted that you can apply time limits to calls going out of your Asterisk box:</p>
<p><a href="http://www.whizzy.org/2011/02/more-asterisk-hints/">http://www.whizzy.org/2011/02/more-asterisk-hints/</a></p>
<p>using the L(nnn,mmm,yyy) options for DIAL_TRUNK_OPTIONS. But, what if you don&#8217;t want to limit the length of calls for a specific trunk?</p>
<p>Well, FreePBX has a context called [macro-dialout-trunk-predial-hook] which lets you jump in at the very last moment and override any settings you like, which is perfect for this sort of thing.</p>
<p>I got the idea from here:</p>
<p><a href="http://www.freepbx.org/book/export/html/5893">http://www.freepbx.org/book/export/html/5893</a></p>
<p>I&#8217;ve added this to extensions_custom.conf:</p>
<pre>[macro-dialout-trunk-predial-hook]
 exten =&gt; s,1,NoOp(Trunk ${OUT_${DIAL_TRUNK}} selected)
 exten =&gt; s,n,Gotoif($["${OUT_${DIAL_TRUNK}}" != "SIP/TRUNK_NAME"]?skip)
 exten =&gt; s,n,NoOp(Setting DIAL_TRUNK_OPTIONS to Ww)
 exten =&gt; s,n,Set(DIAL_TRUNK_OPTIONS="Ww")
 exten =&gt; s,n(skip),MacroExit()</pre>
<p>Which tests the name of the trunk which is to be used and explicitly sets DIAL_TRUNK_OPTIONS if it matches, otherwise nothing happens. This is a very powerful feature and my extremely crude hack doesn&#8217;t do it justice. I wanted to make a note of this before I forgot.</p>
<p>A better way might be to look at the dial prefix? I&#8217;ll investigate that option, but for now that will have to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/09/overriding-outbound-dial-command-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NOOP scheduler &#8211; not worth it for SSD</title>
		<link>http://www.whizzy.org/2011/08/noop-scheduler-not-worth-it-for-ssd/</link>
		<comments>http://www.whizzy.org/2011/08/noop-scheduler-not-worth-it-for-ssd/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 09:45:33 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=359</guid>
		<description><![CDATA[I&#8217;ve got a new Thinkpad X220i with a 128GB SSD. Reading around the internet I found a lot of stuff about squeezing a bit more throughput from your drive. I did a couple of benchmarks in Ubuntu 11.04: Adding noatime,discard to /etc/fstab Result:  No change.  Not better or worse, but in theory the &#8220;discard&#8221; will [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a new Thinkpad X220i with a 128GB SSD.</p>
<p>Reading around the internet I found a lot of stuff about squeezing a bit more throughput from your drive.</p>
<p>I did a couple of benchmarks in Ubuntu 11.04:</p>
<ul>
<li>Adding noatime,discard to /etc/fstab</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Result:</strong></span>  No change.  Not better or worse, but in theory the &#8220;discard&#8221; will help in the long term</p>
<p><span style="text-decoration: underline;"><strong>Decision:</strong></span>  Switch this on.</p>
<ul>
<li>Setting the scheduler to noop in /etc/rc.local</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Result:</strong></span> Average read rate increased by 2MB/s but Average access time went from 0.2ms to 0.3 ms.  In itself that&#8217;s not a real problem, but the graphs show a different picture.</p>
<p><span style="text-decoration: underline;">Without NOOP</span></p>
<p>Note the scale on the right hand side.</p>
<p><a href="http://www.whizzy.org/wp-content/uploads/2011/08/without_noop.png"><img class="alignnone size-medium wp-image-362" title="without_noop" src="http://www.whizzy.org/wp-content/uploads/2011/08/without_noop-300x193.png" alt="" width="300" height="193" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;">With NOOP</span></p>
<p><a href="http://www.whizzy.org/wp-content/uploads/2011/08/with_noop.png"><img class="alignnone size-medium wp-image-361" title="with_noop" src="http://www.whizzy.org/wp-content/uploads/2011/08/with_noop-300x195.png" alt="" width="300" height="195" /></a></p>
<p>The access speed is all over the place.</p>
<p><span style="text-decoration: underline;"><strong>Decision:</strong></span>  Switch this off</p>
<p>&nbsp;</p>
<p>I&#8217;d be interested in hearing if your experience differs, but it seems to me that &#8220;Doing nothing&#8221; is a valid choice.  Ubuntu, out of the box, doesn&#8217;t really require any fettling in order to get the best from your SSD.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/08/noop-scheduler-not-worth-it-for-ssd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Off to pastures new</title>
		<link>http://www.whizzy.org/2011/07/off-to-pastures-new/</link>
		<comments>http://www.whizzy.org/2011/07/off-to-pastures-new/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 15:33:27 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=352</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.whizzy.org/wp-content/uploads/2011/07/tumblr_l56x4xU4ct1qzpwi0o1_400.jpg"><img class="alignnone size-medium wp-image-355" title="tumblr_l56x4xU4ct1qzpwi0o1_400" src="http://www.whizzy.org/wp-content/uploads/2011/07/tumblr_l56x4xU4ct1qzpwi0o1_400-207x300.jpg" alt="" width="207" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/07/off-to-pastures-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TCP sessions causing lag</title>
		<link>http://www.whizzy.org/2011/07/tcp-sessions-causing-lag/</link>
		<comments>http://www.whizzy.org/2011/07/tcp-sessions-causing-lag/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 12:06:33 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Making the world a better place]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=353</guid>
		<description><![CDATA[I like to play Call Of Duty online. I find it&#8217;s a really good way to get angry and frustrated at inanimate objects. I also run a Bit Torrent client on my network. I don&#8217;t suck at MW2 and I&#8217;m not too bad at Black Ops either, but on the PS3 Black Ops has been [...]]]></description>
			<content:encoded><![CDATA[<p>I like to play Call Of Duty online.  I find it&#8217;s a really good way to get angry and frustrated at inanimate objects. I also run a Bit Torrent client on my network.</p>
<p>I don&#8217;t suck at MW2 and I&#8217;m not too bad at Black Ops either, but on the PS3 Black Ops has been very unstable to the point of hanging the console.</p>
<p>Anyway, what really gets me cross is Lag.  You can tell a match is going to be laggy the second the game opens.  It feels as if you&#8217;re running through treacle.  &#8220;GET A MOVE ON&#8221; I scream.  And then it starts; you get shot while behind brick walls, your shots fail to connect even though &#8220;IT WAS CLEARLY A HEADSHOT WHY WONT YOU JUST DIE?&#8221;.  And so on.  You know what I&#8217;m talking about.</p>
<p>Originally I had a written a script to ping the PS3 and when it came online and tell Transmission to pause all the Torrents.  When the PS3 went offline again it would start them.  I thought this would be enough, but it isn&#8217;t.  Even with Transmission paused and the bandwidth limited to zero kBps it still maintains a connection to other peers.  </p>
<p>While this isn&#8217;t a significant amount of traffic over the WAN &#8211; it really does cause lag.  Presumably having something like 1000 NAT sessions in the memory of my router is a bit of a stretch, so now I simply kill Transmission when the PS3 comes online. It takes a few minutes for the sessions to get pruned but it&#8217;s made a noticeable difference to the quality of my matches.</p>
<p>Of course, you&#8217;re still at the mercy of the internet connection of whoever hosts the match &#8211; but that&#8217;s beyond your control.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/07/tcp-sessions-causing-lag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trimming Freesat Channels In MythTV</title>
		<link>http://www.whizzy.org/2011/06/trimming-freesat-channels-in-mythtv/</link>
		<comments>http://www.whizzy.org/2011/06/trimming-freesat-channels-in-mythtv/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 12:42:58 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Making the world a better place]]></category>
		<category><![CDATA[tv]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=342</guid>
		<description><![CDATA[There are loads and loads of free-to-air channels available on the Astra 28 constellation, the vast majority of which I do not watch. So to make things a bit easier for me after a full re-scan, I&#8217;ve put together a list of the channels I don&#8217;t watch and with a tiny bit of SQL I [...]]]></description>
			<content:encoded><![CDATA[<p>There are loads and loads of free-to-air channels available on the Astra 28 constellation, the vast majority of which I do not watch.</p>
<p>So to make things a bit easier for me after a full re-scan, I&#8217;ve put together a list of the channels I don&#8217;t watch and with a tiny bit of SQL I can trim them from my channel list.</p>
<p>To make things a bit easier for <em>you</em> here is a SQL dump of my &#8220;unwatched channels&#8221; list:</p>
<p><a title="Unwatched Channels" href="http://www.whizzy.org/wp-content/uploads/2011/12/unwatched_channels.sql_.txt">unwatched_channels</a></p>
<p>And here is the SQL to trim these from your channel list:</p>
<p><code>update channel set visible=0,useonairguide=0 where name in (select name from unwatched_channels)</code></p>
<p>You&#8217;ll probably want to edit that list yourself to remove and add the channels as you prefer. Generally speaking, my list trims:</p>
<ul>
<li>Regional variations</li>
<li>Specialist interest</li>
<li>Shopping</li>
<li>Games and other text based services</li>
</ul>
<p>I&#8217;ll update this list occasionally, this page will always have my most up to date information.</p>
<ul>
<li>UPDATE: 6 Sept 11.  Refreshed channel list</li>
<li>UPDATE: 8 Oct 11. Refreshed channel list</li>
<li>UPDATE: 14 Dec 2011.  Refreshed channel list</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/06/trimming-freesat-channels-in-mythtv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maggy Scraggle Loves The Beautiful Ice-cream Man</title>
		<link>http://www.whizzy.org/2011/04/maggy-scraggle-loves-the-beautiful-ice-cream-man/</link>
		<comments>http://www.whizzy.org/2011/04/maggy-scraggle-loves-the-beautiful-ice-cream-man/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 09:07:21 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=334</guid>
		<description><![CDATA[&#160; I was fortunate enough to be introduced to this book by my wife reading it to our son.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.whizzy.org/wp-content/uploads/2011/04/11.jpg"><img class="alignnone size-medium wp-image-332" title="1" src="http://www.whizzy.org/wp-content/uploads/2011/04/11-300x235.jpg" alt="" width="300" height="235" /></a></p>
<p>&nbsp;</p>
<p>I was fortunate enough to be introduced to this book by my wife reading it to our son.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/04/maggy-scraggle-loves-the-beautiful-ice-cream-man/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Asterisk hints</title>
		<link>http://www.whizzy.org/2011/02/more-asterisk-hints/</link>
		<comments>http://www.whizzy.org/2011/02/more-asterisk-hints/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 19:21:08 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=322</guid>
		<description><![CDATA[Wow &#8211; a day of fixing loads of niggling little Asterisk problems! Max duration My calling plan gives me unlimited free calls as long as those calls are under an hour in duration. Pretty standard BT stuff. If you do make a call over an hour you don&#8217;t just get charged for that bit of [...]]]></description>
			<content:encoded><![CDATA[<p>Wow &#8211; a day of fixing loads of niggling little Asterisk problems!</p>
<ul>
<li>Max duration</li>
</ul>
<p>My calling plan gives me unlimited free calls as long as those calls are under an hour in duration.  Pretty standard BT stuff.  If you do make a call over an hour you don&#8217;t just get charged for that bit of the call over the hour, oh no, you get charged for the whole call.<br />
Anyway &#8211; we have the technology to defeat them!</p>
<p>In FreePBX under General Settings change your Asterisk Outbound Dial command options to include:</p>
<pre>L(3360000,3240000,10000)</pre>
<p>which will drop the call after 3360000ms (56 minutes) and should alert you at 3240000ms.</p>
<ul>
<li>Courtesy Tone</li>
</ul>
<p>The above works very well and drops the calls, but without a bit of extra magic you don&#8217;t get the warning in your ear &#8211; it just drops the call.  To enable the warning tones etc edit this:</p>
<pre>/etc/asterisk/features_general_custom.conf</pre>
<p>and add</p>
<pre>courtesytone=beep</pre>
<p>substituting &#8220;beep&#8221; for what ever noise you want to hear.</p>
<ul>
<li>Call Recording</li>
</ul>
<p>By also adding:</p>
<pre>Ww</pre>
<p>to the Dial command options in #1 you can press *1 when you&#8217;re in a call to start recording.  It plays the courtesy tone to both parties though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/02/more-asterisk-hints/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Meridian Mail</title>
		<link>http://www.whizzy.org/2011/02/meridian-mail/</link>
		<comments>http://www.whizzy.org/2011/02/meridian-mail/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 17:34:26 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=320</guid>
		<description><![CDATA[Has anyone got a WAV or similar of the lady from Nortel saying &#8220;Meridian Mail. Mailbox?&#8221;]]></description>
			<content:encoded><![CDATA[<p>Has anyone got a WAV or similar of the lady from Nortel saying &#8220;Meridian Mail.  Mailbox?&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/02/meridian-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>g729 in Asterisk</title>
		<link>http://www.whizzy.org/2011/02/g729-in-asterisk/</link>
		<comments>http://www.whizzy.org/2011/02/g729-in-asterisk/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 17:29:25 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[asterisk]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=317</guid>
		<description><![CDATA[I run Asterisk 1.8 at home for my own amusement.  I&#8217;ve just got a SIP trunk running again to SIPGate which had stopped running for some reason.  I&#8217;d set the DID for the SIPGate number to check for faxes and then, if it&#8217;s not a fax, go to my MOH application, but for some reason [...]]]></description>
			<content:encoded><![CDATA[<p>I run Asterisk 1.8 at home for my own amusement.  I&#8217;ve just got a SIP trunk running again to <a href="http://www.sipgate.co.uk">SIPGate</a> which had stopped running for some reason.  I&#8217;d set the DID for the SIPGate number to check for faxes and then, if it&#8217;s not a fax, go to my MOH application, but for some reason it didn&#8217;t work.</p>
<p>I also couldn&#8217;t access voicemail from the SIPGate trunk either, but I could get it to work with a phone connected to an ATA.</p>
<p>I had a look in the logs:</p>
<blockquote>
<pre>channel.c: Unable to find a codec translation path from 0x100 (g729) to 0x40 (slin)</pre>
</blockquote>
<p>Since slin is, I think, the Asterisk native format this is quite bad.  My assumption is that SIPGate sends through G.729 encoded audio regardless of whether you want it to or not (as configured in your allow/disallow lines for the SIP trunk PEER).</p>
<p>G729 from SIPGate works to the ATA because the ATA supports G729 and G729 to G729 pass-through works without any extra requirements from Asterisk.</p>
<p>So &#8211; in order to get SIPGate to Asterisk apps working again I installed the G729 codec binaries from here:</p>
<p><a href="http://asterisk.hosting.lv/">http://asterisk.hosting.lv/</a></p>
<p>and restarted Asterisk.  Now a:</p>
<pre>         core show translations</pre>
<p>shows I can convert between G729 and loads of other codecs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2011/02/g729-in-asterisk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Asterisk VoIP calls causing PPP to drop on ADSL modems</title>
		<link>http://www.whizzy.org/2010/10/asterisk-voip-calls-causing-ppp-to-drop-on-adsl-modems/</link>
		<comments>http://www.whizzy.org/2010/10/asterisk-voip-calls-causing-ppp-to-drop-on-adsl-modems/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 15:02:28 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whizzy.org/?p=311</guid>
		<description><![CDATA[The internet FTW. I&#8217;ve been having this odd problem since I got my Asterisk box back up and running in that whenever a call came in and hung up I&#8217;d lose internet connectivity for a few seconds. I tracked it down to the router dropping the PPP connection, which initially made me think that the [...]]]></description>
			<content:encoded><![CDATA[<p>The internet FTW.</p>
<p>I&#8217;ve been having this odd problem since I got my Asterisk box back up and running in that whenever a call came in and hung up I&#8217;d lose internet connectivity for a few seconds.</p>
<p>I tracked it down to the router dropping the PPP connection, which initially made me think that the polarity reversal indicating the call had hung up was causing the modem to b0rk, perhaps due to the distance between the phone socket and the modem, or my dodgy cat5 cabling, or something.</p>
<p>Turns out it was none of the above.  EDIT:  Bit hasty there.  Hasn&#8217;t fixed it al all.</p>
<p>This post:</p>
<p>http://forums.contribs.org/index.php/topic,43733.msg209081.html#msg209081</p>
<p>points to exactly my problem.  I disabled the DDoS protection and no more dropped internet connections.  I don&#8217;t worry about DDoS attacks too much, so for now I&#8217;m going to leave it off.</p>
<p>UPDATE:  None of the above actually worked.  In the end it turned out the modem had simply broken.  The NV RAM wasn&#8217;t remembering the config after a proper reboot and it was generally broken.  So I replaced the whole thing with a new DrayTek modem.  The old one did pretty well, it worked perfectly for about 3 years non-stop.</p>
<p>Search hints:</p>
<p>DrayTek VoIP Asterisk dropping ADSL PPP drop DDoS SIP</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whizzy.org/2010/10/asterisk-voip-calls-causing-ppp-to-drop-on-adsl-modems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

