<?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>don't_panic &#187; Telephony</title>
	<atom:link href="http://mikepultz.com/category/telephony/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikepultz.com</link>
	<description>personal and professional blog of mike pultz, technology specialist and serial entrepreneur;</description>
	<lastBuildDate>Fri, 16 Jul 2010 05:26:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Automatic Dial Resource Fail-over in Asterisk</title>
		<link>http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/</link>
		<comments>http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/#comments</comments>
		<pubDate>Mon, 17 May 2010 03:01:30 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=467</guid>
		<description><![CDATA[Asterisk is generally pretty reliable, but termination providers aren't always so good; in a market where anybody can re-sell an upstream provider, or setup a few Asterisk boxes and start routing calls for people, it's generally a good idea to have a "backup" provider (or three) to route your calls through. You can easily setup [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p><a href="http://asterisk.org">Asterisk</a> is generally pretty reliable, but termination providers aren't always so good; in a market where anybody can re-sell an upstream provider, or setup a few Asterisk boxes and start routing calls for people, it's generally a good idea to have a "backup" provider (or three) to route your calls through.</p>
<p>You can easily setup an Asterisk system, to fail-over to secondary systems, if your primary provider fails for some reason- and this can all be done right in the dial plan, using a simple MACRO.</p>
<p>Add this MACRO to your dial plan:</p>
<pre>[macro-direct-dial]
exten =&gt; s,1,Set(CALL_ATTEMPT=1)
exten =&gt; s,2,Set(TERM_PROVIDER=${TERM_PROVIDER1})
exten =&gt; s,3,Dial(${TERM_PROVIDER}/${ARG1},60)
exten =&gt; s,4,GotoIf($["${CALL_ATTEMPT}" &gt;= "${MAX_PROVIDERS}"]?s-CANCEL,1)
exten =&gt; s,5,Set(CALL_ATTEMPT=$[${CALL_ATTEMPT} + 1])
exten =&gt; s,6,Goto(s-${DIALSTATUS},1)

exten =&gt; s-BUSY,1,Noop()
exten =&gt; s-NOANSWER,1,Noop()
exten =&gt; s-CANCEL,1,Hangup()
exten =&gt; s-HANGUP,1,Hangup()

exten =&gt; s-CHANUNAVAIL,1,Set(TERM_PROVIDER=${EVAL(${TERM_PROVIDER${CALL_ATTEMPT}})})
exten =&gt; s-CHANUNAVAIL,2,Goto(s,3)

exten =&gt; s-CONGESTION,1,Set(TERM_PROVIDER=${EVAL(${TERM_PROVIDER${CALL_ATTEMPT}})})
exten =&gt; s-CONGESTION,2,Goto(s,3)</pre>
<p>Now you'll need to route your calls into this MACRO; this can vary by dial plan, as you may have a special configuration for different area codes, or country codes, or based on some least-cost-routing business decisions, but a simple example would be something like this:</p>
<pre>[default]
exten =&gt; _1NXXNXXXXXX,1,Answer()
exten =&gt; _1NXXNXXXXXX,2,Macro(direct-dial,${EXTEN})
exten =&gt; _1NXXNXXXXXX,3,Hangup()</pre>
<p>This routes any <a href="http://www.nanpa.com/">NANPA</a> numbers through the direct-dial MACRO above, passing in the phone number as the first argument to the MACRO.</p>
<p>Now, before this will work, you'll need to configure some variables; this can be done in many places- in my working configuration, I have these variables dynamically generated via an AGI script, based on the phone number being dialed. This way I can control dial-groups, by phone number, based on a cost/preference/etc.</p>
<p>In this example, we'll simply set these values in the globals section of the extensions.conf file:</p>
<pre>[globals]
TERM_PROVIDER1 = SIP/first_provider
TERM_PROVIDER2 = IAX/second_provider
TERM_PROVIDER3 = SIP/last_provider
MAX_PROVIDERS = 3</pre>
<p>So I've configured three fictitious termination providers; you can specify as many as you like, as long as the TERM_PROVIDER increments one for each, and you set the MAX_PROVIDERS value to the total number of providers listed.</p>
<p>This is obviously more useful if this list is automatically generated somehow, or changed based on the phone number being dialed, otherwise the retries could simply be hard-coded into the dial plan.</p>
<p>Now when you dial your number, it will start with the first (default) provider; if the dial() function returns a congestion or channel un-available error, the MACRO will cycle to the next provider, until it as gone through all of the providers listed.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonolo iPhone App In The News</title>
		<link>http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/</link>
		<comments>http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 05:28:08 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Fonolo]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=431</guid>
		<description><![CDATA[We've received a tremendous amount of press coverage in the week since we launched the Fonolo iPhone application, including a quick spot on the ABC News tech bytes segment. It was also featured on: lifehacker- Fonolo Skips Automated Customer Service Phone Trees, Now on iPhone TMCnet.com - Fonolo Launches Free iPhone App CNet - Fonolo's deep dialer comes [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p>We've received a tremendous amount of press coverage in the week since we launched the Fonolo iPhone application, including a quick spot on the ABC News tech bytes segment.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="253" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="height=253&amp;width=320&amp;file=http://media.fonolo.com/video/fonolo-iphone-abcnews.flv&amp;searchbar=false" /><param name="src" value="http://static.fonolo.com/flash/video_player.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="320" height="253" src="http://static.fonolo.com/flash/video_player.swf" allowfullscreen="true" flashvars="height=253&amp;width=320&amp;file=http://media.fonolo.com/video/fonolo-iphone-abcnews.flv&amp;searchbar=false"></embed></object></p>
<p style="text-align: left;">It was also featured on:</p>
<p style="text-align: left;">lifehacker- <a href="http://lifehacker.com/5470697/fonolo-skips-automated-customer-service-phone-trees-now-on-iphone" target="_blank">Fonolo Skips Automated Customer Service Phone Trees, Now on iPhone</a></p>
<p>TMCnet.com - <a href="http://voip-phone-systems.tmcnet.com/topics/voip-phone-systems/articles/75678-fonolo-launches-free-iphone-app.htm" target="_blank">Fonolo Launches Free iPhone App</a></p>
<p>CNet - <a href="http://news.cnet.com/8301-27076_3-20000064-248.html?part=rss&amp;tag=feed&amp;subj=TheDownloadBlog" target="_blank">Fonolo's deep dialer comes to the iPhone</a></p>
<p>Techvibes - <a href="http://www.techvibes.com/blog/fonolo-lets-iphone-users-skip-corporate-phone-hell" target="_blank">Fonolo lets iPhone users skip corporate phone hell</a></p>
<p>and many other sites.</p>
<p>We couldn't be happier!</p>
<p>Stay tuned for some upcoming additions.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonolo Widget &#8211; Deep Dialing For Your Business</title>
		<link>http://mikepultz.com/2009/08/fonolo-widget-deep-dialing-for-your-business/</link>
		<comments>http://mikepultz.com/2009/08/fonolo-widget-deep-dialing-for-your-business/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 04:10:37 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Fonolo]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=337</guid>
		<description><![CDATA[Fonolo for business lets you embed your companies phone menu (IVR system) right on your website, or in your mobile applications, with just a few simple lines of HTML code. Fonolo automatically maps out your phone system (and stays up-to-date with any changes you make)- You will get happier customers, fewer misdirected calls, and better feedback [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2009/08/fonolo-widget-deep-dialing-for-your-business/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p><script src="https://widget.fonolo.com/main/load/b2f9db313e0ff0de5bde574e4c543490" type="text/javascript"></script></p>
<p>Fonolo for business lets you embed your companies phone menu (IVR system) right on your website, or in your mobile applications, with just a few simple lines of HTML code.</p>
<p>Fonolo automatically maps out your phone system (and stays up-to-date with any changes you make)- You will get happier customers, fewer misdirected calls, and better feedback from your callers. Best of all, you do not have to change <em>anything</em> in your existing phone system.</p>
<p>Here's a really simple example for our fake "<strong>Fonolo Airlines</strong>" company:</p>
<div style="text-align: center;" id="fonolo_trigger"></div>
<p>More details about Fonolo for business can be found <a href="http://fonolo.com/business">here</a>. We're running several live trial runs with a handful of companies- if you're interested in getting access to the Fonolo widget, <a href="http://fonolo.com/about/contact">contact us</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2009/08/fonolo-widget-deep-dialing-for-your-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling SIP URI Dialing in Asterisk</title>
		<link>http://mikepultz.com/2009/04/handling-sip-uri-dialing-in-asterisk/</link>
		<comments>http://mikepultz.com/2009/04/handling-sip-uri-dialing-in-asterisk/#comments</comments>
		<pubDate>Fri, 01 May 2009 00:52:25 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=252</guid>
		<description><![CDATA[Asterisk, by design, is very "extension" orientated- that is, if you want to dial an end-point, it requires an extension to route the call to. These extensions (defined in the asterisk extensions.conf file), can be extensions registered to phones, DIDs (XXXYYYZZZZ), or simply usernames assigned to users by the network administrator. Extensions are used for both [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2009/04/handling-sip-uri-dialing-in-asterisk/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p><a href="http://www.asterisk.org/">Asterisk</a>, by design, is very "extension" orientated- that is, if you want to dial an end-point, it requires an extension to route the call to. These extensions (defined in the asterisk <a href="http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf">extensions.conf</a> file), can be extensions registered to phones, DIDs (XXXYYYZZZZ), or simply usernames assigned to users by the network administrator. Extensions are used for both incoming, and outgoing phone calls.<img class="alignright size-full wp-image-266" title="asterisk" src="http://mikepultz.com/wp-content/uploads/2009/04/asterisk.png" alt="asterisk" width="187" height="159" /></p>
<p>For example, if I place a call through my SIP phone to 1-444-555-1212, then asterisk will look up the "extension" 14445551212 in the extensions.conf file, to determine how to route the call.</p>
<p>Similarly to how e-mail works, an artifact of these extensions is a direct SIP address, which is basically your SIP extension @ your SIP server- so, if my phone was extension <em>555</em>, and my SIP server had the IP address <em>192.168.1.1</em>, then my SIP address would be: <em>sip:555@192.168.1.1</em>, and (if it's not implictely blocked), I can be dialed directly using that SIP address.</p>
<p>But, because Asterisk is so extension orientated, it doesn't easily allow for outbound dialing, using remote SIP addresses; If I try to dial the address <em>sip:444@somedomain.com</em>, Asterisk will immediately strip off the host portion (@somedomain.com), and try to route the call based simply on the extension "444"- which, since it's an extension on a remote server (@somedomain.com), it won't be able to route it locally, and will fail.</p>
<p>The solution? Well, it's not ideal, but Asterisk provides the ability to use wild cards in the extensions.conf file (it refers to them as "<a href="http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns">patterns</a>") when doing extension look ups; this is handy when you have blocks of extension or DID's- you can use the wildcard to map like extensions to the same config, keeping your config file small.</p>
<p>The issue, is that the wild card only compares against the local part of the SIP URI, which can look like almost anything, including other phone numbers.</p>
<p>First, define some general config</p>
<pre class="code" style="font-size: 10px">[general]
;
; Your termination provider (defined in sip.conf)
;
TERM_PROVIDER = SIP/company_peer

;
; The IP address of this asterisk server
;
ASTERISK_IP = 192.168.1.1</pre>
<p>The "ASTERISK_IP" address is important later, as we'll use it to validate outgoing SIP addresses.</p>
<p>Then in your default config, you should have something like this configured already- handling <a href="http://www.nanpa.com/">NANPA</a> style dialing, and international dialing</p>
<pre class="code" style="font-size: 10px">[default]
;
; Dial NANPA style phone numbers directly
;
exten =&gt; _1NXXNXXXXXX,n,Dial(${TERM_PROVIDER}/${EXTEN},60)
exten =&gt; _1NXXNXXXXXX,n,HangUp()

;
; Dial international numbers directly
;
exten =&gt; _011.,n,Dial(${TERM_PROVIDER}/${EXTEN}, 60)
exten =&gt; _011.,n,HangUp()</pre>
<p>After all the specific matches are done, then add:</p>
<pre class="code" style="font-size: 10px">;
; very last, assume anything else is a SIP URI
;
exten =&gt; _.,n,GotoIf($[${SIPDOMAIN} = ${ASTERISK_IP}]?unhandled)
exten =&gt; _.,n,GotoIf($[${SIPDOMAIN} = ${ASTERISK_IP}:5060]?unhandled)
exten =&gt; _.,n,Macro(uri-dial,${EXTEN}@${SIPDOMAIN})
exten =&gt; _.,n,HangUp()

;
; if the call doesn't match anything
;
[unhandled]
exten =&gt; s,n,Congestion()</pre>
<p>The reason this has to be last, is because matching the extension "_." will match *anything*- basically it's a catch-all. You're saying that if it doesn't match anything else before this, then assume it must be a SIP URI.</p>
<p>This section also compares the ${SIPDOMAIN} variable to your ASTERISK_IP address; this ensures that only SIP URI's with remote hosts are processed as SIP URI's. If the host matches our ASTERISK_IP address value (ie- it's a local extension), then it should have already matched something above this catch-all config.</p>
<p>Pass any SIP URI dials to the <em>uri</em><em>-dial</em> MACRO, merging back together the extension and the SIP domain value.</p>
<pre class="code" style="font-size: 10px">;
; handle dialing SIP uri's directly
;
[macro-uri-dial]
exten =&gt; s,n,NoOp(Calling as SIP address: ${ARG1})
exten =&gt; s,n,Dial(SIP/${ARG1},60)</pre>
<p>This solution works, but isn't ideal, as it will match anything that didn't already match; a better solution would be for it to NOT strip off the SIP domain, and allow for using a regular expression of some kind to check the extension, but there is currently no better way of handling this in Asterisk.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2009/04/handling-sip-uri-dialing-in-asterisk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gizmo5 747 Area Code</title>
		<link>http://mikepultz.com/2009/02/gizmo5-747-area-code/</link>
		<comments>http://mikepultz.com/2009/02/gizmo5-747-area-code/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 03:33:04 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Fonolo]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=176</guid>
		<description><![CDATA[I was playing with the Gizmo5 service today- we've had a few customer now ask if they could have Fonolo call them back at their Gizmo5 address, instead of a regular PSTN number. Their service, which is very Skype-ish, aims as providing cost saving on international phone calls, as well as provides free calls between [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2009/02/gizmo5-747-area-code/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p>I was playing with the <a href="http://gizmo5.com/">Gizmo5</a> service today- we've had a few customer now ask if they could have <a href="http://fonolo.com">Fonolo</a> call them back at their Gizmo5 address, instead of a regular PSTN number. Their service, which is very Skype-ish, aims as providing cost saving on international phone calls, as well as provides free calls between Gizmo5 users.</p>
<p>One of the first things I noticed (after installing the Gizmo5 client), was that their system allocates each user a "SIP" number, which they made the unfortunate choice of formatting like a standard ten digit phone number (XXX-YYY-ZZZZ)- not only that, but they used the area code 747!<img class="alignleft size-full wp-image-177" title="2t_gizmo-logo" src="http://mikepultz.com/wp-content/uploads/2009/02/2t_gizmo-logo.jpg" alt="2t_gizmo-logo" width="100" height="100" /></p>
<p>Unfortunately, they don't have any stake in the *real* 747 area code controlled through <a href="http://www.nanpa.com/">NANPA</a>- even worst, looking at the NANPA database, the 747 area code is <a href="http://www.nanpa.com/nas/public/npa_query_step2.do?method=displayNpa&amp;npaReportModel.nasNpaId=747">already allocated</a> as an overlay to the 818 area code (in California), and is set to be put in service May 18th, 2009 (~3 months from now).</p>
<p>Now, the Gizmo5 site doesn't seem to make any mention of this, and there are only a few posts out there I can find- but they all simply say that the "SIP number" was never meant to be used as a normal PSTN number- it can only be called from one client to another, or as a full SIP address (by tacking on @proxy01.sipphone.com)- if that's the case, it seems really weird that they opted to use phone numbers, instead of just usernames.</p>
<p>I'm not sure how they plan to handle it when *real* PSTN numbers in the 747 area code start getting allocated to people in California, and then one of their users with a DialOut package tries to call one of them? I'm sure it's not going to take long before phone numbers start being duplicated, and they're going to have to solve this issue.</p>
<p>Not to mention general confusion; I've read post after post about people being confused about why they can't dial their 747 phone number from PSTN number.</p>
<p>As far as Fonolo support, I was hoping to simply trunk any calls to the 747 area code over SIP to the Gizmo5 system, as if they were just regular phone numbers; in testing, it seems to work well, but I'd just run into the same issue they will, come May.</p>
<p>I'll have to just add them into the system as generic SIP addresses- hopefully I'll have this working soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2009/02/gizmo5-747-area-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
