Archive for the ‘Voxeo’ Category

Next Developer Jam Session: How Do You Hear Me Now? The Power of Wideband (HD) Audio

Monday, June 6th, 2011

Our next developer jam session is coming soon!

Join us for this session, scheduled for Thursday, June 09, 2011.

In this session, Dan York, Director of Conversations at Voxeo will explain the basics of wideband audio, discuss the various versions of wideband audio deployed in the industry, explain why it is important in terms of business value.

Additionally, he will talk about how wideband audio is implemented in Voxeo’s Prophecy and PRISM products.

Register today for this developer jam session.

8:00 AM US Pacific, 11:00 AM US Eastern, 5:00 PM Central European.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


Voxeo PRISM supports wideband VoIP now

Monday, May 9th, 2011

Voxeo PRISM 10.1 is available at www.voxeo.com/prism for download now.

One of the biggest changes in Voxeo PRISM 10.1 is to support some of wideband VoIP codecs. These wideband, sometimes referred as HD, codecs offer much better sound quality than the traditional codecs.

Here are the codecs Voxeo PRISM 10.1 can set up with the phones.

CODEC NAME SAMPLING RATE DESCRIPTION LICENSE
PCMA 8KHz G.711 alaw INCLUDED
PCMU 8KHz G.711 ulaw INCLUDED
G722 16KHz G.722 INCLUDED
G726-32 8KHz G.726 at 32Kbit/s INCLUDED
GSM 8KHz GSM 6.10 INCLUDED
L16 8/16KHz 16-bit Linear PCM INCLUDED
G729 8KHz G.729 ADDITIONAL
G729 8KHz G.729 Annex B ADDITIONAL
SPEEX 8/16/32KHz Speex INCLUDED
AMR 8KHz AMR-NB ADDITIONAL
AMR-WB 16KHz AMR-WB ADDITIONAL
telephone-event RFC 2833 INCLUDED

Voxeo PRISM 10.1 also supports the following file formats and codecs in playback and recording.

FILE NAME EXTENSION MIME TYPE SUPPORTED CODEC
.wav audio/wav G.711 alaw/ulaw
8/16-bit Linear PCM
Microsoft GSM
.ulaw audio/ulaw G.711 ulaw
.alaw audio/alaw G.711 alaw
.pcm audio/pcm 16 bit Linear PCM
.gsm audio/gsm GSM 6.10
.au audio/au G.711 alaw/ulaw
8/16-bit Linear PCM
.mp3 audio/mpeg MP3
.ogg audio/ogg Vorbis
Speex
.spx audio/ogg Speex
.amr audio/amr AMR
.awb audio/amr-wb AMR-WB


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


How to make Voxeo Prism to talk to PSTN?

Thursday, March 24th, 2011

If you have tried Click-To-Dial example, you might wonder if it is possible to call your home phone or cellular phone, besides the SIP phones. It is definitely possible with Voxeo Prism.

In SIP Servlet, a PSTN phone number is represented by a TelURL object based on RFC 3966. For example, here is the code snippet to generate a TelURL object for 407-555-1212.

  URI target = sipFactory.createURI("tel:+1-407-555-1212");

Once you have a TelURL, you can use it the same way as a SipURI, both of which are URI. When Voxeo Prism tries to send a SIP message to a TelURL, it will try to map the telephone number (in E.164 format) to a SIP address based on ENUM.

According to ENUM, a telephone number in E.164 format should be converted to a unique key based the following steps.

1. Remove all characters with the exception of the digits.  For
      example, given the E.164 number "+1-407-555-1212" (which would
      then have been converted into an AUS of "+14075551212"), this
      step would simply remove the leading '+', producing
      "14075551212".
2. Reverse the order of the digits.  Example: "21215557041"
3. Put dots ('.') between each digit.  Example:
      "2.1.2.1.5.5.5.7.0.4.1"
4. Append the string ".e164.arpa." to the end and interpret as a
      domain name.  Example: 2.1.2.1.5.5.5.7.0.4.1.e164.arpa.

Then the key is used to look up the corresponding SIP address in the DNS NAPTR records. E.g. the following record maps “+1-407-555-1212” to “sip:14075551212@example.com“.

$ORIGIN 2.1.2.1.5.5.5.7.0.4.1.e164.arpa.
       NAPTR 100 50 "u" "E2U+sip"             "!^(\\+14075551212)$!sip:\\1@example.com!"    .
       NAPTR 100 51 "u" "E2U+h323"            "!^\\+14075551000$!h323:operator@example.com!"    .
       NAPTR 100 52 "u" "E2U+email:mailto"    "!^.*$!mailto:info@example.com!"

By default, Voxeo Prism uses the default DNS server configured on the system to perform the ENUM lookup. However, it is possible to specify a specific DNS server for the ENUM lookup. You can even specify a different domain suffix instead of the default “e164.arpa“. Please see Voxeo Prism User Guide for more information on how to configure that.

While ENUM gives you complete control on how to map individual telephone number to different SIP address, another popular way to connect Voxeo Prism to PSTN is through a VoIP (SIP trunking) provider.

Voxeo Prism always looks up ENUM first. If no mapping is found in ENUM and a VoIP provider is configured, the SIP messages will sent to the VoIP provider. The following picture shows where you can configure the VoIP provider’s gateway information.

Obviously, Gateway’s Host, Port, and Protocol specify where the gateway is. If the gateway requires SIP registration, you further configure the Registration section. The registrar’s Host and Port is the same as gateway’s, unless specified differently. The User and Domain allows you to specify the Address-of-Record (AOR) for registration. The Auth User and Password allows you to specify credentials in case the registrar requires authentication.  For more information on specific fields, please refer to Voxeo Prism User Guide.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


Click To Dial: a converged application on Voxeo Prism

Saturday, March 19th, 2011

Voxeo Prism is a converged application platform where you can mingle Web (HTTP) functionality with real-time communication (SIP or XMPP) functionality in a single programming model and application.

A classic example of converged application is Click-To-Dial, where the user can enter two telephone numbers in a web page and the web application calls each phone and connect them together.

In this blog, I will show how to build a simple Click-To-Dial application on Voxeo Prism that can connect two SIP softphones together.

Voxeo Prism supports both Java Servlet 2.5 API and JSP 2.1. It also supports SIP Servlet 1.1 API. So I built this application using JSP and SIP Servlet. Here is how the application, a.k.a. WAR, looks like.

Tutorial.4
   |-- WEB-INF
   |         |-- sip.xml
   |         |-- web.xml
   |         |-- xmpp.xml
   |         |-- sipmethod-application.xml
   |         |-- classes
   |                  |-- com/voxeo/prism/tutorial/four/Call.class
   |                  |-- com/voxeo/prism/tutorial/four/ClickToDialServlet.class
   |-- call.jsp
   |-- index.jsp
   |-- status.jsp
   |-- terminate.jsp
   |-- phone.jpg

Once the application is deployed on Voxeo Prism, go to http://localhost:8080/Tutorial.4 to open home page (index.jsp). It will look like the following.

Once you enter two reachable SIP addresses, e.g. sip:john@somedomain.com and sip:doe@otherdomain.com, and click the Call button. The call.jsp will be invoked to make the call to sip:john@somedomain.com and sip:doe@otherdomain.com respectively and join them together when both have answered.

The following diagram shows how the JSPs, Java objects, and SIP servlet interact with each other.

The logic of making outbound calls  are in the Call.call() method, as shown below. “_factory” is the SipFactory object. “_left” and “_right” are the URIs submitted from the index.jsp. “_servlet” is the name of the ClickToDialServlet defined in its annotation or deployment descriptor. By setting the servlet as  the handler of the session, the servlet will receive all messages for that session.

      _inviteL = _factory.createRequest(_session, "INVITE", _left, _right);
      _inviteR = _factory.createRequest(_session, "INVITE", _right, _left);
      _inviteL.setRequestURI(_right);
      _inviteR.setRequestURI(_left);
      _inviteL.getSession().setHandler(_servlet);
      _inviteL.getSession().setAttribute(Call.class.getName(), this);
      _inviteR.getSession().setHandler(_servlet);
      _inviteR.getSession().setAttribute(Call.class.getName(), this);
      _inviteL.send();
      _inviteR.send();

Once both phones have responded with 2xx answers, Call.connect() will generate ACK for each phone with the SDP from the other phone. If one of the phones returns an error response, the call is terminated. Here is the logic in Call.connect() method.

  synchronized void connect(SipServletResponse response) {
    SipServletResponse otherResponse = null;
    int code = response.getStatus();

    if (code < 200) {
      return;
    }

    if (_inviteL.getSession().equals(response.getSession())) {
      _responseL = response;
      otherResponse = _responseR;
    }
    else if (_inviteR.getSession().equals(response.getSession())) {
      _responseR = response;
      otherResponse = _responseL;
    }

    //TODO: handle 3xx for redirection
    if(code >= 300) {
      terminate();
      return;
    }

    if (otherResponse != null) {
      try {
        if (response.getStatus() >= 200 && response.getStatus() < 300 && otherResponse.getStatus() >= 200 && otherResponse.getStatus() < 300) {
          SipServletRequest ack = response.createAck();
          ack.setContent(otherResponse.getRawContent(), otherResponse.getContentType());
          SipServletRequest otherAck = otherResponse.createAck();
          otherAck.setContent(response.getRawContent(), response.getContentType());
          ack.send();
          otherAck.send();
          _state = State.CONNECTED;
        }
        // container automatically sends ACK in other cases.
      }
      catch (Exception e) {
        terminate();
      }
    }
  }

When the call is terminated, we have to send either CANCEL or BYE to each telephone. Based on RFC 3261, CANCEL should be sent before receiving the final response. The follow is the code to terminate the call to one telephone.

  private void terminate(SipServletRequest invite, SipServletResponse response) {
    try {
      if (invite != null) {
        if (invite.isCommitted()) {
          if (response == null) {
            invite.createCancel().send();
          }
          else {
            invite.getSession().createRequest("BYE").send();
          }
        }
      }
    }
    catch (Exception e) {
      // nothing we can do at this point
    }
  }

To try it out, download and deploy the application to <prism>/apps. Open the home page at http://localhost:8080/Tutorial.4. Make sure you type in valid and reachable SIP addresses. By default, PSTN telephone number won’t work unless VoIP gateway or ENUM are configured, which I will show you in the future blog.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


The Simplest Application on Voxeo Prism

Wednesday, January 26th, 2011

This is the simplest application on Voxeo Prism.

The content of the application is like the following

myapp
  |-- WEB-INF

That’s it!

Simply copying the myapp.war to <prism>/apps directory. The container will automatically detect that and load it up. When it loads myapp up, it will unpack the WAR into <prism>/apps/myapp directory.

Of course, this simplest application doesn’t do anything. Since Voxeo Prism is a converged SIP application server, it can handle both SIP and HTTP. The easiest way to make this application do something is to add an index.html page, as the following.

myapp
  |-- WEB-INF
  |-- index.html

You can simply create an index.html with your favorite text editor and copy it under <prism>/apps/myapp directory.

Here is what I put in my index.html

Hello, welcome to My Application!

And here is what I will see when I open http://localhost:8080/myapp

Try it out.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


How to Find Me or Follow Me?

Friday, January 7th, 2011

Virtual number with Find-Me and Follow-Me service is getting popular. The idea is you can give your friends and family a virtual number. Then you can register multiple phones, such as your cellphone, home phone, and work phone, to that virtual number. When people call your virtual number, the virtual number can ring your registered phones either one by one — Follow Me — or all at the same time — Find Me — until you pick up one of them.

In SIP world, your SIP address, e.g. sip:wchen@voxeo.com, essentially is the virtual number. You can register multiple SIP phones to your SIP address. To Find Me, simply proxy the call to all the registered addresses in parallel. To Follow Me, simply proxy the call to all the registered addresses sequentially.

In the Using SIP Servlet to implement SIP Registrar and Proxy Server blog, I described how registration and proxy works. With SIP Servlet, adding Find-Me and Follow-Me is trivial.

The following code was shown in that blog to demonstrate how SIP proxy works.

  @Override
  protected void doInvite(SipServletRequest req) throws ServletException, IOException {
    // application only has to worry about forwarding the initial request.
    // the rest is taken care by the container.
    if (req.isInitial()) {
      URI callee = req.getTo().getURI();
      Proxy proxy = req.getProxy();

      //let's see if the Location Service has bindings for this callee.
      List<URI> targets = _locator.getContacts(callee);
      if (targets.size() > 0) {
        // The Proxy Server should stay on the signaling path
        proxy.setRecordRoute(true);

        // Let the container handles all the 3xx redirect automatically
        proxy.setRecurse(true);

        // Try all the registered phones for this callee sequentially
        proxy.setParallel(false);

        //Yes, let's proxy the call to the registered phones.
        proxy.proxyTo(targets);
      }
      else {
        // Oops, no phone is registered right now. Let's do our best.
        proxy.proxyTo(callee);
      }
    }

When you have multiple phones registered, the above code essentially provides Follow-Me.

You can change one line — #19 –  to make this become Find-Me.

        proxy.setParallel(true);

What if you want to provide a PSTN virtual number and register PSTN numbers? SIP Servlet can work with either SIP URI and Telephone URL. So there is no difference as far as proxy code concerns. What you need is to connect the platform to a VoIP provider that can provide SIP-PSTN connectivity. In the future blog, I will show you how to configure Voxeo Prism to provide PSTN connectivity.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


Test Drive Voxeo Prism

Tuesday, November 23rd, 2010

If you have followed my last blog, you should have Voxeo Prism installed and running by now.

In this blog, I want to show you how to use a SIP phone to test drive Voxeo Prism. Voxeo Prism comes with a demo application that demonstrates the following functions:

  • SIP voice call
  • DTMF input recognition
  • SIP instant messaging (using SIMPLE)
  • Text-to-Speech
  • Recording
  • Media playback

The following video shows how you can use XLite, a free softphone with both voice and instant messaging capabilities, to test drive Voxeo Prism.

In the future blog, I will show you how this demo application looks like.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


How to install Voxeo Prism?

Thursday, November 18th, 2010

Last blog introduced the basic concepts of Voxeo Prism communication platform. Here I will walk you through step by step on how to install Voxeo Prism.

System Requirements

Voxeo Prism requires a modern Intel based PC with at least 2G of RAM and 1G of free disk space. Voxeo Prism supports Windows (both 32 and 64 bit), Linux (CentOS, both 32 and 64 bit), and Mac.

Please note you must have root privilege on Linux and Mac in order to install Voxeo Prism.

Download Voxeo Prism

Voxeo Prism installers are available at http://www.voxeo.com/prism. Download one suitable for your system.

Install Voxeo Prism

The following are step-by-step instruction on installation. Note that the following screenshots are taken on Mac.

Step 1. Introduction.

Step 2. License Agreement. You must accept the License Agreement in order to install Voxeo Prism.

Step 3. Choose the installation directory. By default, Voxeo Prism is installed in /opt/voxeo/prism on both Linux and Mac, and \Program Files\Voxeo\Prism on Windows.

Step 4. Choose what services to install. By default, Voxeo Prism installs both Application Server service and Media Server service. By checking “Start services automatically”, Voxeo Prism services will be started after installation and when the system is booted up.

Step 5. Choose what modules to install. Modules are pre-built applications on top of Prism. Each module itself deserves another blog to talk about. Unless you are interested in specific modules, for the sake of simplicity, I would recommend not to install these modules.

Step 6. After review the “Pre-Installation Summary”, please click Install button.

Step 7. Installation is completed.

Start/Stop Voxeo Prism

Once the installation is completed, on Windows or Mac, you will also see a systray application being installed. This allows you to start/stop Voxeo Prism from a graphical user interface.

You may also start/stop Voxeo Prism via command line.

  • <prism>/bin/prism start
  • <prism>/bin/prism stop

You may also start/stop individual Voxeo Prism service — Application Server and Media Server — respectively. Please refer to the User Guide for more details.

Prism Home Page

Once Voxeo Prism is started, clicking the “Prism Home” menu item on the systray application will open up the Prism Home page in your web browser. Or simply go to http://localhost:8080 from your web browser.

From the Prism Home page, you can access Read Me, User Guide, Prism Management Console, and Samples. You can also register your Voxeo Prism installation with Voxeo from the Prism Home page.

Prism Management Console

Clicking “Prism Management Console” link in the Prism Home page will open up the Prism Management Console. The default login name and password are admin and admin respectively.

Prism Management Console allows you configure, manage, and monitor the Voxeo Prism and the applications.

For more details about Prism Management Console, please refer to the User Guide.

By now, Voxeo Prism should be installed and running on your system. In the next blog, I will show you how to use the Prism Demo Application to test drive Voxeo Prism.


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


Use Phono with a CCXML App to Call A Phone Number From Your Web Browser

Thursday, October 28th, 2010

Phono - call usIf you look over at the top of the first sidebar of this blog, you’ll now see a “Call Us!” heading, some text and then a “Call” button. If you press that button, very soon you’ll be connected to our Voxeo Sales Team down in our Orlando office … simply using the microphone and speakers on your computer!

This is the magic of Phono!

As I showed in the previous post and video, using Phono with an application running in Voxeo’s Prophecy Hosting environment is as simple as finding the “application id” on the “Contact Methods” tab of your app… and then inserting the appropriate JavaScript into a web page to create a Phono object.

Now.. what if you want to have a button on your website that simply connects the caller to a phone number?

Connecting to a Phone Number – The Simple Way

The previous example showed how to connect it to an application of some type… but what about a phone number? You can simply use the Phono sample apps on phono.com. In fact, if you take the JavaScript code from the last post and just change this:

                  this.phone.dial("app:9991476142");

by replacing “app:….” with a phone number:

                  this.phone.dial("4074181800");

that simple button will call out to that phone number using the default Phono configuration.

This works great – but calls via the sample app are limited to a max of 10 minutes and there is also an introductory and final audio message. What if you want to make it so someone can connect and talk for any amount of time?

To do that, you need to create an application on one of our platforms (Prophecy Hosting (Evolution) or Tropo) that will transfer a call to the target phone number.

Connecting to a Phone Number – The CCXML Way

For this app to transfer a call, I chose to use the W3C industry standard Call Control XML (CCXML) running in Prophecy Hosting. The app does three things:

  1. Accepts an incoming call (which will be coming in from Phono)
  2. Makes an outbound call to a phone number (in this case Voxeo Sales)
  3. Joins the two calls together in a conference.

Now, for this to work for you, you need to:

  1. Have an account on our Evolution developer portal. If you don’t already have one, you can create an account for free.
  2. Have “outbound dialing privileges” enabled for your account. Because of potential malicious use, we don’t enable outbound dialing by default – but we freely give it out if you contact our support team, either by raising a support ticket inside your Evolution account or by simply emailing support@voxeo.com.

Once both of those are true, you can get started. Inside your Evolution account, you’ll first need to go into the “Files, Logs & Reports” area and create a new file under “www” that contains this CCXML – (replacing the phone number with YOUR target phone number):

NOTE: if you move your mouse to the upper right corner of this code listing there is an icon to copy the code to your clipboard. Also note that this code is blatantly copied from the “join” documentation page


<?xml version="1.0" encoding="UTF-8"?> 
<ccxml xmlns="http://www.w3.org/2002/09/ccxml" version="1.0"> 
  <var name="inboundID"/> 
  <var name="outboundID"/> 
  <var name="initState" expr="'state1'" /> 

  <eventprocessor statevariable="initState"> 
    <transition state="state1" event="connection.alerting"> 
      <log expr="'*** INBOUND CONNECTION ALERTING ***'"/> 
      <assign name="inboundID" expr="event$.connectionid" /> 
      <accept connectionid="inboundID" /> 
      <assign name="initState" expr="'state2'"/> 
    </transition> 

    <transition state="state2" event="connection.connected"> 
      <assign name="initState" expr="'state3'"/> 
      <log expr="'*** CONNECTION.CONNECTED: INBOUND ***'"/> 
      <!-- 4079651112 is Voxeo Sales line -->
      <createcall dest="'tel:4079651112'" callerid="'1112223333'" connectionid="outboundID" timeout="'30s'"/> 
    </transition> 

    <transition state="state3" event="connection.progressing"> 
      <log expr="'*** CONNECTION.PROGRESSING ***'"/>  
      <assign name="initState" expr="'state4'"/> 
    </transition> 

    <transition state="state4" event="connection.connected"> 
      <assign name="initState" expr="'state5'"/> 
      <log expr="'*** CONNECTION.CONNECTED: INBOUND ***'"/>  
      <join id1="inboundID" id2="outboundID" duplex="'full'"/> 
    </transition> 

    <transition state="state5" event="conference.joined"> 
      <log expr="'*** CONFERENCE JOINED: INBOUND LEG TO OUTBOUND LEG ***'"/>  
    </transition> 

    <transition event="connection.disconnected"> 
      <log expr="'*** CONNECTION.DISCONNECTED ***'"/>  
      <exit/> 
    </transition> 
  </eventprocessor> 
</ccxml>

After you’ve saved that file, you’ll go over into your Application Manager, create a new “Prophecy 9 – CCXML” application and map that application to your newly created file.

You can then look on the “Contact Methods” tab to find the application ID (“app:numbers“) that you can use with Phono. You can also add a phone number and call the application directly (or use Skype or SIP) to test that the application rings through to your target phone number.

Embedding Phono On A Web Page

Once you have the application running and it calls through correctly, you just need to create a Phono object on your web page. You could use that really basic example I gave in the last post – or much better – check out the examples on Phono.com.

Or… you could use one of the tools that are already emerging to integrate Phono with websites. In my particular case I’m using a very cool WordPress plugin that I’ll be writing about very soon!

However you embed the Phono code, you just need to supply the application ID of your CCXML app and you can start connecting your visitors to your phone number right away!


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


Developers – Want to get in on some VERY cool new tech? Watch labs.voxeo.com tomorrow…

Friday, October 15th, 2010

Tomorrow, at the sold-out JQuery Conference in Boston, we’ll have some big news to share out of our Voxeo Labs team… watch labs.voxeo.com or follow us on Twitter to get the scoop!

It’s going to be SO cool!

voxeophono.jpg


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.