[sip-comm-dev] Need Help with RTP Custom Header


#1

Hi all !

In the past few days I was trying to implement a mechanism to send sound
level information through RTP packets.
I'm going to use the header extension utility in RTP packets.
It have to be done according to this proposal.
http://tools.ietf.org/html/draft-ivov-avt-slic-00

I have all the sound level details calculated.
Just need to send them across the network inside the RTP header.

I tried to do this by implementing a custom codec in JMF.
I referred this example for it.
http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/CustomPayload.html
Also I read this.
http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/guide/RTPExtending.html

I tried by adding the following code in to the PcmPacketizer.process(Buffer
inBuf, Buffer outBuf) method, which I guess should do the work for me.

RTPHeader header = new RTPHeader();
header.setExtensionPresent(true); // This should set the extension bit to
one
header.setExtensionType(2);
header.setExtension(new byte[] {1,1,1,1,1,1,1,1}); // for testing
outputBuf.setHeader(header);

Unfortunately it's not working yet.
I captured the outgoing packets and analyzed them. Still the extension bit
in RTP packet header is set to zero.

Can you please help me to understand how and when to use the RTPHeader class
in JMF?
And can you please tell me whether the path I'm taking to implement this
functionality is correct? (Is there a much easier alternative approach to do
this?)

Thank you so much..

Regards
Dilshan.