1. Verify that your Sangoma card has hardware echo cancellation by typing the following in your Linux command line
    -> wanrouter hwprobe


    at the end of the output if you see:
    HWEC=0  <---no hardware echo cancellor 
    HWEC= <anything not 0>    <---you have hardware echo cancellation

    Example of "wanrouter hwprobe" for card with Hardware echo cancellation:

    -------------------------------
    | Wanpipe Hardware Probe Info |
    -------------------------------
    1 . AFT-A108-SH : SLOT=1 : BUS=5 : IRQ=17 : CPU=A : PORT=1 : HWEC=256 : V=43
    2 . AFT-A108-SH : SLOT=1 : BUS=5 : IRQ=17 : CPU=A : PORT=2 : HWEC=256 : V=43
    3 . AFT-A108-SH : SLOT=1 : BUS=5 : IRQ=17 : CPU=A : PORT=3 : HWEC=256 : V=43
    4 . AFT-A108-SH : SLOT=1 : BUS=5 : IRQ=17 : CPU=A : PORT=4 : HWEC=256 : V=43



  2. To verify if the hardware echo cancellation is activated, type the following command
    -> wanpipemon -i wXg1 -c ehw   (where X=1,2,3..for interface. ie w1g1)

    If your hardware echo cancellor is activated and being used, the output should show the following for all your channels: 

    wanpipemon -i w1g1 -c ehw
    
    Sangoma HW Echo Canceller is enabled for channel 2
    Sangoma HW Echo Canceller is enabled for channel 3
    Sangoma HW Echo Canceller is enabled for channel 4
    .....


    If your Sangoma card does NOT have hardware echo cancellation activated, you will see:

             Sangoma HW Echo Canceller is disabled for all channels!

This means hardware echo cancellation is disabled, not used.

To troubleshoot this edit the following file by typing;
-> vi /etc/wanpipe/wanpipeX.conf   (replace X with 1,2,3,4...)

Near the end of each file TDMV_HWEC= YES indicates proper active setting:

    [w1g1]
     ACTIVE_CH       = ALL
     TDMV_HWEC       = YES
     MTU             = 8



-> If TDMV_HWEC=NO, change to YES, then restart wanpipe by typing "wanrouter restart" (make sure Asterisk/FreeSWITCH is stopped first)
-> If TDMV_HWEC=YES and you still have this issue, restart wanpipe:
    -> wanrouter restart   (make sure Asterisk/FreeSWITCH is stopped first)
-> run wanpipemon -i wXg1 -c ehw again and see if issue is resolved
    -> if issue not resolved, please contact Sangoma Technical Support


For Customers using Asterisk
-> If wanpipemon -i wXg1 -c ehw indicates echo cancellation is enabled, Dahdi software echo cancellation is NOT used. Disregard the MG2/OSLEC information in /etc/dahdi/system.conf:

        #Sangoma A104 port 1 [slot:1 bus:7 span:1] <wanpipe1>
         span=1,1,0,esf,b8zs
         bchan=1-23
         echocanceller=mg2,1-23
         hardhdlc=24



Dahdi software echo cancellation is only enabled if Sangoma Hardware echo cancellation is disabled/not present.  Asterisk/Dahdi checks to see if Sangoma card has hardware echo cancellation.  If it does, Asterisk/Dahdi uses Hardware echo cancellation and disabled software echo cancellation.  It cannot run both hardware and software echo cancellation at the same time.  

A further check to verify software echo cancellation is not being used:

-> During a call (with wanrouter started of course), run the following command:
    -> lsdahdi

The above command will indicate the live status of Dahdi's software echo cancellation for each channel
The following is an example of "lsdahdi" during a call for a Sangoma card WITH hardware echo cancellation enabled:

## Span  1: WPT1/0 "wanpipe1 card 0" B8ZS/ESF
  1 PRI        Clear       (In use) (EC: MG2 - INACTIVE) 
  2 PRI        Clear       (In use) (EC: MG2 - INACTIVE) 
  3 PRI        Clear       (In use) (EC: MG2 - INACTIVE) 
  4 PRI        Clear       (In use) (EC: MG2 - INACTIVE) 



If software echo cancellation was enabled and being used instead of Hardware echo cancellation, the above output would have indicated:
-> (EC: MG2 - ACTIVE