Multimedia Fun with SIP

In my evolving unified communications projects, I’ve been searching for a way to switch media between voice and text. My current two Tropo apps (the headline reader and the Gov 2.0 bill browser) are voice-centric, but at times I would like to eliminate the text-to-speech part and just send the text.

This should be possible with SIP, which underlies the unified communications platforms I’ve been accessing with my X-Lite softphone.

So called “multi-modal” communications, in which device capabilities (plain cell phone, smartphone with keyboard, smartphone with video,etc.) and presence ( in meeting, on the road, in the quiet car) are acknowledged in routing and rendering decisions, is one of the important advances of this session technology.

In a full SIP environment, SIP’s presence managers and SIP proxy servers would be able to observe caller and called preferences and set media connections appropriately. (For those curious how this is done, take a look at the RFC 13841, “Caller Preferences for SIP.”)

I don’t have access to a full SIP environment, but with Tropo’s APIs and an amenable SIP softphone, I can incorporate some of these ideas.

My original plan was to exploit the SIMPLE protocol, an instant messaging component that’s part of SIP. I was hoping to speak a command that would instant message sections of text that the TTS engine was stumbling over (or that I didn’t want to be heard out loud) to a compliant softphone (say Blink or CounterPath’s X-Lite).

Tropo’s API supports text messaging, so I assumed I had most of the ingredients. Unfortunately, the Tropo engineers are in the process of implementing SIMPLE.

SIP Communicator with JABBER

However, Tropo does support other IM services, including JABBER, and with its message API, I should be able to launch a chat window.

Could I find a SIP softphone that supports JABBER?

There is at least one, the SIP Communicator, which is an open source project (and part of, by the way, Google Summer of Code 2010). It handles JABBER, as well as AIM, IRQ, Google Talk, and others.

Great.

I revised my headline reader project to message sentences from the story that I wanted to see in text form.

It’s pretty basic (some of the code is below), but it is helpful and practical addition to my unified communications efforts:

 if($result->value=="yes")
       prompt(""."".$sentences[$ix].""."",array("voice"=>"kate") );

       $result=ask("Hear more, or would you like to read this in text?",
			 array ("choices" =>"yes, no, text",
            	         "timeout" => 5,
                         "silenceTimeout"=>2,
            	         "repeat" => 3,
                          "voice" => "kate"));

              if($result->value=="text")
                        message($sentences[$ix],
                                        array("channel"=>"TEXT",
                                        "network"=>"JABBER",
                                         "to" =>IM_addr) ));
               $ix++;

               }while ($ix > count($sentences) && 
              ($result->value=="yes" || $result->value=="text") );
Enhanced by Zemanta