Author Topic: Upgrading Asterisk  (Read 1760 times)

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Upgrading Asterisk
« on: August 02, 2009, 07:33:19 pm »
I'm looking into upgrading Asterisk as the version we are currently using is extremely dated.  I am having trouble understanding what the issue with this is as looking through the source it doesn't look like there is really much customization to asterisk's source that even needed to be done, but was done for compiling issues, etc.  Can someone with more experience in LMCE's source provide a bit of insight as to what the issues are as it looks fairly straightforward, but surely this would have been done by someone else by now if it was really that easy.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5495
  • DOES work for LinuxMCE.
    • View Profile
Re: Upgrading Asterisk
« Reply #1 on: August 02, 2009, 08:10:25 pm »
ignore the version of asterisk in our svn. We are using whatever version of asterisk is packaged upstream, therefore it can be upgraded.

-Thom

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: Upgrading Asterisk
« Reply #2 on: August 02, 2009, 09:45:37 pm »
ts
ignore the version of asterisk in our svn. We are using whatever version of asterisk is packaged upstream, therefore it can be upgraded.

-Thom

It would still be good to upgrade asterisk on our own to the most up-to-date version, no...? The upstream package still might be 2-3 releases behind.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5495
  • DOES work for LinuxMCE.
    • View Profile
Re: Upgrading Asterisk
« Reply #3 on: August 02, 2009, 10:25:04 pm »
if somebody wants to maintain it, sure.

-Thom

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: Upgrading Asterisk
« Reply #4 on: August 02, 2009, 10:35:05 pm »
Well, if it's done right, it'll maintain itself... We'd just need to do a 'apt-get update asterisk' (or a similar command).

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Upgrading Asterisk
« Reply #5 on: August 03, 2009, 12:50:22 am »
Correct me if I'm wrong, but I think that's what Thom is saying, it is currently done that way.  I am starting to look at versions now to see exactly how far behind it actually is

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: Upgrading Asterisk
« Reply #6 on: August 03, 2009, 01:13:35 am »
ok. Let us know what you dig up.

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Upgrading Asterisk
« Reply #7 on: August 03, 2009, 01:21:03 am »
Okay, we are running 1.4.21.2 from 2008-07-22 and the current version is 1.4.26  That said, looking at the date of our release we are not that far behind, I think this is probably best left as is.  There are quite a few modules I think would be useful to us though, I'll have a play at those.  Probably the most difficult part will be if you want control of the modules from the orbiters as well.  Good excuse to dig into HAD while I'm at it though!

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Upgrading Asterisk
« Reply #8 on: August 03, 2009, 04:14:48 am »
Ha...I upgraded FreePBX, but it pretty much broke everything even after I resolved the errors in the FreePBX admin

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Upgrading Asterisk
« Reply #9 on: August 03, 2009, 04:59:44 pm »
Please remember I am quite new to Linux and am digging into an area that is lacking much documentation in LMCE.  Any help is greatly appreciated as I'm struggling quite a bit with the learning curve.

That said, I have made quite a bit of progress and learned a lot already.  Here is what I have so far.

The main reason I feel upgrading FreePBX is important to us is that the version we are running is no longer supported and will not get any updates.  Once updating to the newer version updates will come automatically from whatever is upstream.  Better to just get over this hurdle now while the rest of the LMCE packages are being migrated to standard Ubuntu packages.

We have to make sure that the apache2 user is owned by asterisk or we get permission errors on the agi modules.  The following will correct this problem:
Code: [Select]
adduser www-data asterisk
chown www-data.asterisk -R /usr/share/asterisk

Then we have another error that is caused by default settings of PHP.  The error is something to the effect of "You have magic_quotes_gpc enabled in your php.ini, http or .htaccess file which will cause errors in some modules. FreePBX expects this to be off and runs under that assumption".  To fix this one you need to turn off magic_quotes_gpc in php.ini.  This is only a reported error in more recent versions of FreePBX and was not checked in earlier versions at all.

We also get an error that the FOP server was not able to reload.  After quite some digging around I found that the reason is because the FOP panel is not completely installed on our version.  I looked briefly at installing it since the project is still maintened, but stopped there as the configuration seems to be a bit involed and there's a lot of other hurdles to overcome at this stage.  Anyone else care to take this on?

I also found out that LMCE does not create it's extensions appropriately for newer versions of FreePBX and have yet to address that bit.  What I found was the when saving changes to extensions I needed to rename the extensions as the LMCE naming convention of pl_ is not valid and the pl_ needed to be removed.  Along with this I also had to add a dtmfmode to each of the extensions.  They worked without the changes still, but are invalid according to FreePBX.  I think it's probably better to just deal with this now and fall in line with the standards going forward.

Now the big one that has me stumped is that after the FreePBX upgrade LMCE has lost the ability to write changes from it's web admin and they are not reflected in FreePBX and no errors are ever reported.  Admittedly I haven't had much time to dig deeper into this, but it seems to indicate to me that there is little to no error checking done when LMCE tries to write changes to the config files and that it is likely a permissions issue causing the inability to write.  The problem is I have not yet figured out where to look for these config files being written and have no idea how to fix it.  Anyone have some insight into this or suggestions to fix it?

That's pretty much all I've gotten so far.  I've managed to upgrade and resolved some outstanding issues with previous installs, but opened up a can of new issues at the same time.  :)


los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Upgrading Asterisk
« Reply #10 on: August 03, 2009, 07:30:51 pm »
Can anyone tell me where I can tail the output when LMCE is trying to create an extension in asterisk and where I can tail the extension when adding a phone line through LMCE's web admin?  That would be useful in determining where this thing is broken so that I can get it fixed :)

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: Upgrading Asterisk
« Reply #11 on: August 14, 2009, 04:34:36 am »
any updates on the los93sol?

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Upgrading Asterisk
« Reply #12 on: August 14, 2009, 05:44:12 am »
Can anyone tell me where I can tail the output when LinuxMCE is trying to create an extension in asterisk and where I can tail the extension when adding a phone line through LinuxMCE's web admin?  That would be useful in determining where this thing is broken so that I can get it fixed :)

I imagine you would look in /var/log/pluto/#_Asterisk.log or for telecom plugin events in /var/log/pluto/DCERouter.log

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Upgrading Asterisk
« Reply #13 on: August 17, 2009, 04:12:45 am »
Sorry guys, I got pulled away by some other projects around the house that needed to be tidied up.  I haven't made any progress since my last update.  I need to get ahold of someone's generated config files for Asterisk in /etc/asterisk so I can do some testing.  I stupidly did not back mine up before upgrading FreePBX and the issue is FreePBX attempted to overwrite ours.  I'm also starting to think that maybe this is pointless as I really don't have the time to maintain it and the versions I'm working on aren't Ubuntu packages currently so they would need extra maintenance which given the lack of people on the dev team just means less progress overall.  I've also been playing with some other things that I think at this point my time would be better spent on.  That said, I still plan on continuing to work on this as time permits and once it is working I will post instructions and whatever else is needed for those interested.