FreePBX 13 BETA GUI Updater

Originally published at: https://www.freepbx.org/freepbx-13-beta-gui-updater/
A few weeks ago we pushed out the first beta release of FreePBX 13. This beta was primarily pushed out as a manually install tarball and beta distro release for our advanced users. These community members and our internal testers have been testing and ironing out bugs to allow expansion to a wider audience. Our desire is to be as stable as possible even in beta for our community.

updprog

Two weeks ago we did a soft launch of our GUI Update utility. This allows anyone running FreePBX 12 to upgrade to 13 by way of the FreePBX UI. If you are running FreePBX 12 you can go in to Admin -> Module Admin and click check online.

upgrader

Keep in mind that we have done our best to make sure this is safe enough for production use but we cannot account for all use cases. There are likely still bugs unaccounted for and you may be the one to find them. Before updating please make a backup. As a BETA this is not recommended for production use.

We put a heavy focus on the core open source code that is FreePBX. If you use any of our premium add on modules to enhance the FreePBX experience, they may not be fully functional. If you use commercial modules update with caution.

Please file a ticket for any bugs you find at http://issues.freepbx.org

Please give feedback and feel free to ask questions on our forums at http://community.freepbx.org

Thank you for using FreePBX

Ā 

Ā 

1 Like

Looks nice,
in case this wasnā€™t covered somewhere: would there be a ā€˜walkthroughā€™ guide for converting from chan_sip in d&e mode to pjsip ?

1 Like

I am using Device & User mode as well. This is of course not supported in the freepbx and therefore the commercial modules.

I plan to move over the pjsip from d&u mode. I only have a couple dozen extensions so I plan to move the users over slowly over time. it appears you can have a mix of the two different drivers.

-Mark

You most certainly can

Hi!

If we notice a problem after running this under what component, etcā€¦ should we log them?

It looks like there was some sort of character set change or some sort of incorrect conversion of character set because every accented/special character I had used if now replaced by two (or more) characters (this suggest some sort of improper conversion to/from UTF-8 to/from ISO-8859-1 or something similarā€¦).

Thank you and have a nice day!

Nick

There has been no change to this. Only new installs support utf8. Any upgrade will never correctly support utf8 as the collation settings vary depending on what youā€™ve previously done.

What I have previously done as in how I installed FreePBX?

I upgraded the (current) FreePBX distro so I didnā€™t choose the character set/collation sequence usedā€¦

What issues will this do if UTF-8 is not properly supported by FreePBX? I have retyped in one of the string that had been mangled and everything seems OK now but is it stored in UTF-8 or ISO-8859-1 in the database now, I am not quite sure (I am no MySQL guru, I am more used to dealing with Oracle serversā€¦).

The characters I typed are supported by ISO-8859-1 though, maybe I should try with something which is not in ISO-8859-1 (which is probably what you used before FreePBX 13ā€¦).

edit: I just tried a character that needed ISO-8859-16 (I think) or UTF-8 and it got mangled so I guess my databases are definitely not in UTF-8ā€¦

Have a nice day!

Nick

Only new installs of FreePBX 13 support UTF-8. Sorry. Older databases can not be migrated.

UTF-8 was never supported in FreePBX 12 or lower. If it worked then that was a fluke. FreePBX 13+ is the only UTF-8 supported release and it has to be a new install.

You were probably using Latin1 (ISO-8859-1) which is what is needed for my native language so I never noticed anythingā€¦

I just noticed the ā€œissueā€ when I upgraded my installā€¦

Apparently there is a way to change the character set of databases (it probably doesnā€™t take care of non-ASCII characters though), see http://stackoverflow.com/questions/6115612/how-to-convert-an-entire-mysql-database-characterset-and-collation-to-utf-8 .

but this woud probably not be supportedā€¦

(I would have been tempted to try though if I knew what the right values are supposed to be for a new install of FreePBX 13ā€¦)

What would be a supported way of changing the character set to UTF-8? Would doing a new install and restoring a backup work?

Thank you very much for your help and have a nice day!

Nick

That has a way of corrupting data. Which is why we donā€™t migrate old databases automatically. You can do it yourself of course and itā€™ll probably be fine.

Note: ALTER TABLE tablename CHARACTER SET utf8 only sets the default char set on a table which is used for newly created columns. It does not convert existing columns that already have a char set set.

I was able to get it to work to my liking using one of the recipes on the web page I referred toā€¦

The accents/special characters were already mangled and I was willing to correct the entries which had them so as long as I was not losing anything else I was ok with correcting any mangled entryā€¦

I also had a very recent backup (yesterday)ā€¦

I did many tries (restoring from my backup after each).

Essentially what I ran was this:

DB="asterisk"
(
    echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
    mysql "$DB" -e "SHOW TABLES" --batch --skip-column-names \
    | xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
) \
| mysql "$DB"

and

DB="asteriskcdrdb"
(
    echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
    mysql "$DB" -e "SHOW TABLES" --batch --skip-column-names \
    | xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
) \
| mysql "$DB"

I modified the script I had to use the UTF-8 collate sequence documented here: [FREEPBX-8057] Wrong charset in CDR records/connection - Sangoma Issue Tracker

The first time I tried this it didnā€™t work, I got the following error message

ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

This was caused by the table asterisk.faxpro_hook_core which is used by the ā€œFax Configuration Professionalā€ module. Wanting to play it safe I restored from my backup and I then deinstalled it the module (so that it would remove the table cleanly).

I reran both scripts.

This time it completed successfullyā€¦

I then reinstalled the ā€œFax Configuration Professionalā€ module and disabled it (this is what I do with modules I donā€™t currently use but are part of the distro, I donā€™t normally uninstall them.

It recreated the table but now the page and id fields (which are part of the key) are no longer 255 characters long but 150ā€¦ I guess with the conversion to UTF-8 the key was now too long (the max is 1000 for the type of index used on this table apparently) and has been shortenedā€¦ As this table was created before I switched to FreePBX 13 it had the old lengthā€¦

I then tried to enter characters which were not supported by Latin1 (ISO-8859-1)ā€¦

I tried characters which needed ISO-8559-16 (or a variant of Unicode) and even Cyrillic and both were correctly handledā€¦

(I have a very basic understanding of Romanian and Russianā€¦)

I then fixed all the entries which had their characters mangled because of the initial upgrade to FreePBX 13, there werenā€™t that manyā€¦

The only problem I noticed is that some screens seem not to handle the apostrophe (ie ā€™ ) correctly but I donā€™t think this is related to runing this script, they probably need to escape them. The IVR screen (IIRC) did but you see the backslash it precedes the apostrophe with in some places while the time group screen seems to discard an entry that has it altogether (probably because the SQL fails to execute because of that (most likely unescaped) apostropheā€¦)ā€¦

Obviously this is not for everyone but as for me I am happy with the resultsā€¦ The accents/special characters were already mangled to begin with so as long as I wasnā€™t losing anything else I was ok with correcting them afterā€¦

Thank you and have a nice day!

Nick

1 Like

Iā€™ve also logged this at: http://issues.freepbx.org/browse/FREEPBX-10031

The upgrade sems to have stopped with an error. The log on the screen says:

Submitting data to serversā€¦Done
Running checksā€¦Passed
Stage 1
Bumping FreePBX to version 13ā€¦Done
Checking online serversā€¦Done
Downloading 13 Frameworkā€¦Done
Installing 13 Frameworkā€¦Done
Stage 2
ERROR: See Console

Not sure where to look for ā€˜consoleā€™, canā€™t see anything obvious in /var/log/syslog or /var/log/messages.

I have left my system exactly in this position so if there are specific diagnostic things that are useful at this point I can run them.

You need to look at the javascript console. Please provide us a way to access this machine. I have closed your ticket as I canā€™t do much from there. You are the first person to report this.

Which bits do you want opened up for more detail?

What happens when you run:

/var/lib/asterisk/bin/fwconsole

I get the FW console for version 13.0.1beta3.54

That is all you get??? Please paste a screenshot or the full output

Sorry, I get more than that, here you go:

You can proceed manually if you wish. Otherwise I would need to look at the system myself.