Annex B: Code examples

B.1.0 Establishing and stopping session - INVITE, 200 OK, ACK - BYE

Originating side

The MIDlet (Listing B.3.1) shows a simplified example of originating side UA in SIP session. The example handles only the SIP signaling in a sequence and does not handle any error cases. The MIDlet implements following things:

Terminating side

This MIDlet (Listing B.3.2) shows an example of terminating side UA in SIP session. The example handles only the SIP signaling in a sequence and does not handle any error cases. The MIDlet does following steps:

B.2.0 Subscribing for presence information

This MIDlet (Listing B.3.3) shows a simplified example of subscribing for presence info. The MIDlet does following things:


Listing B.3.1




Listing B.3.2




Listing B.3.3