FreePBX 2.9 Gotchas/Answers

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
This thread covers the changes you'll need to make in PBX in a Flash and Incredible PBX to restore "normal" operation to your system. Please read the entire thread before you attempt to upgrade your server to FreePBX 2.9.

Please don't post problems here unless you already know the answer and can post that as well. Start a new thread in the Help Forum for problems. When there is a fix, we'll add it below.

20110419-jp4wbnpaif23u3jx3sxpgi8c6n.jpg
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Eliminating Warning Message for Default Manager Password

After upgrading to FreePBX 2.9, log into your server as root and edit:

nano -w /var/www/html/admin/modules/framework/bin/retrieve_conf

Comment out lines 648, 649, 650, 651, and 653:

Code:
if ($amp_conf['AMPMGRPASS'] == $freepbx_conf->get_conf_default_setting('AMPMGRPASS')) {
//  if (!$nt->exists('core', 'AMPMGRPASS')) {
//        $nt->add_warning('core', 'AMPMGRPASS', _("Default Asterisk  Manager Password Used"), _("You are using the default Asterisk Manager  p$
//  }
//} else {
        $nt->delete('core', 'AMPMGRPASS');
//}

Refresh your browser on the FreePBX System Status page after making all the changes to this file to make sure you commented out the correct lines!!
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Restoring CallerID Superfecta 2.2.4 to Normal Operation

After upgrading to FreePBX 2.9 on an Incredible PBX or any other PIAF server with CID Superfecta 2.2.4 installed, log into your server as root and issue the following commands:


cd /var/www/html/admin/modules/superfecta/bin
mv callerid.php callerid.old.php
wget http://pbxinaflash.net/source/superfecta/callerid.txt
mv callerid.txt callerid.php
chown asterisk:asterisk callerid.php

Better yet, upgrade to CID Superfecta 2.2.5 which resolves the problem.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Permissions Issue

Upgrading to FreePBX 2.9RC1 gives this notice in FreePBX System Status, under FreePBX Notices:

amportal.conf not writeable
Your amportal.conf file is not writeable. FreePBX is running in a crippled mode until changed. You can run 'amportal chown' from the Linux command line to rectify this.
Added 17 minutes ago
(framework.AMPORTAL_NO_WRITE)
Checking ls -l amportal.conf gives:

Code:
root@pbx:/etc $ ls -l amportal.conf
-rw-r--r-- 1 root root 10332 Apr 20 13:18 amportal.conf


See also this FreePBX thread: freepbx.org/forum/freepbx/installation/amportal-conf-not-writeable


SIMPLE FIX
: Log into your server as root and issue the following command:

amportal chown
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Restoring Google Voice FreePBX Module to Operation

WARNING: The original post here was an incorrect patch. See next page for the correct fix.

Or, a prepatched version that works correctly in FreePBX 2.8 and 2.9 can be downloaded from here.



See this thread for the source of the incorrect patch. Sorry.

Google Voice DOES work in FreePBX 2.9.

Disregard comments below and see next page in this thread for correct patch explanation.

Open functions.inc.php in googlevoice module. Edit the beginning of the file from:

Code:
require_once("functions.inc.php");
require_once("extensions.class.php");
to this:

Code:
global $amp_conf;
// Do we run FreePBX 2.8?
if(file_exists($amp_conf['AMPWEBROOT']."/admin/extensions.class.php")) {
  // Yes, then include these files
  require_once("functions.inc.php");
  require_once("extensions.class.php");
  } else {
        //We are on a FreePBX 2.9 system
        require_once("libraries/extensions.class.php");
}
Mikael Carlsson
FreePBX Development Team
 
Last edited by a moderator:

jmars

New Member
Joined
Feb 23, 2009
Messages
7
Reaction score
0
Any benefit in upgrading to Freepbx 2.9 vs 2.8?
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Any benefit in upgrading to Freepbx 2.9 vs 2.8?

Not that I have seen at all. As you can see in this thread, there are several "Gotchas" with PIAF and 2.9. I would stick at 2.8 now until the kinks are worked out.
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
The 'kinks' you speak of are related to third party developers that may or may-not fix their issues. They are not related to freepbx and are technically the result of bad coding.

Therefore unless the third party developer comes back to fix said modules these issues will keep happening because FreePBX is unassociated with all of the modules above

I think the feature set for FreePBX 2.9 was pretty outstanding personally

freepbx.org/news/2010-11-17/features-we-are-considering-for-2-9

Not that I have seen at all. As you can see in this thread, there are several "Gotchas" with PIAF and 2.9. I would stick at 2.8 now until the kinks are worked out.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
The 'kinks' you speak of are related to third party developers that may or may-not fix their issues. They are not related to freepbx and are technically the result of bad coding.

Therefore unless the third party developer comes back to fix said modules these issues will keep happening because FreePBX is unassociated with all of the modules above

I think the feature set for FreePBX 2.9 was pretty outstanding personally

freepbx.org/news/2010-11-17/features-we-are-considering-for-2-9
Right - I wasn't trying to say that FreePBX 2.9 itself is bad and bug-ridden or offend anyone- I was saying that when used with PIAF and its pre-installed modules (written by either the PIAF Dev Team or other 3rd Party Contributors), there are some issues that have yet to be resolved without manual user intervention (i.e. editing files). So until those bugs get squashed, I would reccomend staying at 2.8.
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
Ok. After consulting with the FreePBX Development team (Mainly only mbrevda) we discovered that this was the incorrect way to patch this module

The correct way is to replace lines (20-34) with this:

Code:
global $amp_conf;
// Do we run FreePBX 2.8?
if(file_exists($amp_conf['AMPWEBROOT']."/admin/extensions.class.php")) {
  // Yes, then include these files
  require_once("functions.inc.php");
  require_once("extensions.class.php");
  } else {
        //We are on a FreePBX 2.9 system
        //require_once("libraries/extensions.class.php");
}

function googlevoice_hookGet_config($engine) {
    global $ext;   
    if (!method_exists($ext, 'ext_senddtmf')) {       
        class ext_senddtmf extends extension {
            var $digits;
            function ext_senddtmf($digits) {
                $this->digits = $digits;
            }
            function output() {
                return 'SendDTMF('.$this->digits.')';
            }
        }
    }
}

class googlevoice_conf {

I've attached the CORRECT functions.inc.php for google voice in this thread.

Comments?

A prepatched version that works in FreePBX 2.8 and 2.9 can be downloaded from here.

See this thread for the details.

Google Voice DOES work in FreePBX 2.9.

Open functions.inc.php in googlevoice module. Edit the beginning of the file from:

Code:
require_once("functions.inc.php");
require_once("extensions.class.php");
to this:

Code:
global $amp_conf;
// Do we run FreePBX 2.8?
if(file_exists($amp_conf['AMPWEBROOT']."/admin/extensions.class.php")) {
  // Yes, then include these files
  require_once("functions.inc.php");
  require_once("extensions.class.php");
  } else {
        //We are on a FreePBX 2.9 system
        require_once("libraries/extensions.class.php");
}
Mikael Carlsson
FreePBX Development Team
 

Attachments

  • functions.inc.php.txt
    9.4 KB · Views: 9
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Symlink Error

If you experience a symlink error after the upgrade, see this thread for the fix.
 
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
The new patch (at the top of this page) for the FreePBX Google Voice module now has been incorporated into new installs of PIAF-Purple and PIAF-Red. Without this patch, the previously provided patch blew CallerID Superfecta out of the water on FreePBX 2.9 installs and upgrades.
 
Joined
Oct 16, 2008
Messages
94
Reaction score
0
You are very quick to point fingers, are you Wardmundy. It turned out to be googlevoice 0.9 that was to blame.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
You are very quick to point fingers, are you Wardmundy. It turned out to be googlevoice 0.9 that was to blame.

I'm going to repeat this one more time, mickecarlsson...

When we find things that aren't working or when other folks report things that are not working, we document it for all of our users and also ask the person finding the problem to report it to the appropriate party. IT'S NOT A MATTER OF POINTING FINGERS! IT'S THE APPROPRIATE WAY TO GET ISSUES IDENTIFIED AND RESOLVED.

As for FreePBX 2.9, we personally like it; however, there have been numerous reports of problems (see the previous 17 posts). We have tried to document the issues and work through them as they arise with the able assistance of people like you. However, for first-time users, this can be an incredibly frustrating experience if there's nowhere to turn for documented information on how to address or avoid the gotcha's.

Let's work through the issues respectfully and professionally... and lighten up on the personal stuff. Thanks.

As for the Recordings issue, loading the current fix to the Google Voice Module resolves the issue. Was it your earlier patch to the GV module that actually caused the problem, or am I missing something?? The SVN link to 0.1.1 is here. Can't find a tarball link.
 
Joined
Oct 16, 2008
Messages
94
Reaction score
0
One post about a problem, and you blame FreePBX 2.9 when it actually was a third party module that was faulty. Equal as to the other 17 posts, all related to modules outside of FreePBX Developers control.

I did read this thread and I have a few comments:

You teach users to edit out code (IMHO a very BAD approach) in FreePBX instead of fixing your distro. This is not a FreePBX problem. I have even mailed you a solution to this, why don't you fix that? We do it in our distro.
Every framework we push out break this "fix".

The post about the problem with Superfecta, not a FreePBX problem.

Your third post: (sorry, I edited out this reply, you would not have liked it at all)

I suggest that you rename the thread to Multiple problems with Third Party Modules in PIAF with FreePBX 2.9, that would be a more appropriate title.

If you want to document and actually helping users and developers, document this:

Third Party Developers, please use the following tag in module.xml for your modules that don't support FreePBX 2.9:
Code:
<depends>
     <version>le2.8</version>
</depends>
If all developers for Third Party Modules followed this, none of the above post had been necessary.

You can read all about module.xml here: freepbx.org/trac/wiki/module.xml

After they have updated the module, they can change the tag to:
Code:
<depends>
     <version>le2.9</version>
</depends>
They can even add two depends:
Code:
<depends>
     <version>le2.8</version>
     <version>ge2.6</version>
</depends>
The above example would only allow the module to be installed on FreePBX 2.6, 2.7 and 2.8

Take care,
Mikael
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
You Break It, You Fix It. I Break It, I Fix It...

We could probably have this discussion until the cows come home, but since you brought it up, let's address it. I've been around and around with the Asterisk developers on this same subject.

My position is and always has been the same. If a new version of code (in this case FreePBX) breaks existing modules regardless of who wrote them, the primary responsibility for documenting the changes (SO THAT THE THIRD-PARTY APPS CAN BE FIXED) lies with the person(s) that broke the existing code. It's unreasonable to expect any outside party to wade through hundreds of thousands of lines of code looking for what's been "improved." Sorry.

And blocking old apps from being installed is not a fix! This is particularly true in the case of major modules such as Google Voice, CallerID Superfecta, and EndPoint Manager which are used by hundreds of thousands of end-users. They are the reason FreePBX has been able to make a business case for continuing development!

There have been very few new versions of FreePBX that broke existing code of third-party developers. I've been through dozens of upgrades. FreePBX 2.9 is an exception thankfully.

The module.xml link you provided doesn't provide the first clue as to what has been changed in 2.9, how those changes affected existing third-party modules, and what steps could be taken to get these modules working with 2.9. Somebody knows!

Finally, if it hadn't been for tm1000 and Moshe Brevda, the transition to FreePBX 2.9 would have been a disaster for most end users. I hope the FreePBX Development Team will reconsider what appears to be a new approach to software development.
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
I really shouldn't get involved here. But I am and I'm going to be quick and short.

The 'Google Voice' Module was poorly coded. It's that simple. Whether that was because of poor documentation from freepbx on how to develop modules (because, let me say, they have NONE) or from pure laziness by just including random files (which by the way are already included. even on freepbx 2.8) is besides the point.

The point being made is that Moshe and others are trying to work hard by adding debug routines and finally getting rid of these bugs and useless files like amportal.conf which I HATED. So it was a little quick for everyone to jump the gun and accuse FreePBX 2.9 of being the issue.

If people don't keep up with module upgrades then I dunno how to help them!

If anything I would advise anyone and everyone to upgrade to 2.9 and I will help anyone for FREE. 2.9 is far superior in several ways! Including my Endpoint Manager that was inspired by PBX In a Flash!

Anyways I just want us to all get along. No finger pointing. :)

We could probably have this discussion until the cows come home, but since you brought it up, let's address it. I've been around and around with the Asterisk developers on this same subject.

My position is and always has been the same. If a new version of code (in this case FreePBX) breaks existing modules regardless of who wrote them, the primary responsibility for documenting the changes (SO THAT THE THIRD-PARTY APPS CAN BE FIXED) lies with the person(s) that broke the existing code. It's unreasonable to expect any outside party to wade through hundreds of thousands of lines of code looking for what's been "improved." Sorry.

And blocking old apps from being installed is not a fix! This is particularly true in the case of major modules such as Google Voice, CallerID Superfecta, and EndPoint Manager which are used by hundreds of thousands of end-users. They are the reason FreePBX has been able to make a business case for continuing development!

There have been very few new versions of FreePBX that broke existing code of third-party developers. I've been through dozens of upgrades. FreePBX 2.9 is an exception thankfully.

The module.xml link you provided doesn't provide the first clue as to what has been changed in 2.9, how those changes affected existing third-party modules, and what steps could be taken to get these modules working with 2.9. Somebody knows!

Finally, if it hadn't been for tm1000 and Moshe Brevda, the transition to FreePBX 2.9 would have been a disaster for most end users. I hope the FreePBX Development Team will reconsider what appears to be a new approach to software development.
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top