best voice codecs for different destinations

Discussion in '3CX Phone System - General' started by Frank D, Feb 3, 2016.

Thread Status:
Not open for further replies.
  1. Frank D

    Frank D New Member

    Joined:
    Oct 6, 2014
    Messages:
    215
    Likes Received:
    6
    Hi,

    the choice of the best codec for each destination has a big effect on the voice quality. I am just in the process of optimising the codecs for our specific situation and want to share my thoughts and get some feedback.

    General technical situation is (please correct me, if I am wrong):
    • In 3cx the calling device request a codec (the one with the highest priority) and if the called device supports this codec, the call will be established in this codec. If the device doesn't support the codec requested, the calling device will request the next codec with the second highest priority etc.
    • With 3cx you can make half the nunber of concurrent HD calls (G7.22) you purchased licences for concurrent calls.
    • The 3cx softphone doesn't support G7.22.

    We have an on-premise installation and we got only one location, with about
    • 220 Yealink T46G desktop phones
    • 30 wireless phones
    • some anlogogue devices connected via beronet, snom and patton atas,
    • some 3cx phones (Softphones)
    • a beronet gateway to pstn

    As the internal bandwith should be fine, we want to to use G7.22 for internal calls. For calls to and from the PSTN we want to use PCMA, as this is the ISDN codec used in Europe and this way, no conversion and less buffering is needed.
    For internal calls involving the softphone or exceeding the concurrent HD-calls limit we want to use G7.11 as I geuss this is the second best codec for internal calls (is it, or what are you using?).
    We think G7.29 will be the best codec for smartphones, the WLAN reception is not very good in many places.

    So the setup is:

    Desktop-Phones:
    • Codec Priority 1: G7.22
    • Codec Priority 2: PCMA
    • Codec Priority 3: G729

    Beronet Gateway (to pstn):
    • Codec Priority 1: PCMA
    • Codec Priority 2: G729

    3cx phone on PC (in general connected via Ethernet, LAN):
    • Codec Priority 1: PCMA
    • Codec Priority 2: G729

    3cx phone on Smartphones (planned)
    • G7.29

    This results in the following codecs chosen for calls:

    Desktop phone -> Desktop phone: G7.22 (G7.11 if concurrent calls HD limit exceeded)
    Desktop phone -> PSTN: PCMA
    Desktop phone -> 3cx phone on PC: PCMA
    Desktop phone -> 3cx phone on Smartphones: G7.29

    PSTN -> Desktop phone: PCMA
    PSTN -> 3cx phone on PC: PCMA
    PSTN ->3cx phone on Smartphones: G7.29

    3cx phone on PC -> Desktop phone: PCMA
    3cx phone on PC -> 3cx phone on PC: PCMA
    3cx phone on PC -> 3cx phone on Smartphones: G729

    3cx phone on Smartphones -> anything: G729

    So this way, always my preferred codec is used. Any feedback so far?

    I don't know about forwarding calls (using the pbx should be fine, but what about local forwarding on the phone) and about conferences (both locally on the phone and using the 3cx conference tool). Are there any new restrictions I haven't thought about? Is the way to have G7.29 as the only codec on the smartphones to risky, or should I add a second fall-back codec as least priority coded on all devices? How do you handle things?

    Best regards Frank

    [edit: deleted G.711 from the list, thanks to the feedback form lneblett]
     
  2. lneblett

    lneblett Well-Known Member

    Joined:
    Sep 7, 2010
    Messages:
    2,061
    Likes Received:
    56
    g711x is the descriptive term to identify the codec whereas PCMx is the form of modulation used to implement. In essence, they are the same. So, g711u = PCMU and g711a = PCMA. In some of your examples, you listed both "g711 and PCMA" and I assumed that without specifically identifying the a or u for the g711 codec, there might be some duplication. In 3CX you will be given the option of PCMU or PCMA.


    As far as I am aware, there is no limitation on any codec other than g729. You should be able to conduct as many g722 calls as you like as it uses no more bandwidth than g711. The 3CX Phone for Windows and Android supports g722 , but am unsure about iOS as I do not have any, but I suspect it supports g722 as well. As far as g729, I guess it depends on the number in use and if you might exceed the license limits and/or where you may use it and if bandwidth requirements become an issue.

    I do not see any issue with your effort. It appears to be more of a personal preference more so than any technical reason. The only thing I might point out is that as each codec has a different perceived level of quality you might find that some people, who do not know about the codecs, may question various calls as to their quality. On one call they may get a perfect internal call of g722 and then on the next call, which may also appear as an extension, it could be g729.
     
  3. Frank D

    Frank D New Member

    Joined:
    Oct 6, 2014
    Messages:
    215
    Likes Received:
    6
    Hi Ineblett,

    thanks for pointing out that G.711 is the same as PCMA/U. Just delete the G.711 codec from the list. This is the way it is configured now anyway, I planned to add G7.11, but now I know, I don't have to, as PCMA already is G.711

    I had a look and you are right, the Windows softphone now support G.722. Thanks for pointing that out. The licence limits are for G.729.
    http://www.3cx.com/blog/docs/bandwidth-utilised-for-voip/
    So I guess the softphone doesn't support G.729. I am not sure if it is G.729 or just G.729.1 which is limited.
    So I will switch to G.722 for all internal non-WLAN calls. For WLAN calls, I am not sure what the best codec is, if G729 is not available for the softphones?

    Regarding the choice of codecs I am very confident. I chose them due to the following technical reasons:
    - G7.22 for internal calls, as it is the highest quality voice codec, if there are no restictions on bandwith (https://de.wikipedia.org/wiki/Mean_Opinion_Score)
    - G7.29 for WLAN calls, as it has very low bandwith requirements and quite nice quality
    - PCMA for PSTN calls, as no conversion will be required.[/list]

    I think bandwidth requirements as well as voice quality (MOS value) are the two top criterias to consider.

    My users really appreciated the difference going to G.722 from PCMA.

    The point you made, that users may be irritated by different codecs being used is an interesting one. On the other hand, I think I don't want to choose a lower quality codec just to have one codec to work with WLAN, too. And on the pstn there are tons of different codec used anyway.


    Best regards Frank
     
    Moawia Noor likes this.
  4. Sopock

    Sopock Member

    Joined:
    Jul 11, 2012
    Messages:
    448
    Likes Received:
    20
    according to manual you are right:
    [​IMG]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. NickD_3CX

    NickD_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Jun 2, 2014
    Messages:
    1,253
    Likes Received:
    63
    Instead of G.729, for the 3CXPhone clients you could used GSM, it is quite compressed and the audio quality is not bad given that is uses nearly half the bandwidth than G.711.

    You can see a comparison here:
    http://www.3cx.com/blog/docs/bandwidth-utilised-for-voip/

    Very nice break-down though OP! :)
     
  6. Frank D

    Frank D New Member

    Joined:
    Oct 6, 2014
    Messages:
    215
    Likes Received:
    6
    Hi Nick,

    thank your for your answer. I will use the GSM codec for mobile phones.
     
Thread Status:
Not open for further replies.