Some notice and warning after upgrade

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/ 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/ on line 513

Again not only for ivr_get_details ,I have a lot of Depreciated warnings for other modules also.

How can I fix this?

And some other messages like this :

[2024-06-26 00:48:00] [freepbx.INFO]: NOTICE] (/var/www/html/admin/modules/digium_phones/classes/digium_phones.php:1751) - Undefined offset: xx1668
[2024-06-26 00:48:00] [freepbx.INFO]: NOTICE] (/var/www/html/admin/modules/digium_phones/classes/digium_phones.php:1751) - Undefined offset: xx1785
OUT > [2024-06-26 00:48:00] [freepbx.INFO]: NOTICE] (/var/www/html/admin/modules/digium_phones/classes/digium_phones.php:1726) - Undefined offset: xx1031
OUT > [2024-06-26 00:48:00] [freepbx.INFO]: NOTICE] (/var/www/html/admin/modules/digium_phones/classes/digium_phones.php:1751) - Undefined index: entries

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.

I was able to get ride of a lot of message I had because of digium by disabling modules. Yet I get a lot of notice for different modules.

I am checking this page also
What is up with the lack of deprecation follow through? - FreePBX / Development - FreePBX Community Forums

Because I have exact same message alot.
But I dont find this document,
Can someone pls point me to the new link ?

Also, you are using Freepbx 15 so recommend you to start thinking about the upgrade to either 16 or 17.

1 Like

Thank you . I will work on upgrade to 16 for now.

Than ks

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/ on line 401

And I get same error for timecondition also.

I was following this document

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.

How can I remove them to class based?

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.

Thank you Tom. But all modules are updated to latest version unless I should update to edge.

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 = '') {
	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 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.

Ok I get this now. Thank you. I will try it.