Mobicents Sip Servlets
Important Note : This example is a modified version of the click to dial example from the sailfin project and is originally available at http://wiki.glassfish.java.net/Wiki.jsp?page=SipClickToDialExample2 . It is has been modified to fit the new JSR 289 application selection process and slimmed down to its minimum. The purpose here is to demonstrate interoperability between containers and show backward compatibility with JSR 116.
Click To Call
Service Description
This simple example shows how SIP Servlets can be used along with HTTP servlets as a converged application to place calls from a web page. This example consists of the following steps:
- Alice and Bob each register a SIP Softphone
- Alice clicks on the "Call" link to place a call to Bob
- Alice's phone rings
- When Alice picks up her phone, Bob's phone rings
- When Bob answers his phone, the call is connected
- When one of them hangs up, the other one is also disconnected
How to activate it
From the binary
It is bundled as a default example with the binary but you can also find the war file corresponding to this example here
.
Drop the downloaded war file into your tomcat_home/webapps
directory or jboss_home/server/default/deploy
directory
Get the corresponding dar configuration file
.
To understand what the dar configuration file is used for, check the Application Router Documentation
.
Drop it in your tomcat_home/conf/dars
directory or jboss_home/server/default/conf/dars
directory.
To use this dar file for this service, specify in the Service xml tag, darConfigurationFileLocation attribute of the tomcat_home/conf/server.xml
file or jboss_home/server/default/deploy/jboss-web.deployer/server.xml
, the following :
conf/dars/click2call-dar.properties
You can now run your container (Tomcat or Jboss).
From the source
Please check out the speed dial example located under this location from the svn repository. Follow the instructions in the README.txt to build and run the example.
The DAR file for this example can be found in the sip servlets impl project under the docs directory Use this as a DAR file (Service tag/darConfigurationFileLocation attribute in the tomcat's server.xml): file:///E:/workspaces/sip-servlets/sip-servlets-impl/docs/dar-click2dial.properties
How to play with it
Starts Two sip phones.
Open up a browser to http://localhost:8080/click2call/. If you have no registered SIp clients you will be asked to register at least two.
Configure your SIP clients to use the sip servlets server as a register and proxy. (ip address : 127.0.0.1, port: 5080)
By default it will accept any password, see below for instructions on how to enable security and authentication. After the registration you will see a table where each cell will initiate a call between the corresponding clients.
You can also navigate to http://localhost:8080/click2call/simplecall.html, which is a simplified version that doesn't require registered clients.
You will see the index page where you can enter two SIP URIs. Enter the URIs of the two SIP phones you just started and click "Submit".
The SIP phones don't have to be registered.
After you pick up both phones the RTP session starts.
Security
To enable security for this application check the following page
Mobicents Sip Servlets
Overview
Documentation
Frameworks
Examples
Contribute
- How to Contribute
- Write a Test/Run the Testsuite
- Feedback
- Source Repository
- Mobicents Sip Servlets in Eclipse
