Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

help on custom templates yealink codec config

Discussion in '3CX Phone System - General' started by dandenson, Dec 7, 2018 at 5:49 PM.

  1. dandenson

    dandenson New Member

    Joined:
    Mar 1, 2018
    Messages:
    202
    Likes Received:
    20
    I'm not wrapping my head around how 3cx UI translates to yealink template.

    I absolutely need 2 things and it seems a custom template is my only option.
    1) TCP for SIP.
    2) OPUS codec.

    I can enable both of these in a custom template today, and #1 is simple (account.1.sip_server.1.transport_type = 1 for anyone else searching) but #2 is funky.

    can anyone help me decipher this system? I'd like to just have it so opus shows up in phone provisioning and passes through to the phone nicely.



    some if statements with code like:
    account.1.codec.10.enable = 0
    account.1.codec.10.payload_type = Opus
    account.1.codec.10.priority = 0
    account.1.codec.10.rtpmap = 107


    this part
    account.1.codec.opus.enable = %%opusid.codecselected%%
    account.1.codec.opus.priority = %%opusid.priority%%
    account.1.codec.opus.rtpmap = 112
    account.1.codec.pcmu.enable = %%pcmuid.codecselected%%
    account.1.codec.pcmu.priority = %%pcmuid.priority%%
    account.1.codec.pcma.enable = %%pcmaid.codecselected%%
    account.1.codec.pcma.priority = %%pcmaid.priority%%
    account.1.codec.opus.para = Opus-WB

    and finally, the messiest:
    <Codecspriorities>
    <Codecspriority variableName="codec1" PayloadTypeName="payload1" priority="1">
    <!--The first entry is the selected entry in management console. codec1 will be replaced by value, payload1 will be replaced by payload-->
    <option value="0" payload="PCMU">PCMU</option>
    <option value="8" payload="PCMA">PCMA</option>
    <option value="18" payload="G729">G729</option>
    <option value="9" payload="G722">G722</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    </Codecspriority>
    <Codecspriority variableName="codec2" PayloadTypeName="payload2" priority="2">
    <!--The first entry is the selected entry in management console-->
    <option value="8" payload="PCMA">PCMA</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="0" payload="PCMU">PCMU</option>
    <option value="18" payload="G729">G729</option>
    <option value="9" payload="G722">G722</option>
    </Codecspriority>
    <Codecspriority variableName="codec3" PayloadTypeName="payload3" priority="3">
    <!--The first entry is the selected entry in management console-->
    <option value="9" payload="G722">G722</option>
    <option value="0" payload="PCMU">PCMU</option>
    <option value="8" payload="PCMA">PCMA</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="18" payload="G729">G729</option>
    </Codecspriority>
    <Codecspriority variableName="codec4" PayloadTypeName="payload4" priority="4">
    <!--The first entry is the selected entry in management console-->
    <option value="18" payload="G729">G729</option>
    <option value="0" payload="PCMU">PCMU</option>
    <option value="8" payload="PCMA">PCMA</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="9" payload="G722">G722</option>
    </Codecspriority>
    <Codecspriority variableName="codec5" PayloadTypeName="payload5" priority="5">
    <!--The first entry is the selected entry in management console-->
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="9" payload="G722">G722</option>
    <option value="0" payload="PCMU">PCMU</option>
    <option value="8" payload="PCMA">PCMA</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="18" payload="G729">G729</option>
    </Codecspriority>
    </Codecspriorities>
     
  2. eddv123

    eddv123 Well-Known Member

    Joined:
    Aug 15, 2017
    Messages:
    1,412
    Likes Received:
    186
    A custom template is one way of doing it, however on the extension settings in the PBX I see OPUS support and a "SIP Transport" tab for TCP/UDP/TLS.

    You could just set it here, or if you have multiple extension requirements see if the parameters exist in the .CSV file: https://www.3cx.com/docs/bulk-extension-import/

    You would probably need to test this to ensure that the Yealinks take the settings (Wireshark capture should do it) but if provisioned from 3CX this should be fine.
     
  3. dandenson

    dandenson New Member

    Joined:
    Mar 1, 2018
    Messages:
    202
    Likes Received:
    20
    eddv123, for Yealink T48S (and all the T4xS models) the templates don't have opus or sip transport options.
     
  4. eddv123

    eddv123 Well-Known Member

    Joined:
    Aug 15, 2017
    Messages:
    1,412
    Likes Received:
    186
    Interesting you should say that, although I have not implemented this codec yet I do see in the templates parameters for:

    account.1.codec.opus.enable =

    And other options. It must support parameters for the 3CX extension to send the provisioning parameters I would of thought.

    Have you tested from the 3CX side yet ?
     
  5. dandenson

    dandenson New Member

    Joined:
    Mar 1, 2018
    Messages:
    202
    Likes Received:
    20
    yes, I have T48S phone working well with opus enabled, but the custom template I'm using is a hacked up mess and I have to login to the phone directly and set the opus priority. Also, only supports Opus-WB. If I try to force the phone to Opus-NB it ignores it and uses WB.

    There was a comment by an employee that the opus support is not quite where it needs to be on some models of yealink which I'm extrapolating as the reason it's not implemented. The only yealink phone with opus enabled in the templates today is the android based unit.
     
  6. eddv123

    eddv123 Well-Known Member

    Joined:
    Aug 15, 2017
    Messages:
    1,412
    Likes Received:
    186
  7. dandenson

    dandenson New Member

    Joined:
    Mar 1, 2018
    Messages:
    202
    Likes Received:
    20
    yes, the comment i'm referring to is within the last week but in the v16 questions post. I'm 'backporting' the statements to 15.6
     
  8. cloidhamer

    Joined:
    Jan 30, 2009
    Messages:
    33
    Likes Received:
    1
    The template the XML portion of it is for the 3CX Management Console. It sets the defaults on the Phone Provisioning tab.

    So the portion below sets the Codec fields in the Phone Provisioning tab.

    <Codecspriorities>
    <Codecspriority variableName="codec1" PayloadTypeName="payload1" priority="1">
    <!--The first entry is the selected entry in management console. codec1 will be replaced by value, payload1 will be replaced by payload-->
    <option value="0" payload="PCMU">PCMU</option>
    <option value="8" payload="PCMA">PCMA</option>
    <option value="18" payload="G729">G729</option>
    <option value="9" payload="G722">G722</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    </Codecspriority>

    If you want Opus to be the default when you provision a new phone then you move this to be just under <Codecspriorities>

    <Codecspriority variableName="codec5" PayloadTypeName="payload5" priority="5">
    <!--The first entry is the selected entry in management console-->
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="9" payload="G722">G722</option>
    <option value="0" payload="PCMU">PCMU</option>
    <option value="8" payload="PCMA">PCMA</option>
    <option value="112" payload="opus" id="opusid">Opus(16kHz)</option>
    <option value="18" payload="G729">G729</option>
    </Codecspriority>

    This would make Opus the default selection.
     
  9. dandenson

    dandenson New Member

    Joined:
    Mar 1, 2018
    Messages:
    202
    Likes Received:
    20
    cloidhamer, I don't get it. There are 5 of these "<option" entries for codec1 throught codec5, what do each of the 1-5 entries mean?