[SR-Users] [Kamailio-Users] Converting rtpproxy recorded .rtp file to .wav file
Ovidiu Sas
osas at voipembedded.com
Fri Nov 18 19:22:13 CET 2011
I ran into a similar issue and while searching for a solution, I found
a few threads describing the same problem but no solution.It turns out
that the sox command must have the proper arguments in order to
properly decode raw files.Feeding sox with an u-law stream and asking
to be decoded as an a-law stream will create garbled sound.
I posted a more descriptive procedure on how to extract audio from
rtpproxy pcap files
here:http://voipembedded.wordpress.com/extracting-audio-from-calls-recorded-with-rtpproxy/
Regards,Ovidiu Sas
On Thu, Jan 14, 2010 at 5:37 PM, Vikram Ragukumar
<vragukumar at signalogic.com> wrote:
> Hello,
>
> I would also like to mention that the rtpproxy recorded .rtp files were
> generated using the following command
>
> rtpproxy -l listen_ip_address -s udp:127.0.0.1:7722 -a -P -F -r
> record_directory_path -S spool_directory_path
>
> where -P indicates that files would be recorded in the pcap format.
>
> Thanks and Regards,
> Vikram.
>
> Vikram Ragukumar wrote:
>>
>> Carsten,
>>
>> Thank you for your reply.
>>
>> Carsten Bock wrote:
>>>
>>> Hi,
>>>
>>> 1)
>>> Did you try to post your problem on the RTP-Proxy-Users' List?
>>> http://lists.rtpproxy.org/mailman/listinfo/users
>>> Probably, you might get more help there....
>>
>> Yes i have posted on rtpproxy users list.
>>
>>> 2)
>>> Did you try to extract the Audio with Wireshark? If Wireshark can play
>>> the Audio (and i assume it is correctly implemented), then the recorded
>>> stream as such is correct. Then you can check, if the bug lies in rtpbreak
>>> (or as a next step: sox). Just to limit the possible sources of the
>>> problem...
>>
>> I have not tried Wireshark to extract the audio. I have been using
>> rtpbreak to generate the .raw file. Subsequent to which i use sox to convert
>> the .raw to a .wav file. By importing the the .raw file into Hypersignal
>> software, we found that the .raw file doesnt entirely seem to be composed of
>> speech samples, so there could be a problem at the rtpbreak step.
>>
>> This is the command i used to convert rtpproxy's capture file to .raw
>> format
>>
>> rtpbreak -W -r capturefile.rtp
>>
>> Am i missing something here ?
>>
>> Thanks and Regards,
>> Vikram.
>>
>>> Carsten
>>>
>>> 2010/1/14 Vikram Ragukumar <vragukumar at signalogic.com
>>> <mailto:vragukumar at signalogic.com>>
>>>
>>> Hello,
>>>
>>> An update,
>>>
>>> I tried using sox to convert the two .raw files into 2 mono channel
>>> wave files. The command line i used is below :
>>> sox -r 8k -b -c 1 -u rtp.0.0.raw rtp0.wav
>>> sox -r 8k -b -c 1 -u rtp.1.0.raw rtp1.wav
>>>
>>> When i listen to the .wav files, i hear speech but it is buried in a
>>> lot of noise. During blank periods (periods of no speech) there is a
>>> constant volume high pitched noise. Also during periods of speech,
>>> there seems to be bursts of noise in the background.
>>>
>>> The other engineer i work with and i, think that it is possibly
>>> because non-speech data is being interpreted as speech.
>>>
>>> What switch options should i change while invoking sox from the
>>> command line to get rid of the noise?
>>>
>>> Thanks and Regards,
>>> Vikram.
>>>
>>>
>>>
>>> Vikram Ragukumar wrote:
>>>
>>> Hello,
>>>
>>> I used Kamailio+rtpproxy to record a session and rtpproxy
>>> outputs the following files
>>>
>>> long_file_name.a.rtp, long_file_name.a.rtcp,
>>> long_file_name.o.rtp, long_file_name.o.rtcp
>>>
>>> http://www.rtpproxy.org/wiki/RTPproxy/FAQ
>>> From the Rtpproxy FAQ above, i tried to extract the audio using
>>> rtpbreak and sox.
>>>
>>> rtpbreak -W -r long_file_name.a.rtp
>>> rtpbreak -W -r long_file_name.o.rtp
>>>
>>> The above commands generate rtp.0.0.raw, rtp.1.0.raw.
>>>
>>> Then when i run sox using
>>> sox --combine merge -r 8k -A rtp.0.0.raw -r 8k -A rtp.1.0.raw -t
>>> wavpcm -s out.wav i get the following errors :
>>>
>>> sox: invalid option -- -
>>> sox: -c must be given a number
>>>
>>> Is there a switch/anything else that i am missing ?
>>>
>>> Thanks in advance,
>>> Regards,
>>> Vikram.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Kamailio (OpenSER) - Users mailing list
>>> Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>>
>>> --
>>> Carsten Bock
>>> Schomburgstr. 80
>>> 22767 Hamburg
>>> Germany
>>>
>>> Mobile +49 179 2021244
>>> Home +49 40 34927217
>>> Fax +49 40 34927218
>>> mailto:carsten at bock.info <mailto:carsten at bock.info>
>>>
>>> Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html>
>>> - "If God had wanted man to play soccer, he wouldn't have given us arms."
>>
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
--
VoIP Embedded, Inc.
http://www.voipembedded.com
More information about the sr-users
mailing list