Home Index Changes Prefs Log in »

Difference between version and version     

Back to SipClickToDialExample2, or SipClickToDialExample2 Info


At line 22 added 1 line.
# When one of them hangs up, the other one is also disconnected
At line 31 changed 1 line.
The first servlet is a SIP Servlet that handles softphone registration. When Alice or Bob launches their softphone, it registers the softphone address with a SIP proxy.
The first servlet is a SIP Servlet that handles softphone registration. When Alice or Bob launches their softphone, it registers the softphone address with a SIP proxy. We will record the softphone contact information using Java Persistence API. It will be used later to call Alice or Bob.
At line 33 changed 1 line.
Our registrar servlet will record the softphone contact information using Java Persistence, so that it can be used later to call Alice or Bob.
Below is pseudocode for clicktodial.sip.RegistrarServlet. The full code can be found in the [download bundle|ClickToDial.zip].
At line 35 removed 2 lines.
Below is some pseudocode for clicktodial.sip.RegistrarServlet. The full code can be found in the [download bundle|ClickToDial.zip].
At line 146 changed 1 line.
The Call SIP servlet handles the OK response to the INVITE sent by the PlaceCall servlet above. Once an OK is received from Alice, this servlet sends an INVITE to Bob, specifying Alice's media preferences. When an OK is received from Bob, it sends an ACK to both parties.
The Call SIP servlet handles the OK response to the INVITE sent by the PlaceCall servlet above. Once an OK is received from Alice, this servlet sends an INVITE to Bob, specifying Alice's media preferences. When an OK is received from Bob, it sends an ACK to both parties. It also handle the BYE and call tear down.
At line 202 removed 1 line.
secondPartyAck.setContent(resp.getContent(), "application/sdp");
At line 215 changed 1 line.
The example is distributed as a NetBeans project. You can deploy it directly from [NetBeans 5.5.1|http://www.netbeans.org/community/releases/55/1/] to a [SailFin|http://sailfin.dev.java.net] container.
You will need to [download and install SailFin first.|https://sailfin.dev.java.net/downloads/downloads.html].
At line 217 removed 1 line.
Before you start, you will need to download and build SailFin using [these instructions|https://sailfin.dev.java.net/Build_Instructions_for_SailFin.html]. You will also need to use the Server Manager in NetBeans to add SailFin as a server.
At line 219 changed 2 lines.
To install:
# Unzip the download bundle
The example is distributed as a NetBeans project. You can build and deploy it directly from [NetBeans 5.5.1|http://www.netbeans.org/community/releases/55/1/] to a [SailFin|http://sailfin.dev.java.net] container. You will also need to download install the [SIP development plugin for NetBeans | https://glassfishplugins.dev.java.net/sip/index.html].
After installing SailFin and NetBeans, you will register the SailFin server using Server Manager in NetBeans.
To open the sample in NetBeans:
# Unzip the [download bundle | ClickToDial.zip]
At line 224 removed 1 line.
# Alternatively, you can select "Build" from the NetBeans menu. This will generate "dist/ClickToDial.war", which can be deployed manually.
At line 226 added 3 lines.
Alternatively, you can skip NetBeans and use the <b>ant</b> scripts. There is a <b>build.xml</b> in the top level directory that will automatically build it and generate a deployable archive in <b>dist/ClickToDial.war</b>. You can deploy using <b>asadmin deploy dist/ClickToDIal.war</b>.
At line 228 changed 1 line.
You can test this example using any SIP-based software phone. Instructions are provided for two freely available softphones: [x-lite|http://www.counterpath.com/index.php?menu=Products&smenu=xlite] and [Ekiga|http://www.gnomemeeting.org].
You can test this example using any SIP-based software phone. Instructions are provided for freely available X-Lite softphones: [x-lite|http://www.counterpath.com/index.php?menu=Products&smenu=xlite]
At line 243 changed 1 line.
! 3. Setup the Ekiga Softphone
! 3. Setup Bob's Softphone
At line 245 changed 1 line.
Ekiga is a freely available softphone for Linux and Windows. To set up Bob's softphone in Ekiga, I used the settings below, where 129.148.173.187 is the IP address of my SailFin server.
X-Lite is a freely available softphone for many platforms. To set up Bob's softphone, I used the settings below, where 129.148.173.187 is the IP address of my SailFin server. It is running on port 5060.
At line 247 changed 1 line.
[{Image src='ekiga.png' width='' height='' align='center' }]
[{Image src='xten.png' width='' height='' align='center' }]
At line 249 changed 1 line.
With Ekiga setup, enabled the account to perform the registration. You should see a message like the following in the SailFin log:
With X-Lite setup, enable the account to perform the registration to SailFin server which is acting as a registrar. You should see a message like the following in the SailFin log:
At line 259 added 1 line.
X-Lite also will show a message: <b>You are logged in as Bob</b>. Once X-Lite successfully registers, you can reload Bob's Login web page to get more information about his registration:
At line 257 removed 2 lines.
Once Ekiga is launched, you can reload Bob's page to get more information about his registration:
At line 265 changed 1 line.
! 5. Setup the x-lite Softphone
! 5. Setup the x-lite Softphone. Same as above, but configured for Alice.
At line 267 removed 4 lines.
X-Lite is a free, cross-platform softphone from Counterpath. I used the following setup to have my x-lite softphone log in as Alice:
[{Image src='xten.png' width='' height='' align='center' }]
At line 277 changed 1 line.
Now we are all set up to have Alice place a call to Bob. When Alice clicks on the "Call" link next to Bob's name, her softphone should ring. When she picks up, Bob's sofphone should ring. When he answers, the call is connected.
Now we are all set up to have Alice place a call to Bob (or Bob to Alice). When Alice clicks on the "Call" link next to Bob's name, her softphone should ring. When she picks up, Bob's sofphone should ring. When he answers, the call is connected. Either can disconnect first and the other is automatically disconnected by CallServlet.
« Home Attachments Info Index Changes Prefs
This page (revision-30) was last changed on 04-Sep-09 09:46 AM, -0700 by Binod PG