Used the GUI to go from 12 to 13. At the end of the process the dashboard reported issues with extensions where Voicemail was the final target.
Often hitting an exception when trying to resolve this which is:
Whoops\Exception\ErrorException: explode() expects parameter 2 to be string, array given in file /var/www/html/admin/modules/voicemail/Voicemail.class.php on line 177
- Whoops\Exception\ErrorException->() /var/www/html/admin/modules/voicemail/Voicemail.class.php:177
- Whoops\Run->handleError() :0
- explode() /var/www/html/admin/modules/voicemail/Voicemail.class.php:177
- FreePBX\modules\Voicemail->getVoicemail() /var/www/html/admin/modules/voicemail/Voicemail.class.php:203
- FreePBX\modules\Voicemail->getMailbox() /var/www/html/admin/modules/voicemail/functions.inc.php:871
- voicemail_mailbox_get() /var/www/html/admin/modules/core/functions.inc.php:970
- core_getdestinfo() /var/www/html/admin/libraries/usage_registry.functions.php:300
- framework_identify_destinations() /var/www/html/admin/libraries/usage_registry.functions.php:351
- framework_list_problem_destinations() /var/lib/asterisk/bin/retrieve_conf:733
From a reboot I get an admin message re SQL:
[FATAL] SQLSTATE[HY000]  Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) SQLSTATE[HY000]  Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
Though I’m able to view the CDR’s so I’m not so sure where this error is coming from.
I can see other issues but I suspect these are the ones to resolve first.
Any help appreciated.
Hi Alan, we’re are having the same issue regarding the Voicemail class. You can fix this by removing the bad data out of /etc/asterisk/voicemail.conf, but that only leads to further problems.
I think your database problem is something else entirely. Maybe a permissions problem with /var/lib/mysql/mysql.sock? Or MySQL isn’t listening on the socket, but only the port?
Anyway, we are seeing additional weirdness around voicemail.
All of our extensions have had voicemail disabled. If we go to enable them, duplicate data gets added to voicemail.conf (and the above error appears) but voicemail doesn’t get enabled in the extensions module.
We updated the framework to last night to the latest. Maybe related?
Here are our current modules:
| Module | Version | Status |
| accountcodepreserve | 13.0.2 | Enabled |
| announcement | 13.0.2 | Enabled |
| areminder | 13.0.2 | Disabled |
| arimanager | 13.0.3 | Enabled |
| asterisk-cli | 13.0.2 | Enabled |
| asteriskinfo | 13.0.4 | Enabled |
| backup | 13.0.7 | Enabled |
| blacklist | 13.0.6 | Enabled |
| bria | 13.0.7 | Enabled |
| broadcast | 13.0.2 | Disabled |
| builtin | | Enabled |
| bulkdids | 13.0.2 | Disabled |
| bulkextensions | 13.0.2 | Disabled |
| bulkhandler | 13.0.9 | Enabled |
| callback | 13.0.1alpha1 | Enabled |
| callerid | 13.0.2 | Disabled |
| callforward | 13.0.4 | Enabled |
| calllimit | 13.0.2 | Disabled |
| callrecording | 13.0.3 | Enabled |
| callwaiting | 13.0.1 | Enabled |
| campon | 13.0.1alpha1 | Enabled |
| cdr | 13.0.9 | Enabled |
| cel | 13.0.4 | Enabled |
| certman | 13.0.5 | Enabled |
| cidlookup | 13.0.4 | Enabled |
| conferences | 13.0.5 | Enabled |
| conferencespro | 13.0.1alpha1 | Enabled |
| configedit | 13.0.4 | Enabled |
| contactmanager | 13.0.4 | Disabled |
| core | 13.0.1beta1.26 | Enabled |
| cos | 13.0.4 | Disabled |
| customappsreg | 18.104.22.168 | Enabled |
| cxpanel | 4.1.8 | Disabled |
| dahdiconfig | 13.0.3 | Enabled |
| dashboard | 13.0.10 | Enabled |
| daynight | 13.0.4 | Enabled |
| dictate | 13.0.2 | Enabled |
| digium_phones | 22.214.171.124 | Disabled |
| digiumaddoninstaller | 126.96.36.199 | Enabled |
| directory | 13.0.3 | Enabled |
| disa | 13.0.2 | Enabled |
| donotdisturb | 13.0.3 | Enabled |
| endpoint | 188.8.131.52 | Disabled |
| fax | 13.0.8 | Enabled |
| faxpro | 13.0.8 | Enabled |
| featurecodeadmin | 13.0.2 | Enabled |
| findmefollow | 13.0.11 | Enabled |
| framework | 13.0.1beta3.51 | Enabled |
| freepbx_ha | 13.0.2 | Disabled |
| fw_langpacks | 12.0.7 | Enabled |
| hotelwakeup | 13.0.2 | Disabled |
| iaxsettings | 13.0.3 | Enabled |
| infoservices | 184.108.40.206 | Enabled |
| irc | 220.127.116.11 | Enabled |
| ivr | 13.0.4 | Enabled |
| javassh | 2.11.2 | Enabled |
| languages | 13.0.3 | Enabled |
| logfiles | 13.0.3 | Enabled |
| manager | 18.104.22.168 | Enabled |
| miscapps | 22.214.171.124 | Enabled |
| miscdests | 13.0.2 | Enabled |
| music | 13.0.4 | Enabled |
| outroutemsg | 13.0.2 | Enabled |
| paging | 13.0.4 | Enabled |
| pagingpro | 13.0.2 | Enabled |
| parking | 13.0.3 | Enabled |
| parkpro | 13.0.4 | Disabled |
| pbdirectory | 126.96.36.199 | Enabled |
| phonebook | 13.0.3 | Enabled |
| phpinfo | 13.0.2 | Enabled |
| pinsets | 13.0.2 | Enabled |
| pinsetspro | 13.0.3 | Disabled |
| presencestate | 13.0.3 | Enabled |
| printextensions | 13.0.3 | Enabled |
| queueprio | 13.0.2 | Enabled |
| queues | 13.0.6 | Enabled |
| qxact_reports | 13.0.3 | Disabled |
| recording_report | 13.0.5 | Enabled |
| recordings | 12.0.8 | Enabled |
| restapi | 13.0.10 | Disabled |
| restapps | 188.8.131.52 | Disabled |
| restart | 13.0.3 | Enabled |
| ringgroups | 13.0.4 | Enabled |
| setcid | 13.0.2 | Enabled |
| sipsettings | 13.0.14 | Enabled |
| sipstation | 13.0.10 | Enabled |
| sms | 13.0.2 | Enabled |
| sng_mcu | 13.0.2 | Enabled |
| soundlang | 13.0.0beta6 | Enabled |
| speeddial | 184.108.40.206 | Enabled |
| superfecta | 13.0.3 | Enabled |
| sysadmin | 13.0.12 | Enabled |
| timeconditions | 13.0.5 | Enabled |
| tts | 13.0.4 | Enabled |
| ttsengines | 13.0.3 | Enabled |
| ucp | 13.0.5 | Enabled |
| ucpnode | 13.0.7 | Enabled |
| userman | 13.0.12 | Enabled |
| vmblast | 13.0.2 | Enabled |
| vmnotify | 13.0.5 | Disabled |
| voicemail | 220.127.116.11 | Enabled |
| voicemail_report | 13.0.1alpha1 | Disabled |
| vqplus | 13.0.9 | Enabled |
| weakpasswords | 13.0.1alpha1 | Enabled |
| webcallback | 13.0.4 | Disabled |
| webrtc | 13.0.3 | Enabled |
| xmpp | 18.104.22.168 | Disabled |
Please let me know if there is any additional data I can provide!
Will look through this after hours.
Someone should provide us with your voicemail.conf file
I reverted the changes in framework version 13.0.1beta3.52 upgrade to that version. Then fix your voicemail.conf file then everything should be fine. Sorry about that
[[email protected] asterisk]# cat voicemail.conf
140 => 0000,Shane Redman,[email protected],,attach=no|saycid=no|envelope=no|delete => no,,,,
139 => 1234,Marc Runkel,[email protected],,attach=yes|saycid=no|envelope=no|delete => yes,,,,
139 => 1234,Marc Runkel,[email protected],,attach=yes|saycid=no|envelope=no|delete=yes
I just tried to reenable voicemail for x139. Now we’re getting the error.
I dumped the values of $mailbox and $data right before the error.
here they are:
mailbox: 139 => 9735,Marc Runkel,[email protected],,attach=yes|saycid=no|envelope=no|delete
 => yes,,,,
 => yes
It looks like it’s merging the two x139 records into one? Which is a bug, but the real question is why is voicemail.conf getting two x139’s to begin with.
and I see you posted a fix already as I was typing this… Thanks!
I’ve installed 13.0.1beta3.52, copied over voicemail .conf with the template version and rebooted.
I still have an issue with Apply Config from the GUI with an eror reported from /var/lib/asterisk/bin/retrieve_conf
PHP Fatal error: Cannot use object of type DB_Error as array in /var/www/html/admin/modules/manager/functions.inc.php on line 71
Whoops\Exception\ErrorException: Cannot use object of type DB_Error as array in file /var/www/html/admin/modules/manager/functions.inc.php on line 71
- () /var/www/html/admin/modules/manager/functions.inc.php:71
You have database issues that you need to resolve. I would uninstall manager and reinstall it:
fwconsole moduleadmin uninstall manager
fwconsole moduleadmin install manager
fwconsole moduleadmin uninstall manager
fwconsole moduleadmin install manager
I’ll start looking through the rest of the system now.
Things are looking stable again…
Errors still being reported are “Symlink from modules failed”
Which I’m sure is due to the installation of British Asterisk Voice Prompts. Is there a formal way to deal with either the symlink errors or the additional language files?
Symlinks should get cleaned up with
and languages can be properly added via the GUI in Admin, Sound Languages
I’ve been plagued with the same error since yesterday.
I updated from AsteriskNow’s FreePBX 12 to FreePBX 13 from the GUI on tuesday the 11th, so I could install the Sound Languages module (to make the recordings French).
Since yesterday, whenever I try to edit anything (When I have to press the “Edit” icon), the console returns this error.
I’ve tried re-installing both the manager and the voicemail modules. I’ve tried rebooting multiple times, no can do.
I would have included the report and a screenshot, but since I’m a new member, it seems I can’t.
Thank you for your help.
Just a quick update to mention that we were able to make the build stable again by replacing the faulty voicemail.conf with a copy of voicemail.conf.template. All our voicemail inboxes are gone though.
All you needed to do was fix the voicemail file. Not replace it completely.
Upon further investigation, I found out that one of our extensions (1003) was represented 2 times with 2 different sets of options.
1003 => 1337,Test,[email protected],[email protected],attach=yes|saycid=yes|envelope=no|delete => no,
1003 => 1337,Test,attach=no|saycid=no|envelope=no|delete => no,
Now all I have to find out is how this file ended up with two different settings for the same extensions…
As previously discussed that is/was the bug. Which has now been resolved. You will have to clean up your voicemail.conf file, unfortunately the fix can not do that for you. You can post the full voicemail.conf file here if you wish and I can clean it up for you
Oh, thanks but no thanks. I already cleaned up the file. Everything’s fine now.
I thought I’d post my own steps for fixing in case someone ends up with the same problem in the future.
Thanks for being so fast on fixing things!
Would removing voicemail module then re-installing it clear the issue?
No. You need to fix voicemail.conf manually as previously stated
Thanks. By fix you mean just removing the duplicate mailbox data? (presumably the second entry, not the first)