linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Blackberry version CMR byte sending and recept


From: aleksei drassen
Subject: Re: [Linphone-developers] Blackberry version CMR byte sending and reception
Date: Thu, 19 May 2011 17:38:43 +0100

sounds good, i'll try if that cmr byte affects between blackberry and android.
 
 
About the wireshark dump, you cannot assemble the dumped data you'll need save data with the correct time, i use a sniffer side by side (one direction at time)
 
 
cheers 
 

Date: Thu, 19 May 2011 15:04:33 +0200
From: address@hidden
To: address@hidden
Subject: [Linphone-developers] Blackberry version CMR byte sending and reception

Hi,
I am trying to investigate the problem about the 523 error and the playerListener.ERROR state that often occurs after 30 seconds of call on the BlackBerry version.
I can't understand the mechanism implemented around the CMR byte. In [SendStream.java] the OutputStream.write() method creates an RtpPacket as follows:

RtpPacket packet=JOrtpFactory.instance().createRtpPacket(mFrameSize+1);
System.arraycopy(buffer, lOffset, packet.getBytes(), packet.getDataOffset()+1, mFrameSize);
//set cmr byte
packet.getBytes()[packet.getDataOffset()]=(byte)0xf0;

it adds the CMR byte to the packet payload, and sets it to a fixed value (15) which means that no mode request is present.
In [RecvStream.java] the SourceStream.read() method reads the RtpPacket skipping the CMR byte just added:

//+1 because we need to skip the CMR bytes
int datalen=packet.getRealLength()-packet.getDataOffset()-1;
System.arraycopy(packet.getBytes(),packet.getDataOffset()+1, b, offset, datalen );

Why is there a need to add a CMR byte if the audio from the microphone is in AMR format (and therefore should contain it)?
Why is this byte removed on packet reception?
Do the RtpPackets still contain a valid AMR format? I captured the AMR stream of a call between two blackberry devices via wireshark, dumped it in a file and added the AMR header, but it does not resemble the original audio conversation (it seems a random noise).

Thanks in advance,
Lee

_______________________________________________ Linphone-developers mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/linphone-developers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]