The Open Source SLEE and SIP Server

Mobicents Sip Servlets

Important Note : This example is a modified version of the chatrom server available from the BEA dev2dev .
It is has been modified to fit the new JSR 289 specification. The purpose here is to demonstrate MESSAGE sip extension support.

Chat Server

Service Description

A chat server is a virtual location where many instant messenger applications can talk to each other.
Messages that arrive in a chat room are broadcast to all other people in the room. In other words, all messages are seen by all users. This means when a message arrives at our server application, the user's address will be added to a list. Then the message will be sent to all users in that list.

Additionally, you could implement "commands." A command begins with a forward slash (/) and is not broadcast, but instead is processed by the server itself for special features. The commands implemented are:

  • /join: Silently enter a chat room without broadcasting anything.
  • /who: Print the list of all users in this chat room.
  • /quit: Leave the chat room; no more messages will come in.

How to activate it

From the binary

You can find the war file corresponding to this example

  • Mobicents Sip Servlets 2.X : here .
  • Mobicents Sip Servlets 1.X : 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 :

    You can now run your container (Tomcat or Jboss).

From the source

Please check out the chatserver example located under this

  • Mobicents Sip Servlets 2.X : location
  • Mobicents Sip Servlets 1.X : 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 or jboss's server.xml): file:///E:/workspaces/sip-servlets/sip-servlets-impl/docs/

How to play with it

Starts Two SIP Chat Clients. Point them to sip:just4fun@
Type your message and then click on the send button

You should see the messages in both clients once they are both in the chat server (that is when they sent at least one message to it).

Mobicents Sip Servlets