Hi all,

I am working on a project MobileSIPClient. The aim of the project
is to form a SIP Client which performs;

- registration to a proxy server.
- deregistration
- adding a contact
- deleting a contact
- instant messaging
- getting the presence information of the contacts
- editing account settings
- making a call. (Real-Time)

I have already achieved first 7 steps. They work well. But I have some concerns about the last step - making a call in REAL-TIME.

I am using SIP protocol for signalling. I am developing this project in J2ME by using Eclipse IDE and Sun Wireless Toolkit 2.5.2. In the step "Making a Call" especially in RTP step, I have achieved:
- Opening Connection for Receiving
- Receiving Packets
- RTP Packet Extraction

My Questions:

- As far as I know, J2ME MMAPI has already PCM codec support. But this is for capturing audio and for playing the audio coming from the remote client? Is this right?

Any need to implement a codec code to play RTP Packets coming from remote client?

- While trying to play RTP Payload, it throws an exception.

ByteArrayInputStream in = new ByteArrayInputStream(RTPSourceStream.getInstance().getRTPPayload());

this.rtp_play = Manager.createPlayer(in, "audio/x-wav");
this.rtp_play.realize(); // Failing at this point

The exception is:

javax.microedition.media.MediaException: Failed to realize Player: Malformed wave media: expected 'RIFF'
at com.sun.mmedia.WavPlayer.doRealize(+341)
at com.sun.mmedia.BasicPlayer.realize(+84)
at RTPConnection.run(+130)

As I understood, we cannot play the raw RTP Payload directly. We need to convert it to something to WAV format. Is this right?

Any comments would be appreciated.