Unable to update firmware from 3CX

Discussion in '3CX Phone System - General' started by giwm, Dec 7, 2017.

Thread Status:
Not open for further replies.
  1. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    We recently encountered an issue where a great deal of our phones will not update firmware. Running Wireshark and comparing the successful updates versus unsuccessful, the ones that fail hit a 404 not found for the {MAC}.cfg file. The ones that successfully update the firmware do not get a 404 not found. I'm running Wireshark from the 3CX server.

    Any ideas?
     
  2. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,349
    Likes Received:
    274
    Hello @giwm

    For phones to provision the phone has to first read the .cfg file to find the path for the firmware. If the .cfg file cannot be located then the phone will not upgrade the firmware. Try calling the .cfg file manually from a pc on the network and see if you can reach it. For yealink phones this would be the provisioning link followed by the mac address and .cfg e.g. http://192.168.0.10:5000/provisioning/x63xx6ul2xx/mac.cfg

    What type of phones are these? Are these local phones or remote? Are they auto provisioned by 3CX or manually provisioned? Any custom templates?
     
  3. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    Aren't the {mac}.cfg files created on the fly? This may make it trickier to prove that they're not actually being created. However, I was able to reprovision my desk phone and nab it's mac.cfg file (cramming F5 repeatedly in the browser). Testing with the failing phones, I was not able to capture the .cfg file.

    Phones are Yealink T40P and Yealking T46G, currently on 54.81.0.110 and 28.81.0.110, respectively. Some are on our LAN, some are on the VPN WAN. All are 3CX provisioned, all use custom templates. We've upgraded firmware along with every release since v.14 without issue with the same setup.
     
  4. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    You got me on the right track. I threw the default template on a phone and was able to update the firmware. After fighting with it being on the wrong VLAN, because CDP isn't enabled by default in the 3CX templates and pre-v82 firmware. :(

    So, I must have a typo in the templates that the affected phones are tied to. It probably got carried between a few of them, which is why that didn't jump out at me.

    Thanks!
     
  5. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    So... I've done thorough testing now. Any of my custom templates that follow the directions here fail: https://www.3cx.com/docs/custom-ip-phone-templates/

    It seems they don't like the custom .cfg filename, even though it's linked to the matching (on both spots) model name. Is that how-to still valid?
     
  6. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Me too. Looks like custom templates do not allow firmware updates.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Ahmad Mustafa Abo Atwan

    Joined:
    Dec 9, 2017
    Messages:
    5
    Likes Received:
    0
    from phones you can assign to extension or new and copy provision url to setting in ip phone and you can update firmware going to phones
    other way you can take mac address for ip phone and edit extension -> provision > choose type of IP Phone > and Mac Address
    Copy provision URL > Click ok
    go to IP Phone and in setting add provision URL
    go to phones and Choose ip phone and click provision until provision go to install Firmware again
    it will help you

    BR
     
  8. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,095
    Likes Received:
    134
    There is no restriction that firmware updates do not work with custom templates.
    Do you see the phone request the firmware?
    There are some cases where the phone comes from the factory with a firmware that will not accept the firmware 3CX supports. So maybe there were some cases where the first firmware update might have to be done manually. Subsequent firmware updates can be done then via 3CX Management console.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    I ended up taking the 3CX template and updating it one 'chunk' at a time with settings from my failed template. My mistake was a missing {ENDIF} in the linekey section.

    I'd updated all my templates after moving to SP1 for the new DSSKey feature. However, I have to still manually set keys for the multicast buttons (for WAN sites). So when resetting linekey.3 on the T40P chunk, it's the last linekey and I'd mistakingly deleted the section's endif. Stupid mistake, but if anyone else is having issues, check those if statements!
     
  10. CentrexJ

    CentrexJ Member

    Joined:
    May 5, 2009
    Messages:
    380
    Likes Received:
    50
    Agreed. When 3CX does major changes to the template it is always best to winmerge from the old template to a copy of the new template and not from the new template to the old one.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,095
    Likes Received:
    134
    So the problem was that because of a custom template, the template was broken, the parsing was broken and therefore nothing worked.

    You need to be careful when you make your custom template.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,095
    Likes Received:
    134
    Who wants to work with custom templates has to do the following WITH EACH RELEASE

    Get 3CX Shipped template
    Get your template
    Compare them together using a MUST TOOL like winmerge
    Check and understand the changes in each line and see why 3CX Made them. Move the changes from the 3CX template to your template. Then check YOUR local changes in your custom template and see whether they make sense.

    Then test your template. And make sure that you do not have any new issues.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    strint_echo likes this.
  13. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    3CX community support is notorious for harping on customers for using custom templates. Perhaps what 3CX doesn't realize is that we don't WANT to have to use them. It's a huge inconvenience and is really the most time-consuming part of managing a 3CX system. We want greater control through the 3CX GUI and the ability to easily manage those settings on a more universal level (set defaults, change en masse). But until we have that intimate level of control over our phones through the GUI, we are forced to use custom templates. And we make mistakes. We have typos. We don't have the luxury of compiling a config file and it failing on a syntax error or typo before deploying even to a test phone. In my instance, it actually worked just fine up until I tried to update the firmware because the placement of the missing {endif} was the last thing that mattered.

    Give us the tools to replace custom templates and we will use them. Until then, we will use custom templates so 3CX fits ours or our customers needs... or we will find something else.

    To help 3CX understand the scope if the issue, every one of my phones uses one of 10 custom templates. On my Yealink phones, I have the following customizations on EVERY phone.

    Code:
    network.vlan.internet_port_enable = 1
    network.vlan.internet_port_vid = 114
    network.vlan.dhcp_enable =0
    phone_setting.contrast = 7
    features.dnd.large_icon.enable=1
    local_time.time_format = 0
    phone_setting.contact_photo_display.enable = 0
    phone_setting.missed_call_power_led_flash.enable = 0
    #(for T46 and T48)
    screensaver.type = 0
    #Find & Replace:  yealinkt46.png --> Custom_YealinkT46.png
    #Find & Replace:  yealinkt48.png --> Custom_YealinkT48.png
    #Added logic for the following setting:  phone_setting.lcd_logo.mode
    account.1.label = %%extension_first_name%% %%extension_last_name%%
    <label>%%extension_number%%</label>
    # Move into an existing logic statement: screensaver.display_clock.enable
    account.1.fallback.redundancy_type = 1
    account.1.sip_server.2.address = 10.1.14.2
    features.text_message.enable = 0
    A few of those are available through the 3CX GUI, but without the ability to manage defaults or changes all at once, it makes no sense to manually set every phone when you can do it in the template.

    I have 7 custom Yealink templates that vary from there. Most of these are Multicast Listening IPs and Multicast BLFs for remote VPN sites (in fact... allowing those through the Phone Provisioning and BLF setup would probably bring me from 7 to 2 custom Yealink templates). So I set up the linekeys manually for sending a multicast 'page' and then I set up listening as follows:

    Code:
    multicast.receive_priority.priority = 0
    multicast.listen_address.1.ip_address = 224.0.1.75:50001
    multicast.listen_address.2.ip_address = 224.0.1.75:50002
    
    From there, my only remaining Yealink phone that has customization is a public phone that has hotline set up and is locked down.
     
    strint_echo and sip.bg like this.
  14. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,095
    Likes Received:
    134
    Without you trumpeting like this, can you just be clear and make a list of features that will reduce custom template use? Yes I have also harped this on the forums a million times already also. Make a list of features and vote for it.

    I also harp against people using custom templates because sometimes we are sent on wild goose chases just because they forget to close a tag for example and it costs us a lot of TIME.

    There is no harm to use custom templates. Just be responsible for your code and responsible what you put in there and when there is a problem, at least the developer should check the custom template first for errors not just bounce comments back like "Seems custom templates don't update firmwares".

    Your first part of the mail shows the features we ALREADY have. Including Vlan.. So im not sure if you are trying to tell me that you are on an old version or not. But for the record, ANYONE depending on custom templates and does not immediately update is in a sinking ship. Its like a developer that depends on a library and never updates it.

    So now be constructive and put the features that will reduce your custom templates. The only thing I agree here is for multicast. This is a great feature to add I agree..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
     
  16. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,095
    Likes Received:
    134
    So we need a GLOBAL SYSTEM WIDE Editor that sets extension provisioning so you do not have to do them for each extension. Actually we were discussing this internally. Good idea.. well done. This will take more time.
    On the other hand Multicast is very very quick to add. So that we can do quicker.

    We wanted to first finalize all the features and then when everything is done, we just make a global page and then in the phone provisioning page you will have

    Radio: Use global settings
    Radio: Use these options instead
    option 1....2 etc etc..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    strint_echo and giwm like this.
  17. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Good to have it! :)
    It will make life easier (I had to upgrade manually the firmware of too many phones).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. giwm

    giwm New Member

    Joined:
    Sep 27, 2016
    Messages:
    217
    Likes Received:
    36
    I think your comment earlier gave me a good idea that may help us all. I'll post it in the Ideas thread if you think it's even feasible. What if the template editor had a syntax checker, even rudimentary? This might allow minor typos or major mistakes (accidently deleting an endif) to be caught before ever having to troubleshoot it on a phone. Support could use this as a tool to save time when a customer has an issue: "Have you run the syntax checker?"

    Thoughts?
     
Thread Status:
Not open for further replies.