Skip Headers
Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.0.5 for Windows
E24265-04
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

24 JSR 180: SIP Communications

The Java ME SDK supports the SIP API for J2ME (JSR 180) with a proxy server, registrar, and network monitor support.

Session Initiation Protocol (SIP) is defined by RFC 3261, available at http://www.ietf.org/rfc/rfc3261.txt.

SIP provides a standard way for applications to set up communications. The application determines what communication actually takes place. SIP can be used to set up instant messaging, text chat, voice chat, video conferencing, or other types of sessions.

24.1 Understanding the SIP Registrar and Proxy

A SIP registrar enables client applications to associate a user name with a specific network address. Client registration informs the SIP proxy server that the client exists.

A SIP proxy server is an entry point into a larger network of proxy servers. SIP messages that arrive at one proxy are routed to an appropriate destination, which is usually another proxy server or an end point, such as a desktop computer or a mobile device. Although SIP messages can be sent directly between devices, they are usually routed through a proxy server.

For example, suppose Doug wants to start a video conference with Polly. Polly is on the road and her mobile phone sends a message to a registrar that associates her name with the mobile phone's network address. When Doug tries to set up the video conference with Polly, his application uses SIP to ask the registrar for Polly's current network location.

24.2 Running SIPDemo

This application is a very simple example of using SIP (JSR 180) to communicate directly between two devices. Usually devices will use SIP with a proxy server to set up direct communications of some kind.

To see how SIPDemo works, run two instances of the emulator. In the first, choose Receive message. You can use the default port, 5070, and choose Receive. The first emulator is now listening for incoming messages.

In the second emulator, choose Send message. Fill in values for the recipient, port number, subject, and message, or accept the defaults, and choose Send. Your message will be displayed in the first emulator. The first emulator's response is displayed in the second emulator.

Try it again with the network monitor turned on. You can see the communication between the emulators in the network monitor SIP tab.