<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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:<br>
      <br>
<a class="moz-txt-link-freetext" href="https://ask.wireshark.org/questions/35353/exporting-payload-data-in-binary-file">https://ask.wireshark.org/questions/35353/exporting-payload-data-in-binary-file</a><br>
      <a class="moz-txt-link-freetext" href="https://ask.wireshark.org/questions/14078/decapsulation-of-data">https://ask.wireshark.org/questions/14078/decapsulation-of-data</a><br>
      <br>
      <br>
      On 3/30/16 9:52 AM, amani mansour wrote:<br>
    </div>
    <blockquote
cite="mid:CAFETSWie-AOtH60_MOV3GjWsUNswnjdwgY+FpKegdh5-O92yvw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dear sir i will use this file in the freeswitch
        whenn i will make a call  i will playback this (file.wav) 
        <div>i am certain that this file contains only rtp captured from
          wireshark </div>
        <div><br>
        </div>
        <div>thanks</div>
        <div>best regards </div>
        <div>amani</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2016-03-30 17:41 GMT+01:00 Giovanni
          Maruzzelli <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:gmaruzz@gmail.com" target="_blank">gmaruzz@gmail.com</a>&gt;</span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <p dir="ltr">Google around again, you will find something.<br>
              &gt;From wireshark gui interface, you must save the rtp
              streams and then convert. You will probanly find a script
              to do exactly that.</p>
            <p dir="ltr">You muat pay attention that your pcap file
              contains the rtp streams too (not only sip signaling).</p>
            <p dir="ltr">Anyway, this is a question you would better
              asks to the wireshark mailing list, is not a quewtion
              related to FreeSWITCH.</p>
            <p dir="ltr">-giovanni</p>
            <p dir="ltr">sent from mobile<br>
              cell: +39 347 266 56 18<br>
              Giovanni Maruzzelli<br>
              OpenTelecom.IT</p>
            <div class="gmail_quote">
              <div>
                <div class="h5">Il 30/Mar/2016 18:37, "amani mansour"
                  &lt;<a moz-do-not-send="true"
                    href="mailto:amani.mansour2@gmail.com"
                    target="_blank">amani.mansour2@gmail.com</a>&gt; ha
                  scritto:<br type="attribution">
                </div>
              </div>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hello ,
                      <div><br>
                      </div>
                      <div>Please i need to convert pcap file to wav
                        file with comman linux in freeswitch </div>
                      <div>to play back this file .wav</div>
                      <div><br>
                      </div>
                      <div>i found this :</div>
                      <div>1 step : write a script to convert  pcap to
                        wav  wich is :</div>
                      <div>
                        <div>ssrc=$(tshark -n -r
                          /home/amani/projet/PFE/test.pcap  -R rtp -T
                          fields -e rtp.ssrc -Eseparator=, | sort -u |
                          awk 'FNR ==1 {print}')</div>
                        <div><br>
                        </div>
                        <div>echo $ssrc</div>
                        <div><br>
                        </div>
                        <div>sudo tshark -n -r
                          /home/amani/projet/PFE/test.pcap   -R  rtp -R
                           "rtp.ssrc == $ssrc" -T fields -e rtp.payload
                          | tee payloads</div>
                        <div><br>
                        </div>
                        <div>for payload in `cat payloads`; do IFS=:;
                          for byte in $payload; do printf "\\x$byte"
                          &gt;&gt; /home/amani/projet/PFE/test.raw;
                          done; done</div>
                        <div><br>
                        </div>
                        <div>echo ‘sox has converted pcap to wav file’</div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>sox -t raw -r 8000 -v 4 -c 1 -e mu-law
                           /home/amani/projet/PFE/test.raw
                          /home/amani/projet/PFE/test.wav</div>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>==&gt; but when i run this script  the error
                        is :</div>
                      <div>
                        <div>tshark: -R without -2 is deprecated. For
                          single-pass filtering use -Y.</div>
                        <div>‘sox has converted pcap to wav file’</div>
                        <div>sox FAIL formats: can't open input file
                          `/home/amani/projet/PFE/test.raw': No such
                          file or directory</div>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>Rq: paylods file is empty  :( </div>
                      <div><br>
                      </div>
                      <div>please can  you help me ??? </div>
                      <div><br>
                      </div>
                      <div>thanks </div>
                      <div>with regards </div>
                      <div>amani </div>
                    </div>
                    <br>
                  </div>
                </div>
_________________________________________________________________________<br>
                Professional FreeSWITCH Consulting Services:<br>
                <a moz-do-not-send="true"
                  href="mailto:consulting@freeswitch.org"
                  target="_blank">consulting@freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitchsolutions.com"
                  rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
                <br>
                Official FreeSWITCH Sites<br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" rel="noreferrer"
                  target="_blank">http://www.freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://confluence.freeswitch.org"
                  rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
                <a moz-do-not-send="true" href="http://www.cluecon.com"
                  rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
                <br>
                FreeSWITCH-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org"
                  target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" rel="noreferrer"
                  target="_blank">http://www.freeswitch.org</a><br>
              </blockquote>
            </div>
            <br>
_________________________________________________________________________<br>
            Professional FreeSWITCH Consulting Services:<br>
            <a moz-do-not-send="true"
              href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://www.freeswitchsolutions.com" rel="noreferrer"
              target="_blank">http://www.freeswitchsolutions.com</a><br>
            <br>
            Official FreeSWITCH Sites<br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://confluence.freeswitch.org" rel="noreferrer"
              target="_blank">http://confluence.freeswitch.org</a><br>
            <a moz-do-not-send="true" href="http://www.cluecon.com"
              rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
            <br>
            FreeSWITCH-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
              rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
            UNSUBSCRIBE:<a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
              rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a></pre>
    </blockquote>
    <br>
  </body>
</html>