• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

help on custom templates yealink codec config

Status
Not open for further replies.

dandenson

Customer
Joined
Aug 4, 2009
Messages
404
Reaction score
52
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:
Code:
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
Code:
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:

Code:
<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>
 
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.
 
eddv123, for Yealink T48S (and all the T4xS models) the templates don't have opus or sip transport options.
 
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 ?
 
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.
 
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
 
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.

Code:
<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>

Code:
<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.
 
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?
 
In that template there are 5 groups with 5 entries. Each group represents one of the available codecs on the Management console, so that is why you need as many groups as you have codecs. If you look down further into <Data> portion at how the template stores the selected values you see that it is choosing one from each of those 5 groups.

Code:
account.1.codec.1.enable = 1
account.1.codec.1.payload_type = %%payload1%%
account.1.codec.1.priority = 1
account.1.codec.1.rtpmap = %%codec1%%

account.1.codec.2.enable = 1
account.1.codec.2.payload_type = %%payload2%%
account.1.codec.2.priority = 2
account.1.codec.2.rtpmap = %%codec2%%

Etc...

So if you wanted to default your template to Opus then you would have to copy Codecspriority variableName="codec5" to the top of the list then renumber the the list of Codecs so that Opus would be first. See below. I have't tried this, but I'm assuming based on the fact that I have reordered some of the parameters like dateformat and timeformat in my own templates.

Code:
<Codecspriorities>
<Codecspriority variableName="codec1" PayloadTypeName="payload1" priority="1">
<!--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>
<Codecspriority variableName="codec2" PayloadTypeName="payload2" priority="2">
<!--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="codec3" PayloadTypeName="payload3" priority="3">
<!--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="codec4" PayloadTypeName="payload4" priority="4">
<!--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="codec5" PayloadTypeName="payload5" priority="5">
<!--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>
</Codecspriorities>
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,622
Messages
748,858
Members
144,735
Latest member
Hammad.k
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.