A JAIN-SIP Instant Messaging Client For the People!
A JAIN-SIP Instant Messaging Client for the People!
1. What's in this package?
This package contains the source code of a JAVA based SIP IM client built
on top of the
JAIN-SIP-1.1 API.
The client is a pure JAIN-SIP application: it does not need proprietary nist-sip classes in
addition of those defined in JAIN-SIP 1.1, you can
substitute the NIST-SIP stack by another JAIN-SIP compliant stack and plug the client on top
of it.
This application was successfully tested with Microsoft Messenger, Siemens user agent,
Cisqo User Agent and our SIP proxy, registrar, presence server
2. Client capabilities
- IM capability:
The client can send and process MESSAGE and only process INFO requests.
- Presence information capability:
The client can send and process NOTIFY and SUBSCRIBE requests.
It is done by manipulating the buddies list (adding, removing buddies) and changing
the presence information from the menu (busy, offline, online,...).
The XML supported formats for NOTIFY's body are "xpidf+xml" and "cpim-pidf+xml"
- Multiple independant chat sessions:
The client can initiate chat-sessions with an unlimited number of buddies.
- Client Authentication support:
The client can authenticate itself if it receives some authentication requests.
The default authentication method is DIGEST and it is the only one supported for now.
A window will popup to ask the user for credentials when the client receives authentication
requests.
You can put your own "realm:user:password" combinations in the authentication.xml file to
be uploaded by the client.
- Registration capability:
The client can register and unregister itself to a proxy. It is independant of the
IM capability. In other words, you can still send MESSAGE directly to any buddy
you want to chat with. So, you can do peer to peer testing without using a proxy.
3. The configuration frame
The client has a frame in the menu for initializing the client. Here are a description of each of
the parameters that you can set up.
- Outbound proxy IP address:
This parameter is optional, but it is strongly recommended to fill it up.
It is the default address where to send the messages. You can also use it
for peer to peer testing.
- Outbound proxy port:
It goes with the above parameter for a full path.
- Registrar IP address:
This parameter is used when you click on the sign-in button, it is the path where
the REGISTER messages will be sent.
- Registrar IP port:
It goes with the above parameter for a full path.
- Contact IP address:
This parameter is mandatory, it is the address to use for starting the stack.
- Contact port:
This parameter is mandatory, it is the port to use for starting the stack.
- Contact transport:
This parameter is mandatory, it is the transport to use for sending messages:
UDP or TCP accepted.
- Output file:
This parameter is optional, it is the file where to dump the messages,
the console output will be used if not specified.
- Buddies file:
This parameter is optional, it is the XML file to be used to upload the buddies from,
no buddies uploading will be done if not specified.
- Authentication file:
This parameter is optional, it is the XML file to be used to upload the authenticated users from,
no authentication uploading will be used, if not specified.
- Default Router class name:
This parameter is mandatory, it is the router used to send the messages. The one to use right
now is examples.instantmessaging.presence.IMRouter but you can write
your own and put it there.
- Contact sip url:
This parameter is mandatory, it is sip url used to build SIP messages (the From Header).
4. The XML buddies file
The XML file where to define the buddies to upload to the list. Here are a description of each of
the parameters that you can set up. An example "buddies.xml" is given in the configuration directory.
- BUDDIES tag:
This tag defines the buddies list.
- BUDDY tag:
One buddy
- uri parameter:
Use it to define the buddy URI (SIP:, tel:) MANDATORY.
5. The XML authentication file
The XML file where to define the user/password for a certain realm. Here are a description of each of
the parameters that you can set up. An example "passwords.xml" is given in the configuration directory.
- AUTHENTICATION tag:
This tag defines the authentication process. MANDATORY.
- USER tag:
As many tags as you want.
- realm parameter:
Use it to define the realm to authenticate. MANDATORY.
- name parameter:
Use it to define the name of the user to authenticate. MANDATORY.
- password parameter:
Use it to define the password for this user. MANDATORY.
6. Start the client
Use the makefile (targeted for Linux) provided in this directory to start the client.
The command to execute is: make imgui .
This command will start the JAVA process:
java -Djava.security.policy=./configuration/policy examples.instantmessaging.InstantMessagingGUI -cf ./configuration/dagan.properties
.
7. Build Instructions
You can rebuild the client using the command: make all in case of you wish
to modify the source.
IMPORTANT:
if you get this exception when you start the client:
rebind : //129.6.50.116:0/nist-sip/gov.nist.javax.sip.stack.MessageLogTableImpl
class gov.nist.javax.sip.stack.MessageLogTableImpl exception: Connection refused to host: 129.6.50.116; nested exception is:
java.net.ConnectException: Connection refused: connect
java.rmi.ConnectException: Connection refused to host: 129.6.50.116; nested exception is:
java.net.ConnectException: Connection refused: connect
then you will not be able to see the traces using the viewer application. To remedy,
you have to start the rmiregistry on a separate console and restart the client:
jdk1.3.1_06/bin/rmiregistry -J-Denv.class.path=c:/nist-sip-1.2/classes
If you experience any problems contact us at: Authors