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:

  1. You’ll need to enable the unembedded FreePBX interface first.  Logon to Elastix and pull down the right arrow as shown below, selecting “Security”elastix_security
  2. Select “Advanced Settings” in the “Security” menu.  Turn the slider on to enable the FreePBX admin and assign a password to it.elastix_advanced
  3. 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.unemb_freepbx
  4. Logon using the username “admin” and the password you assigned in step 2.
  5. Once logged into the FreePBX web admin, click on the “Tools” tab and “Asterisk SIP Settings” as shown below.elastix_freep
  6. At the “Asterisk SIP Settings” screen, unselect ALL codecs and click “Submit Changes”.freep_sip
  7. 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.
  8. 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:freep_select_cod
  9. 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!
  10. 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.
  11. 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):Screen Shot 2013-01-22 at 1.38.36 PM

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.

Tagged with:  

4 Responses to Adding/Enabling G.722 HD Audio Codec on Elastix (or FreePBX)

  1. mostafa says:

    after enabling G722 codec, i found elastix not choosing it even this codec is the 1st priority on my IP phone (yealink T22), so i forced this codec on every Elastix extension (disallow=all, allow=G722&alaw). My problem now in outbound calls via SIP trunk, codec forced to be G722 too (i tried to make disallow=G722 on the SIP trunk peer details but no effect), please help me to use G722 internally only.

  2. For most recent information you have to visit world wide web and on the web I found this site as a most excellent
    web site for newest updates.

  3. amir says:

    great info. issue has been resolved.

Leave a Reply

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

Web Hosting