Fun with HPEC

By Malcolm Davenport

What in the world is HPEC? I briefly mentioned it yesterday, but I’ll do a little bit more elaboration here.

We’ve written a number of open source echo cancelers, all named after people (Mark, Mark 2, Mark 3, Steve, Steve 2, KB1, MG2). And they’re all *pretty* good, but none of them are G.168, the ITU recommendation for how echo cancelers should perform, compliant. And while they were all *pretty* effective, they’ve all got their holes – especially when it comes to their Non Linear Processors and their ability to handle longer tail lengths.

We don’t presently have any echo cancellation DSP gurus on staff, so we did the next best thing – we went out and licensed a commercial implementation that is G.168 compliant, that can handle long tail lengths, and that supports all sorts of fancy things to give you a nice and happy audio experience.

And the best part? We give it away at no-cost to our in-warranty analog hardware customers. That means TDM400P, TDM800P, and TDM2400P customers. If you’ve got one of those cards and you’d like to be thrilled with the performance of your echo canceler, e-mail our Sales folks for your license key.

So, back to the title of this posting:

I’m walking through support a few weeks ago and a customer has called in complaining that their HPEC isn’t working; and when they turn it on, their audio sounds horrible!

What to do…

The technician opens up zapata.conf, where the echo cancellation is enabled, and discovers the following:


For those of you that aren’t Asterisk junkies, know that Asterisk reads its echo cancellation from a variable that’s configured in numbers of taps, not tail length in milliseconds. Translation: the customer had exactly 16/8 = 2 milliseconds worth of echo cancellation enabled. Echo Cancellation algorithms aren’t designed to operate at such a low level. Your ear can’t hear any echo inside of 2ms – you need about 20ms of delay to even know you’ve got echo on the line.

The technician reset the value to 512, meaning 64 milliseconds, reloaded Asterisk, and had the customer complete a test call.

I’ll do a little self-censoring here as the words out of the customer’s mouth were:

Wholly superior, this audio is fantastically awesome.

Many happy customers later, I encourage everyone to give HPEC a try.


P.S. I’ll probably talk about products a lot, that’s because I’m a product manager, duh. 🙂

— Malcolm Davenport —

Related Posts

There's One Comment

Add to the Discussion

Your email address will not be published. Required fields are marked *

About the Author

Malcolm Davenport

Digium lifer, celebrator of 17 Digium birthdays, and Digium employee #4."I like telephony and I cannot lie. You other vendors can't deny; When a call comes in with MOS so you can't hear and some echo in your ear you get angry!" - Sir Mix-a-Malcolm

See All of Malcolm's Articles