How to get audio data from rtp packet...?

1.9k Views Asked by At

I'm using .net to do call recroding with pcap.net.

till now I have got the rtp packet. And its length is 32 bytes.

The codec used is G729 and payload type is 18.

byte[] bytes = HexString2Bytes(udp.Payload.ToHexadecimalString());          
string rtppayload = ASCIIEncoding.ASCII.GetString(bytes);

I need to get the actual rtp payload. Plz help me...

1

There are 1 best solutions below

0
On

I have got the voice from rtp packets.

what i have done is that, converted the last 20 bytes of the rtp payload to byte array, then written into a file of raw format.

then done the following steps....

  1. converted the raw file to pcm file by g729 decoder. (downloaded from www.voiceage.com/openinit_g729.php
  2. imported that pcm file to audacity like , import->raw data.
  3. then played the voice.
  4. exported as wav format.