Which FreePBX version (from Linux CLI)

Can anyone offer a sure proof method for determining the FreePBX version a PBX is running from the Linux CLI?

Something similar to a cat /etc/redhat-release would be what I am taking about.

Sometimes I need to inventory a PBX from a SSH session, and it is no fun to open a GUI on the box just to figure this out.

Any solid tips would be appreciated.

Something like this should work ( stolen from the version upgrade module)


<?php // call bootstrap.php through freepbx.conf if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { include_once('/etc/asterisk/freepbx.conf'); } $version = getversion(); $framework_version = get_framework_version(); $core_xml = module_getinfo('core'); $core_version = $core_xml['core']['version']; echo "FreePBX Base Version: ".$version."\n"; echo "FreePBX Framework Version: ".$framework_version."\n"; echo "FreePBX Core Version: ".$core_version."\n"; ?>

short version

php -r ‘include("/etc/freepbx.conf");echo getversion(),"\n";’

I changed the line to read:

php -r ‘include("/etc/asterisk/freepbx.conf");echo getversion(),"\n";’

It worked like a charm.

Thank you!


This seems overly complex:

/var/lib/asterisk/bin/module_admin list

is the way to list all installed modules and versions.