Ann Arbor Parking Information by Phone - an Adhearsion Example

Media_httpjsgoeckefil_kjmqy
Recently I was inspired by a post to develop a phone app that could playback information scraped from a website. The folks in Ann Arbor, MI have created a webpage that displays, in HTML, the number of spaces currently available in their 9 downtown lots. Using Hpricot I was able to fetch the webpage and then parse out the appropriate data as follows: [sourcecode language='ruby'] #Fetch the available parking spaces by scraping the Ann Arbor website def fetch_available_spaces doc = Hpricot(url) parking_spaces = Array.new cnt = 0 (doc/"td").each do |row| if row.inner_text =~ /\.{28}/ parking_spaces[cnt].merge!( { :spaces => row.inner_text.gsub("............................ ", "") } ) cnt += 1 else parking_spaces[cnt] = { :name => row.inner_text } end end return parking_spaces end [/sourcecode] Then using the open source Text to Speech engine (TTS) Festival, I was able to create a menu that played back all of the available parking spaces in each lot to a caller. This work resulted in an Adhearsion Component which I then posted on GitHub as a working example app:
Media_httpjsgoeckefil_dsjeb
With the wealth of data and APIs available on the internets coupled with Adhearsion, developing voice mashups just got a lot easier.
Posted
 

Using DRb with Adhearsion

Media_httpjsgoeckefil_ffbje
Adhearsion now has an RPC implementation that supports several technologies out of the box for connecting an external process to Adhearsion. These technologies include a RESTful component, a STOMP queue component, as well as support for Distributed Ruby (DRb). DRb is a distributed object system that allows another process to invoke methods on a remote object over TCP, similar to the Java RMI and included in the Ruby standard library. With a DRb connection you may have inter-process communication between two Ruby processes on the same server, or between two processes distributed geographically via the internet. By default an ami_remote component is enabled in Adhearsion that exposes the Asterisk Manager Interface Class via DRb. With this, you may initiate outbound dials from a Rails app by simply doing the following: [sourcecode language='ruby'] require 'drb' Adhearsion = DRbObject.new_with_uri "druby://localhost:9050" Adhearsion.call_into_context("SIP/17475551212@proxy01.sipphone.com", "play_message_context") [/sourcecode] This example would initiate a call to a SIPPhone user and once connected could play a message to the person dialed. Using an Adhearsion Component you may also add additional RPC methods. For example: [sourcecode language='ruby'] methods_for :rpc do def method_for_remote_access(options) #some code here end end [/sourcecode] This code would create a method that could be accessed via DRb or any of the other supported RPC transports from your remote process. The Adhearsion RPC support is a powerful capability of the framework that allows for virtually any application to access Adhearsion capabilities. For additional information visit the DRb and Components pages on the Adhearsion Wiki.
Posted
 

Finally, Skype on the Block?

Media_httpjsgoeckefil_jivpm
  


Media_httpjsgoeckefil_fumcj

Those who know me are well aware that I have long been a detractor of Skype. I do respect and admire much of what they have done, but the end does not justify the means. While Skype did bring VoIP to the global masses, they did so by creating a walled garden reminiscent of the early days of AOL.

Of course Skype had to come up with an alternative to SIP to resolve NAT issues, but they did not have to keep it closed and proprietary. Google achieved the same thing with GTalk. Google then not only published their Jingle extension to XMPP, but even provided a library for everyone to use. Skype's commercial interest is clearly served by keeping their own protocol under lock and key, but this has stifled innovation. In fairness Skype did release a desktop API and allowed limited access to their SkypeIn/SkypeOut SIP Gateways for large vendors such as Tellme. This is not the same as allowing full peers in their network.

There was a glimmer of hope at Astricon in Glendale last September that I attended. Digium and Skype announced connectivity between the P2P Skype network and Asterisk. This would allow open source developers to begin providing solutions leveraging Skype and its large network of users. But that was September and four months later an imminent release does not appear to be on the horizon.

The other major issue that stifles Skype is their corporate parent, Ebay. Ebay's acquisition of Skype for billions in 2005 was one of the larger blunders in recent tech history. With the latest Ebay earnings call the long held rumors that eBay is about to sell Skype are increasing. The Times published an article today highlighting the reason for the uptick in speculation:

Industry insiders believe that eBay signalled its intent last week after John Donahue, its chief executive, described Skype as a “great stand-alone business”.

Ebay's shareholders would be well served by selling Skype now and putting the cash back in the bank. While Skype themselves, and their users, would be better served by new ownership and vision.

AT&T would do well by acquiring Skype, opening the network by publishing the protocols and instantaneously becoming the dominant player in the space. The synergy that never existed between Skype and Ebay, would be replaced by synergy that could drive real innovation.

Posted
 

Obama the Open Source President?

Media_httpjsgoeckefil_hamsv
First this article was published on the BBC yesterday, reporting that President Obama has tapped Scott McNealy to advise on the Federal Government's technology strategy. Then on the same day Microsoft announces their unprecedented layoffs, the first major layoffs in their 34 year history. All of this on the heels of RedHat's quarterly earnings call reporting growth, in spite of the economic downturn. Is 2009, and the next 4 years (well, lets say it, 8), the time that open source will become the clearly preferred way to run not only your business but the whole Federal Government? A mandate by President Obama, and the person who will occupy his future technology cabinet position, to use only open source is not feasible. What is feasible is a directive that would encourage the selection of an open source technology when it is viable and more cost-effective (which is increasingly the case). As the stimulus package details become clear, and with Obama's penchant for technology, we may see times get a lot tougher for the likes of Microsoft and other proprietary vendors. A case in point. Amazon does a great job of breaking down the costs of their back-end infrastructure. Their Elastic Computing Cloud pricing structure contrasts the costs of operating Linux and Microsoft. One CPU hour of a Linux server runs you $0.10, while a Windows server runs you $0.125. There really is a 'Microsoft Tax'... While the economic downturn is wreaking havoc, there are going to be immense opportunities in the coming years. I for one believe open source will be an even larger factor in rebuilding the technology led economy.
Posted
 

Fonolo and Deep Dialing Ripe for Crowdsourcing

Media_httpjsgoeckefil_edadh
While many times having an IVR interface to the company you are calling is useful. There are those times that from the start, we know we need to speak to a live person. This is when these same systems become a source of frustration. Too often companies make it nearly impossible to get to a real person quickly. In steps 'Deep Dialing' (a similar concept to 'Deep Linking' on the web), which allows you to use an alternative voice system to bypass the IVR menus of a company and get directly to a live person. Fonolo is currently in public beta and making their alternative voice system available to the masses to allow deep dialing to their growing database of companies. This is a great service and as it grows it may very well force companies to make their IVRs more customer centric if they want them to remain relevant. Fonolo has gone an additional step and made a Developer API available. I have taken this API and created the Fonolo Ruby Library on Github.
Media_httpjsgoeckefil_alqab
What is great about this API is that not only does it allow you to place calls via their service using JSON-RPC, it also allows you to retrieve the structure of that company's IVR. You may see an example here. This allows for developers to embed the capabilities in some interesting ways. While Fonolo in the US & Canada relieves frustration and reduces time wasted, making this service available internationally could save real money. I remember my days in The Netherlands dealing with UPC, and the fact that I had to pay 10 Euro Cents per minute for the privilege of calling their customer service number to correct yet another one of their billing mistakes. And in those times that impenetrable IVR probably cost me the equivalent of a new bicycle. Last count I saw from December is that Fonolo had ~300 companies in their deep dialing database. The next step for Fonolo should be to crowdsource the build out of their database. Then we may see thousands of companies available to be deep dialed.
Posted
 

ECHI-Converter Refactoring & Migration to Github

Media_httpjsgoeckefil_spcru
Much time has passed since I wrote the first release of the open source ECHI-Converter on a train ride from Sevilla to Madrid on the AVE. At the time I had a customer that had been promised a deliverable by a system integrator that in the end did not do so. I was faced with a strong rebellion or I had to simply get the deliverable done on my own, and fast. So on a break from my holiday for a meeting in Madrid, I found myself on a fast train with a lousy GPRS connection (suppose to be 3G of course) reading through cryptic docs and hacking away. That was July 2007. Since then the utility has been adopted around the world in many different settings, by company names you would know. The time has come to refactor the code-base since it appears the Avaya CMS will live longer than originally thought. To this end I have already extracted the core conversion capabilities into a stand-alone library, ECHI_Files, and place it on Github.
Media_httpjsgoeckefil_fhffy
The library will serve as the cornerstone of the refactoring of the code-base that will allow me to easily add new features and maintain it going forward. The ECHI-Converter project will also migrate from the SVN repository at Rubyforge to the Git repository at Github. Stay tuned for the 0.5.0 release!
Posted