The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Writing Your First SailFin CAFE Application.

Posted by binod on October 1, 2009 at 3:11 AM PDT

How do you write a application that enables communication between two SIP phones? What if you also want to support video calling?

If you are using SIP servlets, you would be writing one or two sip servlets (atleast a few hundred lines of SIP servlet code) to achieve this. But if you are using Sailfin CAFE, then things change quite dramatically. Here is the code to do all of the above, I mentioned.

package my.test;
@org.glassfish.cafe.api.bean.CommunicationBean
public class YourCommunicationPOJO {
}
Thats it!

Under the hood, Framework handles all common activities like registration, SIP invite handling etc using a B2bUA application. Ofcourse, application can override the default behavior using CAFE apis. There is lot more you can do with SailFin CAFE, which I will explain in the subsequent blogs as the project progress further.

Lets take a look at running this application. Here are the steps.

  • Download and Install SailFin V2 b31c
  • Download and install latest SailFin CAFE build.
  • Package the application using the normal web application packaging format. Use your favorite IDE to do that. For compilation, please use SAILFIN_HOME/lib/communication-api.jar.
  • Start SailFin and deploy the application (eg: asadmin deploy firstcafe.war)
  • Now your application is ready to test against any SIP phones. Here is some more information on how to test this application using X-Lite.

  • Setup two X-Lite phones with accounts "alice@example.com" and "bob@example.com" respectively. They will register with SailFin CAFE
  • Click on Alice's phone and type "bob@example.com". Then click on green dial button. See the picture below
  • You can start the video in X-Lite phone to send the video to the other person.

  • Related Topics >> Blogs      Glassfish      J2EE      Java Enterprise      Web Development Tools      
    Comments
    Comments are listed in date ascending order (oldest first)