views:

432

answers:

4

I need to add a functionality to my java-based web application that will allow users to click on a link and the application will automatically call the user and another party and connect them in a phone call.

Does anybody know what would this entail?

Thanks

+2  A: 

The World-Wide Web Consortium has an integrated set of speech interaction standards that you'll find interesting. There's a markup language called VoiceXML that is analogous to HTML in that web applications generate it. It differs from HTML in that it's specialized for temporally-based speech interactions instead of visual interactions. So instead of looking at a screen you listen to audio prompts and computer-generated speech. Instead of typing and mousing, you speak back and what you say is processed by a speech recognizer or recorded.

There are many companies using VoiceXML to automate voice response systems, and they handle billions of calls per year. You've probably talked to them many times without realizing it. One of the best companies in this space is Voxeo, and they have a developer site at http://evolution.voxeo.com/ that you can play with. Evolution lets you call your web application over an ordinary phone (or Skype). You actually talk to a VoiceXML-based web browser which will fetch a VoiceXML page from your Java application server, "play" it to you, listen to what you say, and then report that back to your app via a form submission, get the next page to render to you, etc.

Another related standard is CCXML, or Call Control XML. You use this to create teleconferences that may or may not include a voice response application.

So it sounds like in your case you want your standard web application to talk to a CCXML server and ask it establish call legs to the web user and to a customer service line. I know that Voxeo Evolution offers CCXML as well.

There are other good companies in this space too. One that comes to mind is TellMe, which was bought by Microsoft a year or two ago. These two companies (and others) offer professional services too.

Jim Ferrans
Thank you for your input Jim, I currently know nothing about these markup languages and services so I will look into those standards and research what the an implementation would involve. It is great to have a starting point though because when I started looking this up I had no idea what I was looking for.
Carlos
Carlos, given that you're looking for call control functionality, I'd recommend you kick the tires at Voxeo first (if you are planning a large commercial deployment they offer high volume hosting and and premise-based solutions). Other companies with CCXML support include Aculab and Loquendo (I just happen to follow Voxeo more closely, having done joint work with them.)
Jim Ferrans
Jim, have you heard about Twilio and CloudVox like Joel pointed out? They look like startups that do the things that Voxeo does but with a simpler API. I'm still trying to figure out what to do but CloudVox has very simple and scalable plans that will allow me to only pay for what I need.
Carlos
Carlos, they do sound similar, so definitely check those guys out too. Voxeo has a range of APIs, and a wide range of pricing plans: you ought to find all three roughly comparable.
Jim Ferrans
+2  A: 

Try FreeSWITCH. I have done this before. Its pretty straight forward. Can be a bit hairy when you need to log call accounting and all those stuff. I hopefully would be able to provide you some guidelines and code samples, let me get home first. Cheers.

The good thing in using FreeSWITCH, you will be able to handle multiple calls, and quite a number of. You might need that in future.

Note: You have to use some kind of VoIP provider in order to do that. I was using Gizmo5 that time and it was pretty good.

Sorry buddy, lost the servlet code somewhere. But no worries it was a simple servlet. Fortunately, I had added my example Java code for XML-RPC, into the FreeSWITCH wiki, and actually that was the code my servlet was invoking down the road. Below is the snippet.

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
 XmlRpcClient client = new XmlRpcClient();
 try {
   config.setServerURL(new URL("http://localhost:8080/RPC2"));
   config.setBasicUserName("freeswitch");
   config.setBasicPassword("works");

   client.setConfig(config);           
   // For external phone calls using VoIP. We will use something like below.
   // new Object[]{"originate", "sofia/gateway/gizmo1/6098989898 &bridge(sofia/gateway/gizmo9/0116054545454)"} 
   // gizmo1, and gizmo9 are the accounts configured under freeswitch gateway configuration.
   client.execute("freeswitch.api", new Object[]{"originate", "sofia/internal/1001 &park()"});

 } catch (Exception ex) {
   ex.printStackTrace();
 }

Moreover, you need to configure few things prior doing this. You need to set up the gateway using your VoIP provider settings.

For FreeSWITCH related help, take a look at this SO Thread.

Adeel Ansari
FreeSWITCH looks interesting as compared to having a service provider do this for me since it will probably come out cheaper since at the beginning the system would not be handling too many calls. Gizmo5 was bought by Google and they are not allowing any new sign-ups so I will have to use something else, but I'm sure that would not be a problem.Can you please dig up those guidelines and samples for me? I would greatly appreciate it.Regards.
Carlos
If you want a working application to join two call legs together, without FreeSWITCH, I am having a very badly written, hodge-podge, burte force thread handling, kinda application using JAIN-SIP. But that's just for my personal pleasure, its a toy app supports only one call.
Adeel Ansari
+1  A: 

So I wanted to write this up as an answer to the comment above. The Skype API provides a number of options for telephony in COM, Java and Python:

They provide a communication and command protocol layer for working with Skype, more info on the API here:

https://developer.skype.com/Docs/ApiDoc/Overview_of_the_Skype_API

It's kind of different for every platform, the Linux version is based on DBus or X11.

Jon
Thanks Jon, I will certainly look into this.
Carlos
+4  A: 

It can be done with Twilio, and their new, easy Conferencing API. Trust me, it's really really simple. Another option might be CloudVox, but I haven't (formally) tried their service yet.

Joel M.
Thanks Joel, it seems that Twilio and Cloudvox do these kind of things with a very simple approach.
Carlos