[Freeswitch-users] Convert pcap file to wav file

Anthony Minessale anthony.minessale at gmail.com
Thu Mar 31 00:50:20 MSD 2016


They told you right in the error.
The syntax of tshark has changed, replaces all instances of -R with -Y



On Wed, Mar 30, 2016 at 12:17 PM, Bruce Ferrell <bferrell at baywinds.org>
wrote:

> The pcap file contains all of the network header information as well as
> the rtp stream data you want.  In order to convert the rtp data to a wave
> file, you will first  need to extract the rtp stream payload from your
> network capture (pcap) file.  See the following links for procedures to do
> this:
>
>
> https://ask.wireshark.org/questions/35353/exporting-payload-data-in-binary-file
> https://ask.wireshark.org/questions/14078/decapsulation-of-data
>
>
>
> On 3/30/16 9:52 AM, amani mansour wrote:
>
> Dear sir i will use this file in the freeswitch whenn i will make a call
>  i will playback this (file.wav)
> i am certain that this file contains only rtp captured from wireshark
>
> thanks
> best regards
> amani
>
> 2016-03-30 17:41 GMT+01:00 Giovanni Maruzzelli <gmaruzz at gmail.com>:
>
>> Google around again, you will find something.
>> >From wireshark gui interface, you must save the rtp streams and then
>> convert. You will probanly find a script to do exactly that.
>>
>> You muat pay attention that your pcap file contains the rtp streams too
>> (not only sip signaling).
>>
>> Anyway, this is a question you would better asks to the wireshark mailing
>> list, is not a quewtion related to FreeSWITCH.
>>
>> -giovanni
>>
>> sent from mobile
>> cell: +39 347 266 56 18
>> Giovanni Maruzzelli
>> OpenTelecom.IT
>> Il 30/Mar/2016 18:37, "amani mansour" <amani.mansour2 at gmail.com> ha
>> scritto:
>>
>>> Hello ,
>>>
>>> Please i need to convert pcap file to wav file with comman linux in
>>> freeswitch
>>> to play back this file .wav
>>>
>>> i found this :
>>> 1 step : write a script to convert  pcap to wav  wich is :
>>> ssrc=$(tshark -n -r /home/amani/projet/PFE/test.pcap  -R rtp -T fields
>>> -e rtp.ssrc -Eseparator=, | sort -u | awk 'FNR ==1 {print}')
>>>
>>> echo $ssrc
>>>
>>> sudo tshark -n -r /home/amani/projet/PFE/test.pcap   -R  rtp -R
>>>  "rtp.ssrc == $ssrc" -T fields -e rtp.payload | tee payloads
>>>
>>> for payload in `cat payloads`; do IFS=:; for byte in $payload; do printf
>>> "\\x$byte" >> /home/amani/projet/PFE/test.raw; done; done
>>>
>>> echo ‘sox has converted pcap to wav file’
>>>
>>>
>>> sox -t raw -r 8000 -v 4 -c 1 -e mu-law  /home/amani/projet/PFE/test.raw
>>> /home/amani/projet/PFE/test.wav
>>>
>>>
>>> ==> but when i run this script  the error is :
>>> tshark: -R without -2 is deprecated. For single-pass filtering use -Y.
>>> ‘sox has converted pcap to wav file’
>>> sox FAIL formats: can't open input file
>>> `/home/amani/projet/PFE/test.raw': No such file or directory
>>>
>>>
>>>
>>> Rq: paylods file is empty  :(
>>>
>>> please can  you help me ???
>>>
>>> thanks
>>> with regards
>>> amani
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: consulting at freeswitch.orghttp://www.freeswitchsolutions.com
>
> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.com
>
> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬

☞ http://freeswitch.org/http://cluecon.com/http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*

ClueCon Weekly Development Call
☎ sip:888 at conference.freeswitch.org  ☎ +19193869900

https://www.youtube.com/watch?v=9XXgW34t40s
https://www.youtube.com/watch?v=NLaDpGQuZDA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160330/10e03a2f/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list