Skip navigation.

BEA WebLogic SIP Server findme Example

Contents

The following sections describe the findme example that is installed with WebLogic SIP Server 2.1.

 

About the Example

The WebLogic findme example provides registration, proxy, and conference calling capabilities for SIP addresses. You can register multiple SIP phone addresses with the findme application and initiate conference calls via a JSP.

findme is implemented as a SIP application that contains three SIP Servlets:

The multiple Servlets are assembled as a SIP application, and Servlet mappings are defined, using the sip.xml descriptor.

findme also provides several JSPs that are used to interact with the included Servlets, as described in Files Used in the Example.

 

File

Description

src/FindMe.java Java source file for a SIP Servlet for proxying INVITE requests.
src/Registrar.java Java source file for a SIP Servlet that registers SIP addresses in response to REGISTER requests, removes registered addresses after the timeout specified by the phone, and resolves addresses as needed to proxy SIP INVITE requests.
src/Conference.java

Java source file for a SIP Servlet that sets up conference calls for registered SIP addresses.

src/dump.jsp

JavaServer Page that displays a list of registered SIP addresses. This JSP interacts with the Registrar.java Servlet.

src/conf.jsp JavaServer Page for selecting registered users to invite to a conference call. This Servlet gets the addresses to use for setting up the call.
src/conf_setup.jsp Non-interactive JavaServer Page that posts the addresses obtained with conf.jsp, using the Conference.java Servlet to set up and connect the addresses in a conference call.
WEB-INF/sip.xml SIP descriptor that defines the components of the SIP application as well as the Servlet mapping.
WEB-INF/web.xml Web Application deployment descriptor.
WEB-INF/weblogic.xml WebLogic Web Application deployment descriptor.
build.xml Ant build script.

Build the Example

Prerequisites

Before working with this example:

  1. Install WebLogic SIP Server.
  2. Use the Configuration Wizard to create a new SIP Server Examples domain. If you create a new example SIP Server domain, the findme example is automatically built and deployed to the domain.

Prerequisites for a Replicated Domain

If you want to deploy the findme example to a cluster of engine tier servers, you must configure the domain to support the example's RDBMS-based registration services (as opposed to the local registration used in single-server deployments). The configuration prerequisites include defining a new JDBC connection pool and also create a new table in your RDBMS with the required findme schema. Follow these steps:

  1. Start the Administration Server for the domain and access the Administration Console.
  2. Select the Services->JDBC->Connection Pools node in the left pane.
  3. Select Configure a new JDBC Connection Pool...
  4. Select the type of RDBMS to which you want to connect, then select a Database Driver to use.
  5. Click Continue.
  6. Fill in the fields of the Define connection properties page as follows:
    • Name: Enter "findme.connection.pool".
    • Database Name: Enter the name of the database to use.
    • Host Name: Enter the host name or IP address of the server that hosts the database.
    • Port: Enter the port number of the database server host.
    • Database User Name: Enter "system". The findme example requires that a database user named "system" has privileges to access the database.
    • Password, Confirm Password: Enter "weblogic." The findme example requires a password of "weblogic" for the database user.
  7. Click Continue.
  8. Click Test Driver Configuration to test the connection to your database, or click Skip this Step.
  9. Select the name of the engine tier cluster in which you will deploy the findme application (for example, "BEA_ENGINE_TIER_CLUST").
  10. Click Create and deploy.
  11. In the left pane, select Data Sources.
  12. Select Configure a new JDBC Data Source.
  13. Fill in the fields of the Configure a JDBC Data Source page as follows:
    • Name: Enter "findme.datasource"
    • JNDI Name: Enter "findme.datasource"
  14. Click Continue.
  15. Select findme.connection.pool from the Pool Name menu, and click Continue.
  16. Select the name of the engine tier cluster on which you will deploy the findme application (for example, "BEA_ENGINE_TIER_CLUST").
  17. Click Create to create the new data source.
  18. On the server that hosts your RDBMS, create a new table named "findme" in the named database. The following SQL statement defines the required columns:
    create table findme
    ( callid VARCHAR2(100),
    username VARCHAR2(100),
    host VARCHAR2(100),
    port NUMBER(20),
    registration LONG RAW
    );

Configuring WebLogic SIP Server

The findme example requires no additional server configuration.

Building the Example

Note: The pre-built findme example is automatically installed with WebLogic SIP Server 2.1. Follow these instructions to rebuild the example after modifying the code:

  1. Set up your environment if you want to build the findme example and deploy it to a new domain:
  2. cd c:\bea\user_projects\domains\mydomain
    setEnv.cmd
  3. Change to the WLSS_HOME\samples\server\examples\src\findme directory, where WLSS_HOME refers to the main WebLogic SIP Server 2.1 installation directory (for example, c:\bea\wlss210\samples\server\examples\src\findme).
  4. Execute the following Ant command to build and install the example:

    ant build

    This command compiles the example into WLSS_HOME\samples\server\examples\build\findme. If you want to build a complete WAR file and copy the WAR to the applications directory of your domain (automatically deploying it), use the Ant command:

    ant application

Deploying the Example

The findme example is automatically deployed to the example domain you can create using the Configuration Wizard (see Creating a New SIP Server Domain). The example build.xml file contains a deploy target that you can use to deploy the example to a new domain. By default, the target is setup to deploy using the following attributes:

  <target name="deploy">
<wldeploy action="deploy"
source="../../build/findme"
name="findme"
user="system"
password="weblogic"
verbose="true"
nostage="true"
adminurl="t3://localhost:7001"
targets="myserver"
/>
</target>

To deploy the example to a different domain, open build.xml in a text editor and change the user, password, adminurl, and targets attributes accordingly. Then deploy using the command:

ant deploy

This command deploys the exploded example application directly from the build subdirectory. To redeploy the application, use the command:

ant redeploy

Note: After you redeploy the findme example, you must restart SIP soft phones to register them with the updated application.

Register SIP Phones

The findme example is compatible with the X-Lite, X-PRO, and Pingtel SIP soft phones. The Pingtel SIP phone does not require registration services.

Follow these instructions to register a free X-Lite SIP phone with the findme application:

  1. Start the X-Lite soft phone software.
  2. Open the Main menu.
  3. Select System Settings > SIP Proxy > [Default]
  4. Enter information for the following fields:
  5. Save the menu settings.
  6. Restart the X-Lite soft phone to register with the findme application. The X-Lite software status message reads "Logged in - Enter Phone Number" after it has successfully registered.

Note: After you redeploy the findme example, you must restart SIP soft phones to register them with the updated application.

Run the Example

To run the example, follow these steps:

  1. Complete the steps in the "Build the Example" section.
  2. Register two or more SIP phones using the instructions in the "Register SIP Phones" section.
  3. Navigate to http://servername:7001/findme/dump.jsp to view the currently-registered SIP addresses.
  4. Navigate to http://servername:7001/findme/conf.jsp to set up a conference call between registered SIP addresses.