This demo ("CallSetup") combines a Java EE 5 Application with Sip Servlets. Incoming SIP registrations are processed by a SipServlet that utilizes Java EE 5 annotations and EJB 3.0 to store in to a database. The web interface in the same application looks up a SipFactory and places calls, with the help of B2B User Agent SipServlet. This application illustrates how to utilize the powerful component model, IDEs, and Tools of Java EE 5 to write SIP applications. It also shows how Java EE Web components can add communication capabilities to existing web interfaces, with the help of SIP.
Instructions to deploy the sample application CallSetup
Note: For executing SailFin samples, the user must have configured the SailFin server. Here 'INSTALL_HOME' is the sailfin installation directory.
- % cd INSTALL_HOME/bin
- % ./asadmin start-domain domain1
It would start the server.
- % ./asadmin start-database
It would start the database.
- % cd INSTALL_HOME/samples/sipservlet/CallSetup
It would point to the sailfin sample 'CallSetup' directory which contains an 'ant script' to build,deploy and undeploy 'CallSetup' sample.
This script contains individual targets for building and creating a sar file (INSTALL_HOME/lib/ant/bin/ant sar), deploy(INSTALL_HOME/lib/ant/bin/ant deploy) and undeploy(INSTALL_HOME/lib/ant/bin/ant undeploy).
- % INSTALL_HOME/lib/ant/bin/ant clean build deploy
It would build all available java files and going to create a sar file (CallSetup.sar). It would deploy the sar file on SailFin server.
- % INSTALL_HOME/lib/ant/bin/ant undeploy
It would undeploy sar file (CallSetup.sar).
Instructions to execute the sample application CallSetup on Linux
- To Download the SIP Softphone
a. Visit the URL http://www.counterpath.com/x-lite.html
b. Click on the "Download Now".
c. To initiate your X-Lite download, please enter your name and email address. Click on the "Submit Information".
d. Now you are ready to download softphone. Click on the "Download X-Lite 3.0 for Linux".
- Once the softphone is installed and ready to use, you have to make following configuration to the softphone.
a. Click on the button which is right side of the button showing 'CLEAR'. It opens new window showing 'Main Menu'.
b. Click on the option showing "System Settings".
c. Click on the option showing "SIP Proxy".
d. Click on the option showing "[Default]".
e. Enter "Display Name" as "Bob".
f. Enter "User name" as "bob".
g. Enter "Domain/Realm" as "test.com".
h. Enter "SIP Proxy" as IP address of machine hosting the Telco AS, suffixed with the port 5060. i.e. IP address of your machine hosting the Telco AS:5060
i. Enter "Out Bound Proxy" as IP address of machine hosting the Telco AS, suffixed with the port 5060. i.e. IP address of your machine hosting the Telco AS:5060
j. Your changes have been saved. You can close this window now.
- Your SIP phone should attempt to register with the application in the telco AS. For this demo, at least two clients must register with the SailFin Server
a. Start another instance on the same system, one can launch X-Lite application from different terminal window.
b. The second instance can also be run on another system.
- In this second softphone instance, you need to make similar changes as mentioned in above Step 2. Enter a different "Display Name" and "User name". E.g. Alice
- You can test that the registration is successful by pointing your browser to
http://localhost:8080/CallSetup/RegistrationBrowserServlet
You should see a table with all registered clients. E.g. "Bob" and "Alice"
- Click on the check box next to two registered users and click submit. The phone should ring sequentially at the two selected end points.
Instructions to execute the sample application CallSetup on Mac
- To Download the SIP Softphone
a. Visit the URL http://www.counterpath.com/x-lite.html
b. Click on the "Download Now".
c. To initiate your X-Lite download, please enter your name and email address. Click on the "Submit Information".
d. Now you are ready to download softphone. Click on the "Download X-Lite 3.0 for Mac".
- Once the softphone is installed and ready to use, you have to make following configuration to the softphone.
a. Click on the "X-lite" menu item on the top of the screen.
b. Click on the option showing "SIP Account Settings". It opens a new dialog box titled "SIP Accounts".
c. Click on 'Add' to create a new Account. It now opens a new dialog box titled "Properties of Account1". Please stay in the "Account" tab.
d. Enter "Display Name" as "Bob".
e. Enter "User name" as "bob".
f. Enter "Domain" as "test.com".
g. In the the "Domain Proxy setting" select the check box showing "Register with domain and receive incoming calls".
h. Set the radio button option to "proxy".
i. Enter "Address" as IP address of machine hosting the Telco AS, suffixed with the port 5060. i.e. IP address of your machine hosting the Telco AS:5060
- Your SIP phone should attempt to register with the application in the telco AS. For this demo, at least two clients must register with the SailFin Server.
a. Start another instance on the same system, first create another user (say "newuser") with admin privileges. In a terminal window, type "su - "newuser" to that user. Now, type '/Applications/X-Lite.app/Contents/MacOS/eyeBeam' to start second instance of X-Lite.
b. The second instance can also be run on another system.
- In this second softphone instance, you need to make similar changes as mentioned in above Step 2. Enter a different "Display Name" and "User name". E.g. Alice
- You can test that the registration is successful by pointing your browser to
http://localhost:8080/CallSetup/RegistrationBrowserServlet
You should see a table with all registered clients. E.g. "Bob" and "Alice"
- Click on the check box next to two registered users and click submit. The phone should ring sequentially at the two selected end points.
Instructions to execute the sample application CallSetup on Windows
- To Download the SIP Softphone
a. Visit the URL http://www.counterpath.com/x-lite.html
b. Click on the "Download Now".
c. To initiate your X-Lite download, please enter your name and email address. Click on the "Submit Information".
d. Now you are ready to download softphone. Click on the "Download X-Lite 3.0 for Windows".
- Once the softphone is installed and ready to use, you have to make following configuration to the softphone.
a. Click on the "X-lite" menu item on the top of the screen.
b. Click on the option showing "SIP Account Settings". It opens a new dialog box titled "SIP Accounts".
c. Click on 'Add' to create a new Account. It now opens a new dialog box titled "Properties of Account1". Please stay in the "Account" tab.
d. Enter "Display Name" as "Bob".
e. Enter "User name" as "bob".
f. Enter "Domain" as "test.com".
g. In the the "Domain Proxy setting" select the check box showing "Register with domain and receive incoming calls".
h. Set the radio button option to "proxy".
i. Enter "Address" as IP address of machine hosting the Telco AS, suffixed with the port 5060. i.e. IP address of your machine hosting the Telco AS:5060
- Your SIP phone should attempt to register with the application in the telco AS. For this demo, at least two clients must register with the SailFin Server.
a. The second instance can also be run on another system.
- In this second softphone instance, you need to make similar changes as mentioned in above Step 2. Enter a different "Display Name" and "User name". E.g. Alice
- You can test that the registration is successful by pointing your browser to
http://localhost:8080/CallSetup/RegistrationBrowserServlet
You should see a table with all registered clients. E.g. "Bob" and "Alice"
- Click on the check box next to two registered users and click submit. The phone should ring sequentially at the two selected end points.
Send any support requests or technical queries to dev@sailfin.java.net
Return Back
