<?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>Sean's Obsessions &#187; Telephony</title>
	<atom:link href="http://ertw.com/blog/category/telephony/feed/" rel="self" type="application/rss+xml" />
	<link>http://ertw.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 17 May 2012 09:25:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Twilio Client Quickstart &#8211; In Ruby</title>
		<link>http://ertw.com/blog/2011/10/25/twilio-client-quickstart-in-ruby/</link>
		<comments>http://ertw.com/blog/2011/10/25/twilio-client-quickstart-in-ruby/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 03:38:47 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/?p=377</guid>
		<description><![CDATA[&#1080;&#1082;&#1086;&#1085;&#1080; &#1094;&#1077;&#1085;&#1080; I&#8217;ve wanted to play with the Twilio client for a while. They have this great quick start but it&#8217;s written in PHP. Now I don&#8217;t mind PHP, but I prefer Ruby. If I&#8217;m going to write anything using the client, it&#8217;s going to be in Ruby, so I don&#8217;t see the point in [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://xn--h1aafme.net/">&#1080;&#1082;&#1086;&#1085;&#1080; &#1094;&#1077;&#1085;&#1080;</a></font>
<p>I&#8217;ve wanted to play with the Twilio client for a while. They have this great <a href="http://www.twilio.com/docs/quickstart/client/">quick start</a> but it&#8217;s written in PHP. Now I don&#8217;t mind PHP, but I prefer Ruby. If I&#8217;m going to write anything <i>using</i> the client, it&#8217;s going to be in Ruby, so I don&#8217;t see the point in learning it on PHP.</p>
<p>So, here is the meat of the quickstart done up as a Rails 3.1 application.</p>
<p>First, generate the application.</p>
<pre><code>$ rails new twilio
      create
      create  README
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      ...
</code></pre>
<p>This creates a new Rails 3.1 app in the current directory called <b>twilio</b>. Change to this directory, and add a line to your <b>Gemfile</b>:</p>
<pre><code>gem 'twilio-ruby'</code></pre>
<p>Run <b>bundle install</b> to add the official Twilio gem to your bundle.</p>
<p>Next, head on over to your Twilio account and get your SID and auth token. Those can go in an initializer, <b>config/initializers/twilio.rb</b>:</p>
<pre><code>TwilioAccountSID="AC........"
TwilioAuthToken="......."</code></pre>
<p>Those are the magic tokens that let you authenticate yourself to the Twilio API, and more importantly for them, let them bill you.</p>
<p>Next, head on over to <b>app/helpers/application_helper.rb</b>:</p>
<pre><code>module ApplicationHelper
  def twilio_javascript_include_tag
    javascript_include_tag "http://static.twilio.com/libs/twiliojs/1.0/twilio.min.js"
  end
end
</code></pre>
<p>Then in <b>app/views/layouts/application.html.erb</b> add that helper in the head:</p>
<pre><code>
  <%= stylesheet_link_tag    "application" %>
  <%= javascript_include_tag "application" %>
 <b> <%= twilio_javascript_include_tag  %></b>
  <%= csrf_meta_tags %>
</code></pre>
<p>Yea, you could have put the code right in the layout, but I like sparse layout files.</p>
<p>Next up, create a controller:</p>
<pre><code>$ rails generate controller client index
      create  app/controllers/client_controller.rb
       route  get "client/index"
      invoke  erb
      create    app/views/client
      create    app/views/client/index.html.erb
      invoke  test_unit
      create    test/functional/client_controller_test.rb
      invoke  helper
      create    app/helpers/client_helper.rb
      invoke    test_unit
      create      test/unit/helpers/client_helper_test.rb
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/client.js.coffee
      invoke    scss
      create      app/assets/stylesheets/client.css.scss
</code></pre>
<p>Then add <b>root :to => &#8216;client#index&#8217;</b> to <b>config/routes.rb</b> so that your new view is displayed in the root url.</p>
<p>Run <b>rails server</b> or whatever you do to start your dev instance and browse to it. You should get the usual &#8220;find me in app/views/client/index.html.erb&#8221; message. Check the headers to make sure the library is being installed. The rest of the examples then deal with <b>app/views/client/index.html.erb</b> and <b>app/helpers/client_helper.rb</b>.</p>
<p>For the <a href="http://www.twilio.com/docs/quickstart/client/hello-monkey">first example</a> you want:</p>
<p><b>Helper:</b></p>
<pre><code>module ClientHelper

  def twilio_token
    capability = Twilio::Util::Capability.new TwilioAccountSID, TwilioAuthToken
    capability.allow_client_outgoing "APabe7650f654fc34655fc81ae71caa3ff"
    capability.generate
  end
end</code></pre>
<p><b>View:</b></p>
<pre><code>
<%= javascript_tag do %>
function call() {
  Twilio.Device.connect();
}

function hangup() {
  Twilio.Device.disconnectAll();
}

$(function() {
  Twilio.Device.setup("<%= twilio_token %>");

  Twilio.Device.ready(function (device) {
    $("#log").text("Ready");
  });

  Twilio.Device.error(function (error) {
    $("#log").text("Error: " + error.message);
  });

  Twilio.Device.connect(function (conn) {
    $("#log").text("Successfully established call");
  });
});
<% end %>
&lt;button class="call" onclick="call();">
  Call
&lt;/button>
</code></pre>
<p>For the <a href="http://www.twilio.com/docs/quickstart/client/hangup">second example</a>, you just change the view.</p>
<pre><code>
<%= javascript_tag do %>
function call() {
  Twilio.Device.connect();
}

function hangup() {
  Twilio.Device.disconnectAll();
}

$(function() {
  Twilio.Device.setup("<%= twilio_token %>");

  Twilio.Device.ready(function (device) {
    $("#log").text("Ready");
  });

  Twilio.Device.error(function (error) {
    $("#log").text("Error: " + error.message);
  });

  Twilio.Device.disconnect(function (conn) {
    $("#log").text("Call ended");
  });

  Twilio.Device.connect(function (conn) {
    $("#log").text("Successfully established call");
  });
});
<% end %>
&lt;button class="call" onclick="call();">
  Call
&lt;/button>

&lt;button class="hangup" onclick="hangup();">
  Hangup
&lt;/button>

&lt;div id="log">Loading pigeons...&lt;/div>
</code></pre>
<p>For the <a href="http://www.twilio.com/docs/quickstart/client/incoming-calls">third example</a> we&#8217;ll have to change the helper and the view accordingly:</p>
<p><b>app/helpers/client_helper.rb</b> (note I&#8217;m using my own sandbox id. You get your own inside the Twilio account page!)</p>
<pre><code>
module ClientHelper
  def twilio_token
    capability = Twilio::Util::Capability.new TwilioAccountSID, TwilioAuthToken
    capability.allow_client_outgoing "AP..."
    capability.allow_client_incoming 'jenny'
    capability.generate
  end
end
</code></pre>
<p>app/views/client/index.html.erb</p>
<pre><code>
%= javascript_tag do %>
function call() {
  Twilio.Device.connect();
}

function hangup() {
  Twilio.Device.disconnectAll();
}

$(function() {
  Twilio.Device.setup("<%= twilio_token %>");

  Twilio.Device.ready(function (device) {
    $("#log").text("Ready");
  });

  Twilio.Device.error(function (error) {
    $("#log").text("Error: " + error.message);
  });

  Twilio.Device.disconnect(function (conn) {
    $("#log").text("Call ended");
  });

  Twilio.Device.connect(function (conn) {
    $("#log").text("Successfully established call");
  });

  Twilio.Device.incoming(function (conn) {
    $("#log").text("Incoming connection from " + conn.parameters.From);
    // accept the incoming connection and start two-way audio
    conn.accept();
  });

});
<% end %>
&lt;button class="call" onclick="call();">
  Call
&lt;/button>

&lt;button class="hangup" onclick="hangup();">
  Hangup
&lt;/button>

&lt;div id="log">Loading pigeons...&lt;/div>
</code></pre>
<p>Now, hook up a new action in the client controller to redirect the call from Twilio to the app inside <b>app/controllers/client_controller.rb</b></p>
<pre><code>
def incoming
  response = Twilio::TwiML::Response.new do |r|
    r.Dial  do |d|
      d.Client 'jenny'
    end
  end

  render :text => response.text
end
</code></pre>
<p>Don&#8217;t forget to add <b>post &#8220;client/incoming&#8221;</b> to <b>config/routes.rb</b>. Then point your sandbox URL to your dev box, such as http://yourhome.com:3000/client/incoming.xml.</p>
<p>As a bonus, here&#8217;s a rake task to log in to a remote host and set up an ssh tunnel on remote port 3000 to local port 3000:</p>
<pre><code>
namespace :tunnel do
  desc "Start a ssh tunnel"
  task :start => :environment do

    public_host_username = "sean"
    public_host = "home.ertw.com"
    public_port = 3000

    local_port = 3000

    puts "Starting tunnel #{public_host}:#{public_port} \
          to 127.0.0.1:#{local_port}"

    exec "ssh -nNT -g -R *:#{public_port}:127.0.0.1:#{local_port} \
                           #{public_host_username}@#{public_host}"
  end
end</code></pre>
<p>There are two more examples in the quickstart, but as they are more of the same, I&#8217;ll leave them for another post. I&#8217;d also like to try rewriting the Javascript in Coffeescript.</p>
<p>Update &#8211; Code is at https://github.com/swalberg/twilio-client-ruby</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2011/10/25/twilio-client-quickstart-in-ruby/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nagios paging using Twilio</title>
		<link>http://ertw.com/blog/2011/09/07/nagios-paging-using-twilio/</link>
		<comments>http://ertw.com/blog/2011/09/07/nagios-paging-using-twilio/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 19:48:45 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Linux/Unix/OpenSource]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/?p=355</guid>
		<description><![CDATA[&#1080;&#1082;&#1086;&#1085;&#1086;&#1087;&#1080;&#1089;I use Nagios to monitor the health of a few servers, and would like to be paged if something goes wrong. When I set it up a couple of years ago, I used SMS Gateway which was $10 for 100 SMSes. I was able to page with a simple curl command. However I&#8217;d get the [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://ikoni.eu/">&#1080;&#1082;&#1086;&#1085;&#1086;&#1087;&#1080;&#1089;</a></font>I use Nagios to monitor the health of a few servers, and would like to be paged if something goes wrong.</p>
<p>When I set it up a couple of years ago, I used <a href="http://smsgateway.ca/">SMS Gateway</a> which was $10 for 100 SMSes. I was able to page with a simple curl command. However I&#8217;d get the odd page that wouldn&#8217;t go through, and despite being very responsive, the support wasn&#8217;t very reassuring.</p>
<p>Now that I&#8217;ve depleted my 100 pages, I figured I&#8217;d move over to <a href="http://twilio.com">Twilio</a> because they&#8217;re pretty slick, and the reliability has to be better.</p>
<p>Some Nagios code, first:</p>
<pre><code>
define contactgroup{
        contactgroup_name       important
        alias                   Sean Buzz
        members                 sean, page
}
define contact{
        contact_name                    page
        alias                           page
        service_notification_commands   notify-by-page
        host_notification_commands      host-notify-by-page
        service_notification_period 24x7
        host_notification_period 24x7
        service_notification_options w,u,c,r
        host_notification_options d,u,r
        pager                           nobody@localhost
}
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             smallpayroll.ca
        contact_groups                  important
        check_command                   check_http_string!smallpayroll.ca!Easy to use
        }
</code></pre>
<p>The first stanza creates a contact group called &#8220;important&#8221; that emails sean, and pages. The second stanza implements the &#8220;host-notify-by-page&#8221; and &#8220;notify-by-page&#8221; which do the actual paging.  The final stanza is an example of a service that would get paged on. If the <b>check_http_string</b> check fails, the &#8220;important&#8221; contact group is notified.</p>
<p>The code to page is as follows:</p>
<pre><code>
define command {
        command_name    notify-by-page
        command_line    curl --data-urlencode "From=YOURTWILIONUMBER" --data-urlencode "To=YOURCELL" --data-urlencode "Body=[Nagios] $NOTIFICATIONTYPE$ $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" https://SID:TOKEN@api.twilio.com/2010-04-01/Accounts/SID/SMS/Messages >> /tmp/sms
}
define command {
        command_name    host-notify-by-page
        command_line    curl --data-urlencode "From=YOURTWILIONUMBER" --data-urlencode "To=YOURCELL" --data-urlencode "Body=[Nagios] $HOSTSTATE$ alert for $HOSTNAME$" https://SID:TOKEN@api.twilio.com/2010-04-01/Accounts/SID/SMS/Messages >> /tmp/sms
}
</code></pre>
<p>To get the SID and TOKEN (note there are two instances of the SID, the second is in the URL right after accounts) go to your dashboard and look at the top:</p>
<p><a href="http://ertw.com/blog/wp-content/uploads/2011/09/twilio-sid-token.png"><img src="http://ertw.com/blog/wp-content/uploads/2011/09/twilio-sid-token-300x37.png" alt="" title="twilio-sid-token" width="300" height="37" class="alignnone size-medium wp-image-358" /></a></p>
<p>To get a number click on <b>Numbers</b> then <b>Buy a Number</b>:</p>
<p><a href="http://ertw.com/blog/wp-content/uploads/2011/09/twilio-buy-a-number.png"><img src="http://ertw.com/blog/wp-content/uploads/2011/09/twilio-buy-a-number-300x67.png" alt="" title="twilio-buy-a-number" width="300" height="67" class="alignnone size-medium wp-image-357" /></a></p>
<p>Then search for a number. It should be in the USA, as it looks like Canadian numbers don&#8217;t support SMS. You can verify this by clicking on &#8220;Buy&#8221;:<br />
<a href="http://ertw.com/blog/wp-content/uploads/2011/09/twilio-sms-enabled.png"><img src="http://ertw.com/blog/wp-content/uploads/2011/09/twilio-sms-enabled.png" alt="" title="twilio-sms-enabled" width="678" height="397" class="alignnone size-full wp-image-359" /></a></p>
<p>Buy the number for $1/month. You don&#8217;t have to set up any URLs with it if you&#8217;re doing outbound only.</p>
<p>YOURCELL should be obvious <img src='http://ertw.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It could also be templated within Nagios.</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2011/09/07/nagios-paging-using-twilio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How many Mongrels or FastCGI processes do I need?</title>
		<link>http://ertw.com/blog/2008/11/19/how-many-mongrels-or-fastcgi-processes-do-i-need/</link>
		<comments>http://ertw.com/blog/2008/11/19/how-many-mongrels-or-fastcgi-processes-do-i-need/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 20:10:01 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Telephony]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2008/11/19/how-many-mongrels-or-fastcgi-processes-do-i-need/</guid>
		<description><![CDATA[I&#8217;m sitting in a course on call centre design, and yesterday there was mention of Erlangs, which are a unit of measure of the volume of traffic on a telecommunications network. These Erlangs can be used to calculate how many agents a call centre needs (or, given the number of agents, what service level can [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sitting in a course on call centre design, and yesterday there was mention of <a href="http://en.wikipedia.org/wiki/Erlang_unit">Erlangs</a>, which are a unit of measure of the volume of traffic on a telecommunications network.  These Erlangs can be used to calculate how many agents a call centre needs (or, given the number of agents, what service level can be expected)</p>
<p>The Erlang C model is used for this, it has the built in assumption that if agents are busy then the callers queue.  This is much like a Mongrel or FastCGI &#8220;agent&#8221;, with requests coming in from a front end web server.</p>
<p>Using the Erlang C calculator <a href="http://www.math.vu.nl/~koole/ccmath/blending/index.php">here</a>, I can figure out how many agents I need, given the desired service level.</p>
<ul>
<li>Arrivals: 600/minute (10 req/sec)</li>
<li>Service time: 0.2s</li>
<li>Service level: 99.9% within 0.3 s</li>
</ul>
<p>Gives 5 agents or Mongrels.  From there you can work backward with existing models to figure out how many computers you need.</p>
<p>With the calculator you can also fix the number of agents and figure out capacity, or blockage, or whatever.</p>
<p>This assumes that incoming requests follow the Poisson distribution, which I have no idea if it is true. Anyone?<br />
Edit: Sorry, I managed to lose half the post and had to redo it.</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2008/11/19/how-many-mongrels-or-fastcgi-processes-do-i-need/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Linux Journal articles are online</title>
		<link>http://ertw.com/blog/2007/04/02/my-linux-journal-articles-are-online/</link>
		<comments>http://ertw.com/blog/2007/04/02/my-linux-journal-articles-are-online/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 12:49:47 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Linux/Unix/OpenSource]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/04/02/my-linux-journal-articles-are-online/</guid>
		<description><![CDATA[I had meant to put these up as .PDFs, but it appears ACM archives LJ articles once they go public (~30 days after the magazine comes out). Enjoy. How to configure SIP and NAT Expose VoIP Problems Using Wireshark a<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>I had meant to put these up as .PDFs, but it appears ACM archives LJ articles once they go public (~30 days after the magazine comes out).  Enjoy.</p>
<p><a href="http://delivery.acm.org/10.1145/1240000/1234295/9399.html?key1=1234295&#038;key2=7297155711&#038;coll=portal&#038;dl=GUIDE&#038;CFID=15151515&#038;CFTOKEN=6184618">How to configure SIP and NAT</a><br />
<a href="http://delivery.acm.org/10.1145/1240000/1234296/9398.html?key1=1234296&#038;key2=9297155711&#038;coll=portal&#038;dl=GUIDE&#038;CFID=15151515&#038;CFTOKEN=6184618">Expose VoIP Problems Using Wireshark</a></p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/04/02/my-linux-journal-articles-are-online/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I&#8217;m in Linux Journal</title>
		<link>http://ertw.com/blog/2007/02/07/im-in-linux-journal/</link>
		<comments>http://ertw.com/blog/2007/02/07/im-in-linux-journal/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 15:45:34 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Linux/Unix/OpenSource]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/02/07/im-in-linux-journal/</guid>
		<description><![CDATA[I submitted two articles to Linux Journal in December and I&#8217;m happy to see they&#8217;re both feature articles in March&#8217;s VoIP issue. How to configure SIP and NAT Expose VoIP problems with Wireshark Special thanks to Bill Reid, John Lange, and Les Bester of Les.net for letting me bounce ideas off of them, and again [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>I submitted two articles to Linux Journal in December and I&#8217;m happy to see they&#8217;re both feature articles in <a href="http://www.linuxjournal.com/node/1000058">March&#8217;s VoIP issue</a>.</p>
<p><a href="http://www.linuxjournal.com/xstatic/abstracts/feature3">How to configure SIP and NAT</a><br />
<a href="http://www.linuxjournal.com/xstatic/abstracts/feature4">Expose VoIP problems with Wireshark</a></p>
<p>Special thanks to Bill Reid, John Lange, and Les Bester of <a href="http://les.net">Les.net</a> for letting me bounce ideas off of them, and again to Les for providing me some testing endpoints.</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/02/07/im-in-linux-journal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My tax dollars go where?</title>
		<link>http://ertw.com/blog/2006/09/29/my-tax-dollars-go-where/</link>
		<comments>http://ertw.com/blog/2006/09/29/my-tax-dollars-go-where/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 17:08:58 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2006/09/29/my-tax-dollars-go-where/</guid>
		<description><![CDATA[http://www.crtc.gc.ca/ENG/NEWS/SPEECHES/2006/s060929.htm A local college radio station is being called to task for the following alleged infractions, committed over a year ago. The examination also revealed shortfalls relating to the following three conditions of licence: 1. the licensee broadcast a level of 4.73% category 3 music instead of the weekly minimum of 5%; 2. the licensee [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>http://www.crtc.gc.ca/ENG/NEWS/SPEECHES/2006/s060929.htm</p>
<p>A local college radio station is being called to task for the following alleged infractions, committed over a year ago.</p>
<blockquote>
<p>  The examination also revealed shortfalls relating to the following three conditions of licence:</p>
<p>   1. the licensee broadcast a level of 4.73% category 3 music instead of the weekly minimum of 5%;<br />
   2. the licensee broadcast a weekly level of 0.83% news instead of the weekly minimum of 4%; and<br />
   3. the absence of any formal educational programming despite its condition of licence to broadcast a minimum of two hours of such programming.
</p></blockquote>
<p>A hearing was called and people were flown in from all over the country to attend.  All because a college radio station didn&#8217;t play some news and missed a few minutes of &#8220;category 3 music&#8221;.</p>
<p>I realize spectrum is a limited commodity, but gee-whiz, isn&#8217;t there a more efficient way of handling this?</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2006/09/29/my-tax-dollars-go-where/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk and dialing URIs</title>
		<link>http://ertw.com/blog/2006/09/18/asterisk-and-dialing-uris/</link>
		<comments>http://ertw.com/blog/2006/09/18/asterisk-and-dialing-uris/#comments</comments>
		<pubDate>Tue, 19 Sep 2006 03:10:42 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Linux/Unix/OpenSource]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2006/09/18/asterisk-and-dialing-uris/</guid>
		<description><![CDATA[I&#8217;ve got ertw.com set up to accept SIP calls, so that if you dial sean@ this domain, it rings a phone here. But, how do you dial out? It&#8217;s actually quite easy in theory, since you can Dial() any sort of address, but the trick is to integrate it with the dialplan. A bit of [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got ertw.com set up to accept SIP calls, so that if you dial sean@ this domain, it rings a phone here.  But, how do you dial out?</p>
<p>It&#8217;s actually quite easy in theory, since you can Dial() any sort of address, but the trick is to integrate it with the dialplan.</p>
<p>A bit of research found <a href="http://blyon.com/sip_uri/">this page</a> which is good, but it assumes that everything gets forwarded to the SIP macro.  Using part of his recipe:</p>
<p>  exten => _[a-z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})<br />
  exten => _[A-Z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})</p>
<p>means that only those addresses that start with a letter will be dialed as SIP, which rules out numeric addresses (like 613@fwd.pulver.com for echo testing).</p>
<p>I like his idea, though, so I decided that I&#8217;d keep it, and prefix any numeric sip addresses with sip: so that the extension above would be caught.  Then it was a matter of modifying his macro to look for sip: in front of a URI and strip it.  The results are:</p>
<p>  ; Dials a SIP URI<br />
  [macro-uridial]</p>
<p>  ; First, assume it&#8217;s not a sip: type address<br />
  exten => s,1,Set(destination=${ARG1})<br />
  exten => s,n,NoOp(First 6 chars are ${ARG1:0:6})<br />
  ; We see them as url encoded (ie : is really %3a)<br />
  ; check to see if the first *six* chars match it then<br />
  exten => s,n,GotoIf($["${ARG1:0:6}" != "sip%3a"]?nowdial|1)<br />
  ; we fell through because there was a sip: at the beginning, so<br />
  ; strip the digits and then dial<br />
  exten => s,n,Set(destination=${ARG1:6})<br />
  exten => s,n,GoTo(nowdial,1)<br />
  ; At this point it&#8217;s a proper uri<br />
  exten => nowdial,1,NoOp(Calling remote SIP peer ${destination})<br />
  exten => nowdial,n,Dial(SIP/${destination},120,tr)<br />
  exten => nowdial,n,Congestion()</p>
<p>In the end it turned out to be an exercise in learning how Asterisk works more than anything else, ie the %3a translation, the implicit breaking up of the address into $EXTEN and $SIPDOMAIN, and also the format of GotoIf.</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2006/09/18/asterisk-and-dialing-uris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do we really need ENUM?</title>
		<link>http://ertw.com/blog/2006/04/05/do-we-really-need-enum/</link>
		<comments>http://ertw.com/blog/2006/04/05/do-we-really-need-enum/#comments</comments>
		<pubDate>Wed, 05 Apr 2006 13:16:01 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2006/04/05/do-we-really-need-enum/</guid>
		<description><![CDATA[The topic of ENUM came up last night at the Manitoba Asterisk User&#8217;s group meeting. I find the discussion interesting because there are a couple of people there who are involved with the ENUM efforts by CIRA. After discussing the problems and status of ENUM-Canada efforts, I started to wonder, &#8220;Do we really need ENUM?&#8221; [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>The topic of <a href="http://www.ietf.org/html.charters/enum-charter.html">ENUM</a> came up last night at the Manitoba Asterisk User&#8217;s group meeting.  I find the discussion interesting because there are a couple of people there who are involved with the ENUM efforts by <a href="http://cira.ca">CIRA</a>.  After discussing the problems and status of ENUM-Canada efforts, I started to wonder, &#8220;Do we really need ENUM?&#8221;</p>
<p><span id="more-151"></span></p>
<p>ENUM is a method for mapping PSTN style phone numbers to a URI, such as SIP or a mailto, through the global DNS.  My office phone, 204.975.5987, would then become 7.8.9.5.5.7.9.4.0.2.1.e164.arpa by reversing the digits, adding the top level country code of 1, and looking within the e164.arpa zone.   Simplifying greatly, the response might either be nothing, meaning I can&#8217;t be reached by IP, or it might be something like sip:seanwalberg@ceridian.ca, meaning that I can be reached via SIP through that address.</p>
<p>One consumer of this information would be telecos.  Rather than paying my carrier (MTS/Allstream) for terminating the call, they could use the sip URI to call me over the Internet and pocket the difference.  The other would be regular people who are replacing their phones with either computers or smarter IP phones, and want to make the query themselves to avoid paying long distance.</p>
<p>Almost two years ago I wrote <a href="http://ertw.com/blog/2004/04/27/either-youve-got-a-sip-address-or-youre-not-worth-talking-to/">Either you&#8217;ve got a SIP address, or you&#8217;re not worth talking to</a> to point out that the eventual goal will be phasing out of PSTN style numbers in favour of SIP URIs, which are basically email addresses.</p>
<p>Since telephones with their 12 buttons aren&#8217;t too good at entering SIP URIs such as &#8220;seanwalberg@ceridian.ca&#8221;, ENUM is one transition mechanism.  But involve telecos and large committees, and you get delay and disagreements.  Already there are two types of ENUM being proposed, one for carriers, one for the public.  And since DNS is delegated differently than PSTN numbers, how does a regular person like me update my records securely (while making sure that an evil person can&#8217;t update my records?)</p>
<p>So this led me to think, &#8220;Why do we even need ENUM?&#8221;.  Why not put a SIP address on your business card along with all the other numbers people put there?  (Don&#8217;t quote me, but I remember Nortel did this)  People who want to use SIP will use SIP.  People who can&#8217;t won&#8217;t.</p>
<p>From the carrier perspective, if they&#8217;re so interested in saving money by offloading calls to the Internet, why not let them come up with their own transition mechanism?  They&#8217;ve done this before for toll free and local number portability.</p>
<p>I suppose what I&#8217;m really saying is that the problem isn&#8217;t so much technical as it is marketing.  How many people have some form of instant messaging client, or even several?  What would it take people to move to a SIP based client?  If people started using SIP based instant messaging, or even if it were supported under popular IM clients (didn&#8217;t MSN support it for a brief period), wouldn&#8217;t vendors have incentive to make hard phones capable of dialing SIP?  (I pointed out last night that a small keypad was no impediment to the adoption of SMS messaging)</p>
<p>While I applaud the efforts of those involved with ENUM, I wonder if it wouldn&#8217;t be easier just to draw a line in the sand and not try and integrate the two networks.  Instead, focus on promoting the SIP network, and let the benefits and features draw people in.</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2006/04/05/do-we-really-need-enum/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Telephony Terms and Concepts Article</title>
		<link>http://ertw.com/blog/2006/02/08/telephony-terms-and-concepts-article/</link>
		<comments>http://ertw.com/blog/2006/02/08/telephony-terms-and-concepts-article/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 13:20:15 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Linux/Unix/OpenSource]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2006/02/08/telephony-terms-and-concepts-article/</guid>
		<description><![CDATA[I wrote an article for O&#8217;Reilly&#8217;s Emerging Telephony site called Telecom Terms and Concepts. It&#8217;s all about how the existing phone system and VoIP works, how they&#8217;re the same, and how they&#8217;re different. On another voice related note, John Lange has started up the Canadian Association of Voice over IP Providers, a sort of lobby/working [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>I wrote an article for O&#8217;Reilly&#8217;s Emerging Telephony site called <a href="http://www.oreillynet.com/pub/a/etel/2006/02/07/telecom-terms-and-concepts.html">Telecom Terms and Concepts</a>.  It&#8217;s all about how the existing phone system and VoIP works, how they&#8217;re the same, and how they&#8217;re different.</p>
<p>On another voice related note, John Lange has started up the <a href="http://cavp.ca/">Canadian Association of Voice over IP Providers</a>, a sort of lobby/working group for Canadian ITSPs.  The goal is to <i>present an independent perspective on VoIP regulatory issues to the Canadian Radio and Telecommunications Committee (CRTC) and to work in cooperation with Local Exchange Carriers (LECs) to ensure interoperability between VoIP networks and the Public Switched Telephone Network (PSTN).</i></p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2006/02/08/telephony-terms-and-concepts-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bell South, and charging for premium service</title>
		<link>http://ertw.com/blog/2006/01/17/bell-south-and-charging-for-premium-service/</link>
		<comments>http://ertw.com/blog/2006/01/17/bell-south-and-charging-for-premium-service/#comments</comments>
		<pubDate>Tue, 17 Jan 2006 17:22:08 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://ertw.com/blog2/?p=140</guid>
		<description><![CDATA[Many sites are reporting that Bell South wants to charge content providers to &#8220;to reliably and speedily deliver their content and services.&#8221; It&#8217;s an interesting thought, with many good arguments for and against. On the surface, it may appear that BS is trying to have their cake and eat it too. People using their network [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>Many sites are reporting that <a href="http://www.marketwatch.com/news/story.asp?guid=%7B02432D2D-1EE0-4037-A15F-54B748D6CF26%7D&amp;siteid=mktw&amp;dist=">Bell South wants to charge content providers</a> to &#8220;to reliably and speedily deliver their content and services.&#8221;</p>
<p>It&#8217;s an interesting thought, with many good arguments for and against.</p>
<p>On the surface, it may appear that BS is trying to have their cake and eat it too.   People using their network pay for the access already, either by cash or reciprocal traffic arrangements.  So, company X may connect to provider Y who in turn connects to BS.  Y pays BS for the traffic it uses and X pays Y.  BS may connect to another ISP who agrees to a reciprocal arrangement whereby each carrier  will carry the other&#8217;s traffic free of charge.</p>
<p>In this scenario, the network is paid for, and any argument about &#8220;the Internet is getting faster and we can&#8217;t keep up&#8221; should be able to be taken care of by BS charging more to Y who passes it on to X should X be the person using the traffic.</p>
<p>On the other hand, one could look upon this as a value-add.  &#8220;Yahoo!, pay me, and I&#8217;ll make sure your traffic has priority on my network&#8221;.  (As an aside, giving traffic priority doesn&#8217;t always refer to a strict priority queue where Yahoo! always beats out Google and other traffic.  It could be a guaranteed portion of the pipe)  From this perspective, it seems reasonable to auction off different priorities within the BS network, assuming there is a market.</p>
<p>Of course, the &#8220;value&#8221; part of &#8220;value-add&#8221; is dubious.  BS isn&#8217;t the whole Internet, and the hop-by-hop nature of the Internet means that your traffic will only experience the increased performance over the BS network.  If your cable modem network is pinned, this won&#8217;t help you.</p>
<p>Now that I write it out, I&#8217;m starting to think the free market approach is better.  One of several things will happen:</p>
<p>- People will pay.  By this, I mean the ultimate end product is priced such that people buy it, and the content provider maintains a satisfactory profit<br />
- People won&#8217;t pay.  If I&#8217;m only willing to spend $1 on a music download, and I won&#8217;t spend $1.05 to have it download 10 seconds faster, then no one will choose the high quality option, and we&#8217;re back to the Internet we have today where all traffic is equal<br />
- It won&#8217;t work for the reasons cited before.  Other carriers could choose to alter their peering to avoid the BS network, or the benefit of the service could be so small that people won&#8217;t pay.</p>
<p>Either way, I don&#8217;t see a long term problem.  The market should take care of it, whether or not it&#8217;s good for BS is the question.</p>
<p>All that said, the old adage often accredited to John Gilmore applies:  &#8220;The Internet treats censorship as damage, and routes around it&#8221;.  In this case, if BS tries to push it too far, or misuses the idea, the Internet will take care of itself. </p>
<p>(Also have a look over at <a href="http://voip.weblogsinc.com/2006/01/17/in-the-end-net-neutrality-will-win/">the VoIP blog</a> for another take)</p>
<p>a</p>
]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2006/01/17/bell-south-and-charging-for-premium-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

