Upgrade to FreePBX 17.0.19.9 leads to broken Framework after Restore

My basis is FreePBX 15.0.37.5 running on Debian 10 using chan_sip. I am trying to mirgate to FeePBX 17.0.19.9 and chan_pjsip.

Upon restoring my former configuration, I get an error indicating that the framework was tampered with:
Module: “FreePBX Framework”, File: “/usr/share/asterisk/agi-bin/phpagi-asmanager.php missing”
Module: “FreePBX Framework”, File: “/usr/share/asterisk/agi-bin/phpagi.php missing”

What I tried did not help:

  1. With and without --force:

fwconsole ma downloadinstall framework --force
fwconsole chwon
fwconsole reload

  1. As this is on a VM, I did
  • backup the import hoping that the chan_sip conversion and deviations in modules would then be out of the way,
  • reverted the VM to the point before first importing the configuration
  • imported again
    Unfortunately, the result was the same.

What should I do to avoid/mitigate this?

Thanks & regards,

Michael

May be you can try -

  1. Freepbx 17 with asterisk 20 on Debian 12 which supports the chan_sip system
  2. Try to restore your Freepbx 15 / chan_sip configuration to this version first and then
  3. confirm everything is working fine.

If yes then convert your chan_sip to pjsip and upgrade to asterisk 21.

Regards
Kapil

@abuislam Are you using AI to respond to people? The responses aren’t that relevant or useful, so I would ask you to cease doing so any further.

1 Like

Thank you very much for all responses!

The issue sees to be that the system I am using up to now is an informal install on Debian (similar to this Debian 10 - Asterisk 16 - FreePBX 15 - PHP 7.3 · GitHub) already, but without Asterisk packages drawn from a repository. If this is used as a backup source, the backup seems to contain absolute paths, such as “/usr/share/asterisk”. The target system using FreePBX 17 on Debian 12 does not have anything under “/usr/share/asterisk”. Why that leads to the message that a module would have been tampered with, is beyond my knowledge. I would have thought that the restore should use variables and relative paths, not absolute paths.

I did convert my FreePBX 15 installation to pjsip. That did work. From that, I did try a regular backup plus a limited backup based on only 12 modules hoping to catch key settings, users, extensions, ring groups, routes and trunks while remaining unsure about voicemail. Even the limited backup would suffer from the same issue as above.

Hence, I think that using a lower Asterisk version on FreePBX 17 will not solve the problem.

Unless someone with a good understanding for the backup/restore function can tell me how to avoid the absolute path issue, I would probably create the configuration again manually on FreePBX 17.

in asterisk.conf is a [directories] stanza

1 Like

Thank you very much!

However, the error does not draw from the first 13 lines in /etc/asterisk/asterisk.conf

Those lines read before and after the restore:

directories
astcachedir => /var/cache/asterisk
astetcdir => /etc/asterisk
astmoddir => /lib/x86_64-linux-gnu/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin

There is no /usr/share/asterisk in this. Hence, the source seems to be elsewhere?

Is that where your sound files are?

1 Like

Yes! On my old systems, folder /usr/share/asterisk does contain (plus some empty directories):

  • directory agi-bin containing the AGI_AsteriskManager
  • a symbolic link to sound files in /var/lib/asterisk/sounds
  • directory moh with soundfiles
  • directory sounds-DIST with further soundfiles and symbolic links
  • directory documentation
  • directory conf with subdirectories basic-pbx and samples
  • directory rest-api with json-files

is your astmoddir a symlink or is it real?

looks like your asterisk was installed by an old debian package with these peculiarities, In the past I would just recompile asterisk from source on such a box and then fix any customisations

I have a hunch that @billsimon might have a better solution though.

1 Like

My astmoddir is a symlink in the way that /lib/ points to /usr/lib/

If I am not mistaken, debian asterisk packages went up to 16.28. Indeed, asterisk was not compiled on my system but taken from the debian repos - which no longer contain asterisk in Debian 12.

If that makes backup/restore impossible or uneconomical, I will recreate the settings manually.

Not impossible but quite likely uneconomical in time