<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Christian,<br>
    <br>
    I have a similar problem with a Sangoma B700 card (I think the ISDN
    part is similar, though) and have a Sangoma ticket open (#1310).&nbsp;
    It's intermittent and relies on the outside party reporting the
    quality being poor, so I am waiting for another occasion to arise
    when I can grab some more detailed traces. <br>
    <br>
    Your sample is quiet, which makes it hard to see what is going on.&nbsp;
    I have generated a test tones file which I use as a voicemail
    outgoing message on a test extension which allows me to clearly see
    what is happening to the voice.&nbsp; It uses sox and goes like this:<br>
    <br>
    #!/bin/bash<br>
    <br>
    sox -r 8000 -n out300_0_2.wav synth 2 sine 300<br>
    sox -r 8000 -n out500_0_2.wav synth 2 sine 500<br>
    sox -r 8000 -n out1000_0_2.wav synth 2 sine 1000<br>
    sox -r 8000 -n out2000_0_2.wav synth 2 sine 2000<br>
    sox -r 8000 -n out3000_0_2.wav synth 2 sine 3000<br>
    <br>
    sox -r 8000 -n out300-3400_0_3.wav synth 3 sine 300-3400<br>
    sox -r 8000 -n out1-4000_0_5.wav synth 5 sine 1-4000<br>
    <br>
    sox -r 8000 -n out1000_0_5.wav synth 5 sine 1000<br>
    sox -r 8000 -n out1000_-6_5.wav synth 5 sine 1000 gain -6<br>
    sox -r 8000 -n out1000_-12_5.wav synth 5 sine 1000 gain -12<br>
    <br>
    sox -r 8000 -n outwn_0_5.wav synth 5 noise<br>
    sox -r 8000 -n outwn_-6_5.wav synth 5 noise gain -6<br>
    sox -r 8000 -n outwn_-12_5.wav synth 5 noise gain -12<br>
    <br>
    sox -r 8000 -n outsilence_2.wav synth 2 sine 300 vol 0 amplitude<br>
    <br>
    sox out300_0_2.wav outsilence_2.wav out500_0_2.wav outsilence_2.wav
    out1000_0_2.wav outsilence_2.wav out2000_0_2.wav outsilence_2.wav
    out3000_0_2.wav outsilence_2.wav out300-3400_0_3.wav
    outsilence_2.wav out1-4000_0_5.wav outsilence_2.wav out1000_0_5.wav
    outsilence_2.wav out1000_-6_5.wav outsilence_2.wav out1000_-12_5.wav
    outsilence_2.wav outwn_0_5.wav outsilence_2.wav outwn_-6_5.wav
    outsilence_2.wav outwn_-12_5.wav&nbsp; testtones.wav<br>
    <br>
    You may find something similar useful, or you can download this from
    <a href="http://www.earthspike.net/FreeSWITCH/testtones.wav">http://www.earthspike.net/FreeSWITCH/testtones.wav</a>
    (2.2MB on my domestic broadband).<br>
    <br>
    This is what I have recorded so far (using another FreeSWITCH server
    on the PSTN side): <a
      href="http://www.earthspike.net/FreeSWITCH/choppy_voice.wav">http://www.earthspike.net/FreeSWITCH/choppy_voice.wav</a>
    (3.3MB on domestic broadband). You will notice that the outgoing IVR
    message is perfectly clear, and the voicemail outgoing message (test
    tones) gets messed with.&nbsp; Both are 8kHz WAV, so there is no
    transcoding or anything like that going on.&nbsp; Sometimes hold music
    goes choppy, sometimes not, sometimes the IVR message goes choppy as
    well.&nbsp; Sometimes the choppiness persists until I restart FreeSWITCH;
    other times it is for just one call.<br>
    <br>
    I have also written a script to capture 15s of the voice legs, using
    capture commands outlined by Sangoma support to include stuff around
    the echo canceller. You may also find this useful:<br>
    <br>
    #!/bin/bash<br>
    <br>
    echo "Starting diagnostics"<br>
    DIR_PREFIX=/usr/local/freeswitch/recordings/diagnostics<br>
    FILE_PREFIX=${DIR_PREFIX}/`date +%Y%m%d-%H%M%S`<br>
    FS_CLI_X="/usr/local/freeswitch/bin/fs_cli -x"<br>
    WAN_EC_C=/usr/sbin/wan_ec_client<br>
    <br>
    SPAN=`${FS_CLI_X} 'show channels' | sed -e
    '/FreeTDM/!d;s|.*FreeTDM/\([0-9]\):\([0-9]\)/.*|\1|;'`<br>
    CHNL=`${FS_CLI_X} 'show channels' | sed -e
    '/FreeTDM/!d;s|.*FreeTDM/\([0-9]\):\([0-9]\)/.*|\2|;'`<br>
    <br>
    echo Diagnostic capture utility<br>
    echo ==========================<br>
    echo Detected call on ${SPAN}:${CHNL}<br>
    echo Setting up trace on span wp${SPAN}<br>
    ${FS_CLI_X} "ftdm trace ${FILE_PREFIX} ${SPAN}"<br>
    <br>
    pushd ${DIR_PREFIX}<br>
    echo Recording 15s EC sample on ${SPAN}:${CHNL}<br>
    ${WAN_EC_C} wanpipe${SPAN} monitor ${CHNL}<br>
    popd<br>
    <br>
    echo Stopping trace<br>
    ${FS_CLI_X} "ftdm notrace ${SPAN}"<br>
    <br>
    echo Done.<br>
    <br>
    The script relies on there only being one channel active when you
    want to record the call, so you may have to tune this for your
    requirements.&nbsp; I have created a folder recordings/diagnostics for
    the captured output.&nbsp; The non-profit I do this for has low enough
    traffic to make the single call assumption usually valid.&nbsp; If I am
    near an ssh session, though, I would work out the SPAN/CHNL
    variables manually in case more than one was active.<br>
    <br>
    If you get anywhere with this, let me or the list know.<br>
    <br>
    Note for devs: I haven't opened a FreeSWITCH JIRA on this because it
    is only calls involving my Sangoma card that are affected.&nbsp; If the
    deeper tracing that Sangoma have requested show that it is not in
    their card, then it will go to the FreeSWITCH JIRA.&nbsp; If you wish, I
    can open a JIRA but I'm not sure it's a good thing to have 2
    separate fixes going on.<br>
    <br>
    John<br>
    <br>
    On 01/03/12 16:45, Moises Silva wrote:
    <blockquote
cite="mid:CAA4nhyBUHSEU8RpCi1y5esMY8AA574Ra7cZwbMBW+EWRb4QtMA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Thu, Mar 1, 2012 at 9:45 AM, Christian
        Benke <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:benkokakao@gmail.com">benkokakao@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <br>
          Sangoma's Support appears to be clueless as well, they didn't
          have<br>
          effective suggestions so far(Opened a ticket 2 weeks). Since i
          don't<br>
          have this problem with identical hardware without<br>
          Sangoma-Cards(SIP-Trunk instead), my first assumption was the
          card.<br>
          Probably an interrupt issue?<br>
        </blockquote>
        <div><br>
        </div>
        <div>Another test you can try to pinpoint the issue and
          determine once for all if the problem is below FreeSWITCH is
          to use the "ftdm trace" command. This command</div>
        <div>will create an input an output file (in the directory you
          specify) that contains the raw audio as it is read and written
          from/to the wanpipe device.</div>
        <div><br>
        </div>
        <div>Type "ftdm trace" to see the command syntax. Run the
          command whenever you reproduce the problem (can be run in the
          middle of the call) then stop the trace with "ftdm notrace"
          when you're</div>
        <div>done capturing. Note that the tracing will not stop
          automatically when the call is hung up, the trace is a raw I/O
          trace and has no knowledge of calls starting or being hung up.</div>
        <div><br>
        </div>
        <div>The audio format will be alaw (because is a BRI line), you
          can convert that to a wav (with sox for example) and see if
          the audio issue is there. If it is, we can start thinking on
          lower-level troubleshooting.</div>
        <div><br>
        </div>
        <br class="Apple-interchange-newline">
        <table style="width:486.3pt;border-collapse:collapse" border="0"
          cellpadding="0" cellspacing="0" width="648">
          <tbody>
            <tr style="height:60.55pt">
              <td
style="border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;border-top-style:dotted;border-top-color:rgb(128,176,214);border-top-width:1pt;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt;height:60.55pt">
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><b><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(14,93,167)"
                      lang="PT-BR">Moises Silva<br>
                    </span></b><b><i><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                        lang="EN-CA">Manager, Software Engineering</span></i></b><b><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(14,93,167)"
                      lang="PT-BR"></span></b></p>
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(0,92,165)"
                    lang="EN-CA"><a moz-do-not-send="true"
                      href="mailto:msilva@sangoma.com" target="_blank">msilva@sangoma.com</a></span></p>
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(0,92,165)"
                    lang="EN-CA">Sangoma Technologies</span></p>
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(0,92,165)"
                    lang="EN-CA">100 Renfrew Drive, Suite 100, Markham,
                    ON L3R 9R6 Canada</span><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(255,192,0)"
                    lang="EN-CA"></span></p>
              </td>
              <td
style="width:140.45pt;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;border-top-style:dotted;border-top-color:rgb(128,176,214);border-top-width:1pt;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt;height:60.55pt"
                width="187">
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(0,92,165)"
                    lang="EN-CA"><br>
                    t.&nbsp;&nbsp; +1 800 388 2475 (N. America)</span></p>
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(0,92,165)"
                    lang="EN-CA">t.&nbsp;&nbsp; +1 905 474 1990 x128</span></p>
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(0,92,165)"
                    lang="EN-CA">f.&nbsp;&nbsp; +1 905 474 9223</span></p>
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(31,73,125)"
                    lang="EN-CA">&nbsp;</span></p>
              </td>
              <td rowspan="2"
style="width:111.55pt;border-top-style:dotted;border-top-color:rgb(128,176,214);border-top-width:1pt;border-left-style:none;border-left-width:initial;border-left-color:initial;border-bottom-style:dotted;border-bottom-color:rgb(128,176,214);border-bottom-width:1pt;border-right-style:none;border-right-width:initial;border-right-color:initial;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt;height:60.55pt"
                width="149">
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><a
                    moz-do-not-send="true"
href="http://www.sangoma.com/contact?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email+signatures"
                    target="_blank"><b><span
                        style="color:rgb(31,73,125);text-decoration:none"><img
                          moz-do-not-send="true" border="0" height="15"
                          width="96"></span></b></a><span
                    style="color:rgb(31,73,125)"></span></p>
              </td>
            </tr>
            <tr>
              <td colspan="2"
style="width:374.75pt;border-top-style:none;border-right-style:none;border-left-style:none;border-width:initial;border-color:initial;border-bottom-style:dotted;border-bottom-color:rgb(128,176,214);border-bottom-width:1pt;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt"
                width="500">
                <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><a
                    moz-do-not-send="true"
href="http://sangoma.com/products?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Products</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">&nbsp;|&nbsp;</span><a moz-do-not-send="true"
href="http://sangoma.com/solutions?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Solutions</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">&nbsp;|&nbsp;</span><a moz-do-not-send="true"
href="http://sangoma.com/about_us/events?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Events</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">&nbsp;|&nbsp;</span><a moz-do-not-send="true"
href="http://www.sangoma.com/contact?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Contact</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">&nbsp;|&nbsp;</span><a moz-do-not-send="true"
href="http://wiki.sangoma.com/?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Wiki</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">&nbsp;|&nbsp;</span><a moz-do-not-send="true"
href="http://www.facebook.com/pages/Sangoma-VoIP-Cards/43578453335?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Facebook</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">&nbsp;|&nbsp;</span><a moz-do-not-send="true"
href="http://www.twitter.com/sangoma?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">Twitter</span></a><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                    lang="PT-BR">`| |&nbsp;</span><a moz-do-not-send="true"
href="http://www.youtube.com/sangomatechnologies?utm_source=signature&amp;utm_medium=email&amp;utm_campaign=email%2Bsignatures"
                    target="_blank"><span
style="font-size:8pt;line-height:12px;font-family:Arial,sans-serif;color:rgb(128,176,214)"
                      lang="PT-BR">YouTube</span></a><span
                    style="font-size:8pt;line-height:12px;color:rgb(31,73,125)"></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br>
        </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
    </blockquote>
  </body>
</html>