Help Article: Echo Cancellation on Asterisk
Note: My name is Matt Birkland, I work as a VoIP Engineer for VoiceIP Solutions an Asterisk Provider in the Seattle area. Every Monday I will be submitting a one page Asterisk/VoIP tip of the week on the blog. This week we will discuss echo cancellation.
Echo can stem from several sources. Echo can commonly be generated by the digital to analog conversion. This is mostly problematic on POTS (Plain Old Telephone Service) lines. Mainly through (in my experience) acoustic echo is the culprit. Such as when your voice on the receiving ends speaker is also picked up by the receivers mic. This can be tedious to configure on a phone by phone basis, so I usually turn on aggressive echo cancellation in Asterisk.
Aggressive echo cancellation can only be enabled by editing zconfig.h located in the zaptel source directory. I'm assuming the zaptel source library is in /usr/src . By the way, cleanly shut down Asterisk before following the rest of this guide. Observe:
1) Change directory to zaptel source directory.
example:
[matt@localhost ~]$ cd /usr/src/zaptel
2) I'm using nano to edit the file, but pico, vi, emacs, or any text editor will do.
example:
[matt@localhost zaptel]$ nano zconfig.h
3) Below highlighted in red is the section of the file that need editing to enable aggressive echo cancellation.
example:
* Pick your echo canceller: MARK2, MARK3, STEVE, or STEVE2 :)
*/
/* #define ECHO_CAN_STEVE */
/* #define ECHO_CAN_STEVE2 */
/* #define ECHO_CAN_MARK */
#define ECHO_CAN_MARK2
/* #define ECHO_CAN_MARK3 */
/*
* Uncomment for aggressive residual echo supression under
* MARK2 echo canceller
*/
/* #define AGGRESSIVE_SUPPRESSOR */
4) The next step is to erase the delimiters. For this configuration file the delimiter is "/*" or forward-slash and a Asterisk.
before example: /* #define AGGRESSIVE_SUPPRESSOR */
after example: #define AGGRESSIVE_SUPPRESSOR
Do not erase the '#' sign!!!!! In BASH and many config files it is common to use '#' as the delimiter, but not in this case!
5) The last step is to recompile the zaptel source code. Then restart Asterisk and enjoy.
-Matt
http://www.voiceIPsolutions.com
Echo can stem from several sources. Echo can commonly be generated by the digital to analog conversion. This is mostly problematic on POTS (Plain Old Telephone Service) lines. Mainly through (in my experience) acoustic echo is the culprit. Such as when your voice on the receiving ends speaker is also picked up by the receivers mic. This can be tedious to configure on a phone by phone basis, so I usually turn on aggressive echo cancellation in Asterisk.
Aggressive echo cancellation can only be enabled by editing zconfig.h located in the zaptel source directory. I'm assuming the zaptel source library is in /usr/src . By the way, cleanly shut down Asterisk before following the rest of this guide. Observe:
1) Change directory to zaptel source directory.
example:
[matt@localhost ~]$ cd /usr/src/zaptel
2) I'm using nano to edit the file, but pico, vi, emacs, or any text editor will do.
example:
[matt@localhost zaptel]$ nano zconfig.h
3) Below highlighted in red is the section of the file that need editing to enable aggressive echo cancellation.
example:
* Pick your echo canceller: MARK2, MARK3, STEVE, or STEVE2 :)
*/
/* #define ECHO_CAN_STEVE */
/* #define ECHO_CAN_STEVE2 */
/* #define ECHO_CAN_MARK */
#define ECHO_CAN_MARK2
/* #define ECHO_CAN_MARK3 */
/*
* Uncomment for aggressive residual echo supression under
* MARK2 echo canceller
*/
/* #define AGGRESSIVE_SUPPRESSOR */
4) The next step is to erase the delimiters. For this configuration file the delimiter is "/*" or forward-slash and a Asterisk.
before example: /* #define AGGRESSIVE_SUPPRESSOR */
after example: #define AGGRESSIVE_SUPPRESSOR
Do not erase the '#' sign!!!!! In BASH and many config files it is common to use '#' as the delimiter, but not in this case!
5) The last step is to recompile the zaptel source code. Then restart Asterisk and enjoy.
-Matt
http://www.voiceIPsolutions.com