skip to Main Content

How To: HDVoice In PBX-In-A-Flash

I recently received an email from someone asking about enabling HDVoice in PBX-In-A-Flash.

I’m about to implement a PBXact for our small company, and I have a nicely running PBX in a Flash in my home. I’m wondering if I can HD-Audio-ize the home rig.

Here’s why I ask. We currently run a SIPX PBX in my company. Everything in that box, all the sound files, are all HD. When you talk to it with an HD endpoint, everything just talks HD. It’s a no brainer.

In my home PIAF/FreePBX/Asterisk, nothing is HD. How do I go about HD-izing it? I have the G.722 codecs all turned on, but I’m wondering if there is an easy way to make all HD-capable endpoints automatically talk HD to each other, and to talk HD to the PBX itself.

Any help is appreciated!


Fort Collins, Colorado

Since PBX-In-A-Flash is built upon Asterisk there’s a a good chance that this is possible, but its way outside of my scope. Given my employers migration to the OnSIP Hosted PBX I haven’t run Asterisk seriously for some time.

That said, the important thing isn’t to always know the answer…but rather to know who to go when asking the question. So I dropped a question in the PBX-In-A-Flash user forum. Ward Mundy has a very active user community so it wasn’t long before someone responded, pointing me to a post at PowerPBX.Org.

That post notes that FreePBX doesn’t support rearranging codec order in the manner that you would if you were manually editing the Asterisk SIP.CONF file. They suggest two possible solutions:

The first is disabling all other codecs in the phones, which would force the Asterisk server to transcode any calls in G.711 to/from PSTN sources.

The second solution they suggest is specifying “disallow” for all codec but G.722 in the definition of extensions in FreePBX. This is effectively the same as setting all the phone to use only G.722, but lets you accomplish the task in one central place.

Presuming that FreePBX allows such codec preferences on a per-extension basis both approaches should work nicely.

I’m given to understand by folks at Digium that, unlike G.729, transcoding between G.711 and G.722 is essentially a trivial task for any reasonable host platform. Unless you have a very large volume of calls or an extremely limited server it should not create a problem.

It may be worth following further responses to the question posed in the PIAF user forum as there may be a variety of possible solutions to consider.

P.S. For my next big trick I’m gonna get a fully-accessible and reachable SIP address, but not quite there yet! If you’re thinking about it, can you tell me how you set up your SIP URI It looks like you just turned it on at OnSIP.

The nice thing about OnSIP is that they are 100% SIP and committed to interop in the SIP realm. Within an OnSIP Hosted PBX most structures are exposed by way of SIP URIs. Every user gets a SIP URI. Every extension can be reached by way of a SIP URI. Even every VM box or IVR menu can be reached by SIP URI. So within the OnSIP realm there’s nothing special to setup.

Junction Networks has a nice FAQ entry that describes setting up your DNS so that you can use your own domain as the root address of your SIP traffic. If I did this my SIP URI would be as opposed to As I don’t run a business this has never been a priority for me, but I accept that it could be useful to others.

If you’re not using OnSIP then you might want to have a look at an old post by Barrett Lyon describing the DNS settings he used to handle SIP traffic through his local Asterisk PBX.

Don’t forget to let us know how it goes!

This Post Has 3 Comments
    1. True enough. G.722 uses the same amount of bandwidth as G.711, which remains most commonly used codec in the legacy PSTN. There is a longstanding myth that wideband audio requires higher data rates, but this is not generally the case. More modern codecs use better/newer compression schemes to convey better audio in similar bit rates.

      My series of posts called Making Use Of HDVoice Right Now! details some of the issues surrounding HD calling and some services that allow it with various hardware and software combinations.

  1. Welcome to the biggest conundrum about Asterisk1.4/1.6, and the number one reason that I started using Freeswitch. I think it’s a big problem the way Asterisk ‘negotiates’ (or doesn’t negotiate) the best codec to use between endpoints. It makes the endpoint priority list kind of useless. Asterisk has always set up two separate channels per call and relied on transcoding. This completely sucked when running Asterisk 1.4, which wouldn’t transcode G.722, and isn’t too much of a problem in 1.6 which does transcode it. In the 1.4 days, I had to make two separate registrations on each HD endpoint. One allowing regular audio, and the other allowing HD audio. And the users had to consciously choose the HD line to call another HD phone. It sucked.

    I really like how Freeswitch sets up one channel and negotiates with both endpoints, and will reinvite (or whatever it does) to accomodate the best one based on the priority list in the endpoint. When I was running Asterisk 1.4, I set up Freeswitch on the same box as Asterisk and peered it to the Asterisk. Then I registered all wideband enabled phones to Freeswitch. This solved my problem with negotiating the best codec, as well as added a conferencing system that was (is) way better than the one in Asterisk.

    Now that I run Asterisk 1.6.2, I have the HD phones registered with the Asterisk system again, only allowing their best codec, and letting Asterisk transcode. Although, I still prefer the Freeswitch conference bridge.

    If you don’t want your system transcoding. You will need to install (or switch to) Freeswitch. This might be your excuse to try it out.

Comments are closed.

Back To Top