Upgrading the FreePBX firmware


  • Service Provider

    The official wiki on this subject is located here.

    I always have a backup prior to doing this level of update!

    In addition to the normal system updates you get with the built in package manager (yum) and the module updates in Module Admin, FreePBX 13 also has a firmware version that needs updated.

    When you first install FreePBX, this is automatically updated to the current firmware level. Unfortunately they tie the ability to update this in any type of easy form to their paid SysAdmin Pro module.

    You can see what your current firmware version is two ways. In the GUI, navigate to Admin -> System Admin.
    0_1491166546797_upload-a3ba2c8e-03b0-4a99-9f25-d54af603619b
    From the command line, you can execute cat /etc/schmooze/pbx-version.

    [[email protected] ~]# cat /etc/schmooze/pbx-version
    10.13.66-17
    

    If you have the SysAdmin Pro module, you can go to Admin -> System Admin -> Updates and perform updates.
    0_1491166683655_upload-f010b077-5fa2-4114-8b49-a026b45bad9f

    For those of you without the SysAdmin Pro module, upgrading is a fairly simple, but also slightly annoying process.

    Find out if there is even an update for your version. You can find that by checking the FreePBX Release Notes page. At the time of this writing, version 10.13.66-19 is current.

    Assuming there is an update, sign in to your PBX via SSH and download all of the updates from your installed version to current. The full URL for each download is found on this FreePBX wiki page.

    In my current example, I am on 17 and I need to get to 19.

    First I like to keep these scripts in their own folder

    mkdir updatescripts
    cd updatescripts
    wget https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-18.sh
    wget https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-19.sh
    

    Now you need to make the scripts executable.

    chmod +x *.sh
    

    Finally you can install them.
    You must install each one in order and do any followup tasks that are displayed.

    [[email protected] updatescripts]# /root/updatescripts/upgrade-10.13.66-18.sh
    <snip lots>
    Sun Apr  2 16:21:56 CDT 2017 UPGRADE 100% COMPLETED
    Unlocked.
    REBOOT YOUR BOX NOW FOR DAHDI CHANGES TO TAKE EFFECT
    If you would like to change your Asterisk release version to
    11 or 13 you can do so by typing asterisk-version-switch
    from the linux CLI at anytime
    

    Here is the full output for anyone curious.

    [[email protected] updatescripts]# /root/updatescripts/upgrade-10.13.66-18.sh
    Check to make sure this is a FreePBX Distro system before executing
    This appears to be a FreePBX Distro system as it has a Distro Version of 10.13.66-17
    
    Your FreePBX Distro System is being upgraded to 10.13.66-18. Please standby...
    
    
    STAGE 1 STARTING - GUI Modules
    
    Loaded plugins: downloadonly, fastestmirror, kmod
    Setting up Update Process
    Loading mirror speeds from cached hostfile
    No Packages marked for Update
    
     Upgrade All FreePBX GUI Modules
    
    trying to run as user asterisk:
    
    [AMPSBIN] already set to [/usr/sbin]
    
    Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
    Setting Permissions...
            Collecting Files...Done
     55501/55501 [============================] 100%
    Finished setting permissions
    Removing dangling symlink /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/tar-fs/node_modules/.bin/mkdirp which points to a file that no longer exists
    Removing dangling symlink /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/fstream/node_modules/.bin/mkdirp which points to a file that no longer exists
    Removing dangling symlink /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/.bin/which which points to a file that no longer exists
    Removing dangling symlink /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/.bin/shjs which points to a file that no longer exists
    Removing dangling symlink /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/.bin/rimraf which points to a file that no longer exists
    Removing dangling symlink /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/nomnom/node_modules/chalk/node_modules/.bin/strip-ansi which points to a file that no longer exists
    Removing dangling symlink /home/asterisk/.node/bin/npm-cache which points to a file that no longer exists
    No repos specified, using: [standard,commercial] from last GUI settings
    
    Up to date.
    Installing: rmsadmin
    Downloading & Installing rmsadmin...
    Starting rmsadmin download..
    Processing rmsadmin
    Downloading...
     57322/57322 [============================] 100%
    Finished downloading
    Extracting...Done
    Module rmsadmin successfully downloaded
    Installing rmsadmin module
    Generating CSS...Done
    Module rmsadmin successfully installed
    Updating Hooks...Done
    
    Done. All modules installed.
    Updating Hooks...Done
    Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
    Setting Permissions...
            Collecting Files...Done
     55536/55536 [============================] 100%
    Finished setting permissions
    Reloading FreePBX
    Error(s) have occured, the following is the retrieve_conf output:
    exit: 1
    Whoops\Exception\ErrorException: exec(): Unable to fork [grep '#include' /etc/asterisk/*.conf | sed 's/;.*//; s/#include//'] in file /var/lib/asterisk/bin/retrieve_conf on line 1108
    Stack trace:
      1. Whoops\Exception\ErrorException->() /var/lib/asterisk/bin/retrieve_conf:1108
      2. Whoops\Run->handleError() :0
      3. exec() /var/lib/asterisk/bin/retrieve_conf:1108
    No repos specified, using: [standard,commercial] from last GUI settings
    
    Up to date.
    All modules up to date.
    Updating Hooks...Done
    Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
    Setting Permissions...
            Collecting Files...Done
     55537/55537 [============================] 100%
    Finished setting permissions
    Reloading FreePBX
    Successfully reloaded
    
    STAGE 1 COMPLETED - GUI Modules - Moving to Stage 2
    
    
    STAGE 2 STARTING - RPMs
    
    
     Replace repos with only FreePBX Distro since some people have added other repos which can break updates
    
    
    Moving to Next Step
    
     Update Asterisk RPMs
    Loaded plugins: downloadonly, fastestmirror, kmod
    Setting up Update Process
    Loading mirror speeds from cached hostfile
    base                                                                                                     | 2.0 kB     00:00
    extras                                                                                                   | 1.3 kB     00:00
    pbx                                                                                                      | 2.9 kB     00:00
    schmooze-commercial                                                                                      | 2.9 kB     00:00
    updates                                                                                                  | 1.3 kB     00:00
    No Packages marked for Update
    Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
    Setting Permissions...
            Collecting Files...Done
     55538/55538 [============================] 100%
    Finished setting permissions
    
    Moving to Next Step
    
     Update all misc 6.6 RPM's
    Loaded plugins: downloadonly, fastestmirror, kmod
    Setting up Update Process
    Loading mirror speeds from cached hostfile
    No Packages marked for Update
    
    Moving to Next Step
    
    
    STAGE 2 COMPLETED - RPM's - Moving to Stage 3
    
    STAGE 3 STARTING - Misc Items
    
    
    Moving to Next Step
    
    
    Moving to Next Step
    
    
    STAGE 3 COMPLETED - Misc Items - Moving to Stage 4
    
    
    
    
    STAGE 4 STARTING - Clean Up
    
     updatedb for locate command
    
     Restart incron to be safe
    
    
    STAGE 4 COMPLETED - Clean Up - Moving to Stage 5
    
    
    
    
    STAGE 5 STARTING - Final Verifications
    
    
    STAGE 5 COMPLETED - Final Verifications - Moving to Stage 6
    
    
    
    Sun Apr  2 16:21:56 CDT 2017 UPGRADE 100% COMPLETED
    Unlocked.
    REBOOT YOUR BOX NOW FOR DAHDI CHANGES TO TAKE EFFECT
    If you would like to change your Asterisk release version to
    11 or 13 you can do so by typing asterisk-version-switch
    from the linux CLI at anytime
    
    [[email protected] updatescripts]#
    

    Now reboot the system because it says you need to. I Always perform the reboot from within the GUI with FreePBX (or any applicaiton really) because, while I know it is simple to reboot from the CLI with a shutdown -r now, I have no idea what other tasks the GUI shutdown process handles.

    And there we go, I am now on version 18.
    0_1491168543658_upload-a9c7fd06-9522-41ac-982e-014e6a7fa6c2
    0_1491168531307_upload-5be3b408-8bde-4e62-ba81-5dc329a80572

    Finally, if you are behind and needing to perform multiple updates at once, I recommend waiting a full 5 minutes in between because otherwise, your reboots will set the Responsive firewall into Safe mode.

    Part of the FreePBX 13 Setup Guide


  • Service Provider

    Note, one of the steps of this process will run a yum update, but as new firmware here comes out slower than updates to various modules, I do not rely on this process to perform those.

    Moving to Next Step
    
     Update all misc 6.6 RPM's
    Loaded plugins: fastestmirror, kmod
    Setting up Update Process
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    --> Running transaction check
    ---> Package freepbx.noarch 0:13.0.191.4-1.shmz65.1.54 will be updated
    ---> Package freepbx.noarch 0:13.0.191.4-1.shmz65.1.55 will be an update
    ---> Package iSymphonyServerV3-fpbx.noarch 0:3.4.0.21-1 will be updated
    ---> Package iSymphonyServerV3-fpbx.noarch 0:3.4.1.44-1 will be an update
    --> Finished Dependency Resolution
    

  • Service Provider

    Rum a yum huh?



  • @scottalanmiller said in Upgrading the FreePBX firmware:

    Rum a yum huh?

    Kinda like rummy bears?


  • Service Provider

    @travisdh1 said in Upgrading the FreePBX firmware:

    @scottalanmiller said in Upgrading the FreePBX firmware:

    Rum a yum huh?

    Kinda like rummy bears?

    Yeah, Jared's secretly a yum runner.


  • Service Provider

    @JaredBusch said in Upgrading the FreePBX firmware:

    /root/updatescripts/upgrade-10.13.66-18.sh

    I just setup a new FreePBX 13 install on Vultr and it start on firmware version 17.

    After running the upgrade to 18 the Process Management module was installed and all other modules were upgraded.

    There were a large number of modules in error prior to running this upgrade on the new install.



  • This post is deleted!


  • @JaredBusch do you have to reboot between updates?

    I am using System Admin to do updates, and it doing them one after another, without a reboot.


  • Service Provider

    @aaronstuder said in Upgrading the FreePBX firmware:

    @JaredBusch do you have to reboot between updates?

    I am using System Admin to do updates, and it doing them one after another, without a reboot.

    Do you have to reboot? No.

    I reboot, because I want all things applied. including the system being booted to an updated kernel from the yum update that it does.



  • @JaredBusch, are you running the new distro from Sangoma yet?


  • Service Provider

    @wls-itguy said in Upgrading the FreePBX firmware:

    @JaredBusch, are you running the new distro from Sangoma yet?

    We are running it in production, have been since release day. We actually had the final Release Candidate in production, we were that anxious.



  • @scottalanmiller Scott, I don't see an upgrade option through my SysAdmin page. Did you upgrade via CLI?


  • Service Provider

    @wls-itguy said in Upgrading the FreePBX firmware:

    @scottalanmiller Scott, I don't see an upgrade option through my SysAdmin page. Did you upgrade via CLI?

    Upgrade from what? The RC just updated on its own.



  • @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13



  • They don't have a script yet to go from 13 to 14.


  • Service Provider

    @aaronstuder said in Upgrading the FreePBX firmware:

    @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13

    We didn't upgrade from 13, we did a clean slate build.





  • @scottalanmiller said in Upgrading the FreePBX firmware:

    @aaronstuder said in Upgrading the FreePBX firmware:

    @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13

    We didn't upgrade from 13, we did a clean slate build.

    So was this for a new install, or for a previous customer? If previous, how did you migrate all of your settings over?


  • Service Provider

    @dashrender said in Upgrading the FreePBX firmware:

    @scottalanmiller said in Upgrading the FreePBX firmware:

    @aaronstuder said in Upgrading the FreePBX firmware:

    @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13

    We didn't upgrade from 13, we did a clean slate build.

    So was this for a new install, or for a previous customer? If previous, how did you migrate all of your settings over?

    We did it on beta, so it was for internal. Wouldn't do that to outside customers.

    PBX are really easy to migrate by hand, no need to bring cruft over. IF you have hundreds of users and complex IVRs, yeah that can be a pain. For a typical SMB, how long does a manual migration take, an hour? And if you are cleaning up craft as you go, pruning extensions, it can be a break even on time.


  • Service Provider

    @scottalanmiller said in Upgrading the FreePBX firmware:

    @dashrender said in Upgrading the FreePBX firmware:

    @scottalanmiller said in Upgrading the FreePBX firmware:

    @aaronstuder said in Upgrading the FreePBX firmware:

    @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13

    We didn't upgrade from 13, we did a clean slate build.

    So was this for a new install, or for a previous customer? If previous, how did you migrate all of your settings over?

    We did it on beta, so it was for internal. Wouldn't do that to outside customers.

    PBX are really easy to migrate by hand, no need to bring cruft over. IF you have hundreds of users and complex IVRs, yeah that can be a pain. For a typical SMB, how long does a manual migration take, an hour? And if you are cleaning up craft as you go, pruning extensions, it can be a break even on time.

    Bullshit. Again you have no perspective.

    An hour to migrate an entire PBX? Voicemail passwords? Extensions and secrets?

    Bull fucking shit.



  • Sometimes I think SAM posts things to get @JaredBusch all fired up :)



  • @jaredbusch said in Upgrading the FreePBX firmware:

    @scottalanmiller said in Upgrading the FreePBX firmware:

    @dashrender said in Upgrading the FreePBX firmware:

    @scottalanmiller said in Upgrading the FreePBX firmware:

    @aaronstuder said in Upgrading the FreePBX firmware:

    @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13

    We didn't upgrade from 13, we did a clean slate build.

    So was this for a new install, or for a previous customer? If previous, how did you migrate all of your settings over?

    We did it on beta, so it was for internal. Wouldn't do that to outside customers.

    PBX are really easy to migrate by hand, no need to bring cruft over. IF you have hundreds of users and complex IVRs, yeah that can be a pain. For a typical SMB, how long does a manual migration take, an hour? And if you are cleaning up craft as you go, pruning extensions, it can be a break even on time.

    Bullshit. Again you have no perspective.

    An hour to migrate an entire PBX? Voicemail passwords? Extensions and secrets?

    Bull fucking shit.

    yeah, I tend to agree with JB here. Unless you can script the creation extensions with matching passwords, etc, etc, etc... anything more than a tiny shop will be more work to rebuild and manually migrate than to upgrade.



  • @dashrender I know I ain't building new and migrating :/


  • Service Provider

    Firmware 21 released last week for FreePBX 13.

    [[email protected] ~]# cd updatescripts/
    [[email protected] updatescripts]# wget https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-21.sh
    --2017-07-31 14:28:22--  https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-21.sh
    Resolving upgrades.freepbxdistro.org... 199.102.239.49
    Connecting to upgrades.freepbxdistro.org|199.102.239.49|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 13983 (14K) [application/x-sh]
    Saving to: “upgrade-10.13.66-21.sh”
    
    100%[============================================================================================================>] 13,983      --.-K/s   in 0s      
    
    2017-07-31 14:28:23 (273 MB/s) - “upgrade-10.13.66-21.sh” saved [13983/13983]
    
    [[email protected] updatescripts]# chmod +x *.sh
    

    As you can see here, my PBX has been around a while.

    [[email protected] updatescripts]# ls
    upgrade-10.13.66-12.sh  upgrade-10.13.66-14.sh  upgrade-10.13.66-16.sh  upgrade-10.13.66-18.sh  upgrade-10.13.66-20.sh
    upgrade-10.13.66-13.sh  upgrade-10.13.66-15.sh  upgrade-10.13.66-17.sh  upgrade-10.13.66-19.sh  upgrade-10.13.66-21.sh
    

    On to the upgrade

    [[email protected] updatescripts]# /root/updatescripts/upgrade-10.13.66-21.sh
    Check to make sure this is a FreePBX Distro system before executing
    This appears to be a FreePBX Distro system as it has a Distro Version of 10.13.66-20
    
    Your FreePBX Distro System is being upgraded to 10.13.66-21. Please standby...
    
    <snippers>
    
    Mon Jul 31 14:31:26 CDT 2017 UPGRADE 100% COMPLETED
    Unlocked.
    REBOOT YOUR BOX NOW FOR DAHDI CHANGES TO TAKE EFFECT
    If you would like to change your Asterisk release version to
    11 or 13 you can do so by typing asterisk-version-switch
    from the linux CLI at anytime
    
    
    


  • @scottalanmiller said in Upgrading the FreePBX firmware:

    @dashrender said in Upgrading the FreePBX firmware:

    @scottalanmiller said in Upgrading the FreePBX firmware:

    @aaronstuder said in Upgrading the FreePBX firmware:

    @scottalanmiller I assume @WLS-ITGuy means from FreePBX 13

    We didn't upgrade from 13, we did a clean slate build.

    So was this for a new install, or for a previous customer? If previous, how did you migrate all of your settings over?

    We did it on beta, so it was for internal. Wouldn't do that to outside customers.

    PBX are really easy to migrate by hand, no need to bring cruft over. IF you have hundreds of users and complex IVRs, yeah that can be a pain. For a typical SMB, how long does a manual migration take, an hour? And if you are cleaning up craft as you go, pruning extensions, it can be a break even on time.

    Probably more like 10 mins, ammaright?



  • It appears that Firmware updates are now part of the system level updates done by yum as of version 14.



  • If I want to go from 13 to 14 I need to go here:

    https://wiki.freepbx.org/display/PPS/Upgrading+from+Distro+6


  • Service Provider

    @wls-itguy said in Upgrading the FreePBX firmware:

    If I want to go from 13 to 14 I need to go here:

    https://wiki.freepbx.org/display/PPS/Upgrading+from+Distro+6

    Yes. It is certianly still beta. I had major issues the first time then minor issues the last time.

    The last time was my company PBX and I have some strangeness with my desk phone connecting. But another user's desk phone is not having the same problems.



  • @jaredbusch Good to know. I was thinking about doing this but I wasn't sure if it was truly still in beta or Sangoma was not keeping up to date.



Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.