Capture Audio Recording from card
The following instructions detail how to capture and analyze a binary echo canceller recording captured from the Sangoma card. Â
How to Capture a Binary Echo canceller Recording
 Follow the instructions below how to take a binary audio recording from the Echo cancellor chip, if you are experiencing these symptoms:
-> Echo/noise
-> DTMF issues
-> one-way audio issues
Â
The hardware echo canceler chip has a debug feature where a DEBUG Monitor will capture chip debug data during active calls. The captured debug binary file can be sent to Sangoma for further processing and analysis.
Below is a block diagram of how the audio is processed during a call (rx and tx read and write)
Â
Â
Â
Sangoma Support will analyze the Rin/Rout, Sin/Sout audio streams from the binary recording
Note:
 if using FreeSWITCH, make sure to use the CLI command: "ftdm trace" to take audio recording from Freetdm point of view, to compare the Tx and Rx audio from FreeSWITCH with that of the hardware echo canceller
Establish a call that has an echo, noise, dtmf, or one-way audio problem Â
Determine the call channel number by running "show channels" on Asterisk/FreeSWITCH CLI:Â Â Â Â Â Â
CLI> show channels  ÂRun a echo canceler debug utility on that channel (15 sec recording)
#>wan_ec_client wanpipe1 monitor <channel number>Â
     Â
   -> Where <channel number> is a channel number obtained in step 2.  Â
   ->The above command will record for 15 seconds and then stop.
   ->The wan_ec_client will write a binary file in your local directory. Â
ÂÂ To record for 2 mintues run
#>Â wan_ec_client wanpipe1 monitor120 <channel number>
   ->Where <channel number> is a channel number obtained in step 2.  Â
   ->The above command will record for 120 seconds and then stop.
   ->The wan_ec_client will write a binary file in your local directory.Binary file optioned will be sent to Sangoma SupportÂ
*NOTE: Only Sangoma support can analyze trace with proprietary toolÂ
How to analyze binary echo canceller Recording
*Windows Environment compatibleÂ
Once the customer has captured a binary echo canceller recording, analysis is only authorized by a Sangoma employee because the tool used is propriety (remote_client.exe)
Download the following Windows executable application into a clean folder:
→copy the captured binary echo canceller recording (i.e. wan_ec_wanpipe1_if1_chan1_3.30.2010_17.20.40.bin) into the same folder
At this point, only remote_client.exe and the binary file should be in the folder
Open Windows command line terminal
Change directory to the folder that contains the above two contents
->Â cd <full path of folder>run the remote_client.exe with the bin file as the argument
-> type:Â remote_client.exe <full name of bin file>
-> i.e. remote_client.exe wan_ec_wanpipe1_if1_chan1_3.30.2010_17.20.40.binOnce complete, the application should have extracted the contents of the binary file in the same folder
To listen any of the above samples, download an audio analysis program
-> typical we use a program called 'audacity' that can be downloaded for free by navigating to Audacity
ÂOpen Audacity, and import a particular audio sample from the above extracted from remote_client.exe
Â
Â
Â
*Note: 'Encoding' should be toggled to the correct type dependant on the audio sampleÂ
ÂTo figure out which audio file you wish to listen to, refer to the diagram at the top of the page
If Rin=bad audio
-> Either the FPGA is corrupting the audio, or Wanpipe/Dahdi/Asterisk is corrupting the audio
-> Use dahdi_monitor to take a software audio recording from the dahdi layer (that sits between the Wanpipe driver and Asterisk)
  ->  if dahdi_monitor samples return bad audio, then we have verified where the bad audio is coming from (depending if the sample is the TX or TX direction)
  -> if dahdi_monitor returns perfect audio in both the RX and TX direction, the FPGA may be corrupting the audio
Â
If Sin=bad audioÂ
-> The Bad audio is coming directly from the Line connected to the Sangoma card=telco/line issue
Â
If Sout/Rout=bad audioÂ
-> Hardware Echo Cancellor is corrupting the audio