FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!

Thursday, April 7

Updating Freeswitch

[this blog entry has been revised 11-April-2011 after helpful comments from Yitzchok - thank you!]

So I explained in an earlier blog entry how to compile freeswitch.  But after you've done it the first time, how do you update it later?  If ever you need to get help from the Freeswitch team they will require you to be on the latest git.  The steps are similar but shorter.


cd /usr/local/src/freeswitch
git pull

This will bring down the latest git from the repository
make current
 
This will upgrade the freeswitch that is on your harddrive but will not touch the freeswitch instance currently running in memory.  When it has completed the upgrade you can schedule a time to restart FreeSWITCH so that it begins to run the freshly compiled version. 

You might get errors as I did - these were the errors I received:
make[5]: *** [mod_opal.lo] Error 1
make[4]: *** [all] Error 1
make[3]: *** [mod_opal-all] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

In my case, I wasn't too concerned about the opal module as I don't actually need that functionality, so I just edited modules.conf again and commented out the opal module.  If you can't comment out any modules you have an issue with then you might need to get help from the FreeSWITCH irc channel.  After correcting errors, you can try to make again in the same way as before.

Once it has completed successfully you can choose your time to restart freeswitch.

6 comments:

  1. Can't you just do "make current"?

    ReplyDelete
  2. That's a really interesting question. Will make current pull a fresh git? If it does that would be a wonderful simplification. I'm just learning here too...

    ReplyDelete
  3. I am used to doing "git pull" and then "make current" just to make sure that the git pull worked (merged) with the changes I made but I am almost sure that "make current" calls "git pull".

    ReplyDelete
  4. "make current" doesn't touch your running FreeSWITCH instance it just removes all the compiled files (bin and mod folder which are now in memory) so FreeSWITCH runs fine and after it finishes the update you would need to restart FreeSWITCH.

    ReplyDelete
  5. "make current" does pull the latest git. While it doesn't affect the running FS processes, it will (temporarily) affect your ability to restart FS or use tools such as fs_cli. I've quit using it since a compile error can leave you high-and-dry until you get it worked out. I use git pull && make clean && make.

    ReplyDelete
  6. Thanks very much for your insights Cliff. It is always good to be forewarned of issues like this and ways around them.

    ReplyDelete