I did an upgrade all on our freepbx 15th and I getting bounch of notices and warnings by fwconsole debug.
Apply config is taking too long, its been 25 min and its not done yet!
Notices are like this:
OUT > [2024-06-26 00:33:54] [freepbx.INFO]: Depreciated Function presencestate_list_get detected in /var/www/html/admin/modules/digium_phones/functions.inc.php on line 61
Its not just for digium_phones modules, I see same notice message for some other modules
NOTICE] (/var/www/html/admin/libraries/BMO/Destinations.class.php:34) - Undefined index: edit_url
These are just two examples, I see more of these
And I am getting some warnings like
Depreciated Function ivr_get_details detected in /var/www/html/admin/modules/ivr/functions.inc.php on line 513
Again not only for ivr_get_details ,I have a lot of Depreciated warnings for other modules also.
And whats wrong with this one( not sure if we have this message after upgrade) : WARNING[316]: app_queue.c:3489 queue_set_param: Unknown keyword in queue ‘xxxxxxxx’: lazymembers at line 27687 of queues.conf
Or this warning
WARNING[316]: pbx.c:8783 ast_context_verify_includes: Context ‘ivr-485’ tries to include nonexistent context ‘ivr-485-custom’
ivr-485 is a breakout IVR , playing an announcement and if someone dials 0 goes to a voicemail.
Hi,
I upgraded pbx to version 16th. Some massages are gone now but still I have this message for some modules like
Depreciated Function ivr_get_details detected in /var/www/html/admin/modules/queues/functions.inc/geters_seters.php on line 401
And comparing this article with what I have on version 16th, I can see some modules have Console and hook directory under /var/www/…/modulename and some does not. Ex: Queue and vqplus and time condition , extenstion routing does not have these directories.
And these are some fo the modules that are showing this Depreciated message .
Can you confirm this is fixed in ver 17th? If not is there easy way to add these Console and hook direct?
The deprecated function warnings are internal technical debt warnings. A long time ago FreePBX used classless functions for everything then PHP5.x hit and OOP was the way to do things. I.e. use class based functions.
So these warnings are reminders that these functions need to be moved to the class based functions for the module.
All you need to do is update the modules and code across the board in all modules to remove using classless functions and moving them into the class functions.
You’re not understanding. The warnings you are seeing are for internal developers warning them that out dated/old methods are still being used by the system.
This is the legacy function ivr_get_details(), it used to have all the needed code for getting an IVR’s details. Notice how all it does now is call the deprecatedFunction() method (which is throwing the error you see) and it calls on the IVR class function getDetails().
//replaces ivr_list(), returns all details of any ivr
function ivr_get_details($id = '') {
FreePBX::Modules()->deprecatedFunction();
return FreePBX::Ivr()->getDetails($id);
}
Now all that needs to be done is any where in the entire code based that calls on ivr_get_details() needs to be updated to use FreePBX::Ivr()->getDetails() then once that is done, ivr_get_details() needs to be removed from functions.inc.php in the IVR module.
This step needs to be repeated for any function that is throwing a deprecation error. So there needs to be updates made to the code base of FreePBX.