Provisioning Templates: Common and MAC-specific .cfg

Discussion in '3CX Phone System - General' started by Frank D, Nov 12, 2015.

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

    Frank D New Member

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

    at the moment I experience some behaviour provisioning Yeahlink phones, that I don't understand. Perhaps someone can explain to me, how the provisioning works in detail. I read both the "Provisiong Guid by Yealink" as well as different how-tos of 3cx like this http://www.3cx.com/blog/docs/phone-provisioning-templates/, but my question are somewhat more specific:

    - How and when ist the common (phone Type specific) .cfg-file generated by 3cx? I mean files like y000000000028.cfg for Yealink T46G phones. The provisioning template references this file and different howtos tell you not to change its name, as the name is part of the hardware-Version of the phone. But as far as I can tell, this way there is no way to have different common-files, like there is the possibility ot have different provisioning templates. Even different provisioning templates reference the same common files e.g.

    <type>phone</type>
    <!-- Friendly Name -->
    <field name="Name">Yealink T4X</field>
    <deviceconfig filename="y000000000029.cfg">
    <filename>
    <model name="Yealink T23" filename="y000000000044.cfg" />
    <model name="Yealink T41" filename="y000000000036.cfg" />
    <model name="Yealink T42" filename="y000000000029.cfg" />
    <model name="Yealink T46" filename="y000000000028.cfg" />
    <model name="Yealink T48" filename="y000000000035.cfg" />
    </filename><![CDATA[#!version:1.0.0.1

    Is it possible to edit the common-file via the admin panel or do you have to edit the file directly in the directory? If so how can I make sure this file is preserved, if any Updates are made on 3cx? Or is the common-file somehow magical generated taking one or different provisioning templates into account?
    - Is there a way to have multiple common.cfg files, so I can test new settings or run groups of phones with different settings?
    - When are the MAC-specifc cfg-files are generated?
    - Are there some settings that take only effect, when they are in the common cfg-file? Do other settings have to be in the specific file? Which of both has priority?

    Im my phone I experience, that provisioning in general does work fine. E.g. I set autoprovision.1.name = ***1112223* for test reasons and by exporting the config file of the phone I can verify it worked. The information was provided via the MAC specific provisioning file. Other parameters did not work. Setting ivoice.handset_send = 42 in the same provisioning template had no effect.

    I checked and the information was not in the MAC specific provisioning file, but conflicting information was provided by the commom provisioning file.

    How am I supposed to manage the common provisioning file? Why is this parameter not in the MAC specific file?

    I appreciate any information regarding the managing and generation of the common provisioning files.

    Best regards Frank
     
  2. Frank D

    Frank D New Member

    Joined:
    Oct 6, 2014
    Messages:
    215
    Likes Received:
    6
    I made some progress,

    I now understood, that there are two different parts in the provisioning template, one for the common .cfg file (first part in Yealink V73 TEx tempalte) and on MAC specific part.

    What still puzzles me:
    We have several versions of the provisiong file, the general template, our own productive version and one developer/testversion. And those each three for different Firmware versions. All of those do reference the same y000000000028.cfg file.

    But of cource their can be only one file on the server. So now it is absolutely clear to me, why changing any information in the common part did not have any effect.

    How do you guys deal with the situation? The easiest way might be to shift all the information to the MAC-Specific part.

    I now will try to create custom common-files with custom file names and tell the phone in the provisioning template to use this one.
    Any reason not to do this? Any how-to s mentioning this?

    Best regards Frank
     
  3. Frank D

    Frank D New Member

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

    I tried to change the name of y000000000028.cfg

    I changed it here:
    auto_provision.common_file_name = y000000000028.cfg

    and here:
    <!-- Friendly Name -->
    <field name="Name">Yealink T4X</field>
    <deviceconfig filename="y000000000029.cfg">
    <filename>
    <model name="Yealink T23" filename="y000000000044.cfg" />
    <model name="Yealink T41" filename="y000000000036.cfg" />
    <model name="Yealink T42" filename="y000000000029.cfg" />
    <model name="Yealink T46" filename="y000000000028.cfg" />

    in the provisioning template.
    But the file is not created and not availble in the servers directory. Maybe you can create a file manually with the right user rights, but I doubt it. I will try this tomorrow.
     
  4. craigreilly

    craigreilly Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    2,977
    Likes Received:
    183
    Frank - I only ever change the single file within 3cx Template section.
    If I need a different one for a group of phones - I create a new one - foe example "Yealink Public Phones", "Cubicle Phones", "Executive Phones".
    Its the easiest way for me.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. engin411

    engin411 New Member

    Joined:
    Jul 3, 2009
    Messages:
    172
    Likes Received:
    0
    Do you mean you create a new template in the 3CX Settings/Provisioning Templates node, then choose the proper template in the Phone Provisioning tab of the phone? That's how I do it, but (like the OP) the Yealink system for phone provisioning has been a partial mystery to me too.
     
  6. Frank D

    Frank D New Member

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

    I wanted to ask carigreilly exactly the same thing

    I do it the same way, but I have issues with the common e.g. y000000000028.cfg template of the Yealink phones.

    I am really happy to have made some progress with provisioning Yealink phones and I want to share my results:

    By changing the references to the common template file in the provisioning template at the two places it is referenced, we now can create both the Mac-specific file and distinct common files for each template clone. It works like a charm.

    You follow the procedure for cloning a template mentioned here http://www.3cx.com/blog/docs/phone-provisioning-templates/ and talked about above by craigreilly and engin411.

    Than you have to change the references to the common template (change the filename)

    just edit it here:
    Code:
         <!-- Friendly Name -->
          <field name="Name">Yealink T4X</field>
          <deviceconfig filename="y000000000029.cfg">
            <filename>
              <model name="Yealink T23" filename="y000000000044.cfg" />
              <model name="Yealink T41" filename="y000000000036.cfg" />
              <model name="Yealink T42" filename="y000000000029.cfg" />
              <model name="Yealink T46" filename="y000000000028.cfg" />
              <model name="Yealink T48" filename="y000000000035.cfg" />
            </filename><![CDATA[#!version:1.0.0.1
    and here

    Code:
    Configure the name of the common file.
    #T23P: y000000000044.cfg,T41P: y000000000036.cfg, T42G: y000000000029.cfg, #T46G: y000000000028.cfg; T48G: y000000000035.cfg;
    {IF ua=SIP-T23P}
    auto_provision.common_file_name = y000000000044.cfg
    {ENDIF}
    
    {IF ua=SIP-T41P}
    auto_provision.common_file_name = y000000000036.cfg
    {ENDIF}
    
    {IF ua=SIP-T42G}
    auto_provision.common_file_name = y000000000029.cfg
    {ENDIF}
    {IF ua=SIP-T46G}
    auto_provision.common_file_name = y000000000028.cfg
    {ENDIF}
    
    {IF ua=SIP-T48G}
    auto_provision.common_file_name = y000000000035.cfg
    {ENDIF}
    
    E.g. you replace "y000000000028.cfg" with "ynew000000000028.cfg"

    We manually created an empty file with the same owner in the directory:
    C:\Documents and Settings\All Users\Application Data\3CX\Data\Http\templates\phones

    But maybe this isn't even necessary.

    In fact the two provisiong files are inside the following tags of the template:

    Code:
    <data>
        <device>
          <type>phone</type>
          <!-- Friendly Name -->
          <field name="Name">Yealink T4X</field>
          <deviceconfig filename="y000000000029.cfg">
            <filename>
              <model name="Yealink T23" filename="y000000000044.cfg" />
              <model name="Yealink T41" filename="y000000000036.cfg" />
              <model name="Yealink T42" filename="y000000000029.cfg" />
              <model name="Yealink T46" filename="y000000000028.cfg" />
              <model name="Yealink T48" filename="y000000000035.cfg" />
            </filename> [HERE IS the common file]
    
    </deviceconfig>
        </device>
      </data>
    
    and

    Code:
     <data>
        <device>
          <type>phone</type>
          <!-- Friendly Name -->
          <field name="Name">Yealink T4x Identity</field>
          <deviceconfig filename="%%mac_address%%.cfg">
    
    [HERE IS the MAC file ]
    
    </deviceconfig>
        </device>
      </data>
    just open the template file in an XML editor, than you can see the structure, like in this Screenshot
    https://drive.google.com/file/d/0Bx7KcyNk6744Y2phZEZRcGZtaUE/view?usp=sharing

    Anybody doing the same thing? Or are you just editing the MAC-specific part, so that you don't need to take care of the common file?

    The purpose of of the common file is still sort of a riddle to me. Maybe if you want to be able to make some very specific changes to some phones (via creating a new template and makinge chages to the MAC-specific part) while maintaining the possibility to change the common files, which are used by several of the specific templates, this funkstionality does come in very handy indeed. But there still is the problem, that there is only one commmon file and several templates trying to write this file.

    Things start to make sence to me at last. Or did I get anything wrong?

    all the best Frank
     
  7. craigreilly

    craigreilly Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    2,977
    Likes Received:
    183
    With 3cx you really don't need to worry about the 2 files as 3cx creates a separate file for each phone with all of the settings as far as I know.
    When not using 3cx these 2 separate files for each phone would come in handy as you are manually tuning them.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Frank D

    Frank D New Member

    Joined:
    Oct 6, 2014
    Messages:
    215
    Likes Received:
    6
    HI craigreilly,

    There are indeed two different files on the Server and the phone is pulling both. The MAC specific files includes references to the common file.
    I agree with you in two regards.
    1. The system with 2 separate provisioning files to provision Yealink phones was created for manual provisioning and grouping of phones with similar settings
    2. As 3cx does create a separate file for each phone and you can assign a different type of phone and provisioning template to a phone, the method with those two doesn't fit very well with 3cx autoprovisioning. And the best way to do it, is probably they way you do it, to have all the important settings in the MAC-specific part of the provisioning template. This one works fine.

    Nevertheless it is working fine with both files, too. It just was quite hard for me to understand. Perhaps things changed in 12.5 or V14, Im am just preparing the Templates and Firmware of Phones to be ready for the upgrade, but we are still on V12.
     
  9. craigreilly

    craigreilly Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    2,977
    Likes Received:
    183
    templates will need some massaging int he new version, especially in regards to PORT #'s.
    Since I am a single install, I removed the ip address port from the provisioning file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.