I recently have had prospective clients ask about HD voice/G.722, so I figured I’d experiment and see if it’s supported in Elastix. Turns out Elastix 2.3+ certainly supports G.722, and it’s quite simple to enable without using the command line or manual configuration of .conf files. There’s a noticeable quality difference with G.722 versus G.711 with the same bandwidth overhead as G.711. Note that few SIP providers support HD voice to the PSTN. I use Vitelity pretty much exclusively for my trunks and they max out at G.711. Callcentric and other providers support SIP to SIP trunking with G.722.
To enable G.722 in your Elastix system perform the following steps:
- You’ll need to enable the unembedded FreePBX interface first. Logon to Elastix and pull down the right arrow as shown below, selecting “Security”
- Select “Advanced Settings” in the “Security” menu. Turn the slider on to enable the FreePBX admin and assign a password to it.
- Now that you’ve enabled the FreePBX web admin, go into it by selecting the “PBX” menu at top, and clicking on “Unembedded FreePBX” on the bottom left.
- Logon using the username “admin” and the password you assigned in step 2.
- Once logged into the FreePBX web admin, click on the “Tools” tab and “Asterisk SIP Settings” as shown below.
- At the “Asterisk SIP Settings” screen, unselect ALL codecs and click “Submit Changes”.
- VERY IMPORTANT! You will now be adding codecs ONE AT A TIME in order of preference. First select “g722” and select “Submit Changes”. Then select each codec individually (again ONE AT A TIME) in order of preference. i.e. “ulaw”, then “Submit Changes”, “alaw” then “Submit Changes”, “gsm” then “Submit Changes”, etc.
- Once this is complete you can click the “Apply Settings” on the orange bar at top. You should see the codecs in the order you selected them, like this with “g722” as the left-most, highest priority entry:
- Ensure that your phones have the G.722 codec enabled and are the first preference (must support HD voice, or G.722). I use a Cisco SPA504g and it supports it, as do many newer SIP phones. ATA devices DO NOT support G.722!
- Test your installation to make sure your phone is using the codec, by logging into your Elastix box via SSH. Make a call to voicemail, a conference bridge or whatever on your system and keep it active for the next step.
- While on an active call call, run the command “asterisk -r” and then do a “sip show channels”. If your phone is using G.722 you’ll see this in the output like below (notice extension 1200 is using codec/format g722):
That’s it, you’ve successfully enabled G.722 – let me know your thoughts in the comments section! Enjoy!
Note: once you’ve enabled g722 in FreePBX you can turn it off in Elastix, Security.