Ethereal-dev: [Ethereal-dev] Decoding G.729 using Ethereal, rtpdump and VoiceAge decoder

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Gabriel M." <gabi333@xxxxxxxxx>
Date: Mon, 24 Jul 2006 16:25:32 +0300

Hi,

 

I am trying to decode a VoIP conversation using G.729 encoding. I have read older messages on this list (and others) but I am still not able to dump a listenable .au file.

 

The steps that I made so far:

-          capture the traffic using Ethereal and dumping the RTP data (Statistics -> RTP -> Show all streams -> SaveAs).

-          Use rtpdump (http://www.cs.columbia.edu/IRT/software/rtptools/) to dump only the audio payload (“rtpdump -F payload -f in.rtp -o out.rtp”)

-          Use self-made code (see the code at the end of the e-mail) to convert the rtpdump into the bitstream expected by the decoder

-          Decode the bitstream using the VoiceAge decoder (decoder out.rtp test2.au)

-          Play the test2.au using GoldWave, (with all possible combinations between 16bit signed/unsigned 8000Hz)

 

Unfortunately all I can hear is some weird sound ( I can see voice patterns in GoldWave, but the sound is metalic, almost alien-like). Am I doing something wrong ?

 

References:

http://www.ethereal.com/lists/ethereal-dev/200505/msg00399.html

http://www.dsprelated.com/groups/speechcoding/show/666.php

 

//rtp_bitstream.c

 

[code]

#include <stdio.h>

 

int main(int argc, char **argv)

{

            char c;

            FILE *f=fopen("in.rtp", "r");

            FILE *fileout = fopen("out3.rtp","w");

 

            long lSize;

            char * buffer, * out;

            char qbyte, q;

 

            int i, j =0, k;

 

    fseek (f , 0 , SEEK_END);

    lSize = ftell (f);

    rewind (f);

 

            buffer = (char*) malloc (lSize);

            out = (char*) malloc (lSize * 16);

 

            fread (buffer,1,lSize,f);

 

            for (i = 0; i<lSize; i++)

            {

                       

                        qbyte = buffer[i];

                        for (k=0;k<8;k++)

                        {

 

                                    q = qbyte & 1;

                                    out[j] = 0x00;

                                    j++;

 

                                    if (q == 0)

                                                out[j] = 0x71;

                                    else

                                                out[j] = 0x81;

                                    j++;

 

                                    qbyte >>= 1;

                                   

                        }

            }

 

            fwrite (out , 1 , lSize * 16, fileout);

 

 

return 0;

}

[/code]

 

Best regards,

Gabriel.

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev