Repository navigation
Releases: CakeDC/fusionpbx-rest-api
Releases · CakeDC/fusionpbx-rest-api
Release list
1.0.0
FusionPBX REST API v1.0.0
First release of the CakeDC fork of AccelerateNetworks/fusionpbx-rest-api. Targets FusionPBX 5.6.5.
⚠️ Breaking changes
- API keys are bound to a FusionPBX user. Each request runs as the key's user: it gets the permissions of that user's groups, acts on the user's domain, and records it creates show that user as
insert_user. Existing keys stop working until a superadmin edits each one, picks a user and enables it. - Actions check FusionPBX permissions instead of granting them. A missing permission returns
403withmissing_permissions. The README lists the permissions each action needs. - Requests are limited to the key user's domain.
domain_uuidis now optional and defaults to the user's domain. Using another domain needsdomain_select. - Responses only contain documented columns.
extension-createreturns the SIP password only when the user hasextension_password. Clients that read other columns fromextension-create,destination-create,destination-details,ringgroup-createordomain-detailsmust be updated. extension-detailstakesextension_uuid(wasextension).
New
extension-user-list: the extensions linked to a FusionPBX user.cdr-search: paginated call history, by default one row per call. Filters: date range, direction, extensions, counterparty number, missed calls.cdr-details: a call with all its legs, starting from any leg's uuid.- Keys have a name, an enabled flag and an optional expiry date. Key management needs the new
rest_api_key_view/add/edit/deletepermissions. - App Defaults creates an index on
v_xml_cdr.originating_leg_uuid(PostgreSQL) forcdr-searchandcdr-details. It is builtCONCURRENTLY, so new call records aren't blocked, and a failed build is logged.
Security fixes
- Fixed the key secret check:
password_verify()was called with its arguments swapped. - Action and app names are validated before they are used in include paths.
- Numbers that reach dialplan XML or event socket commands are validated, and ring group names are escaped in the dialplan XML.
- The admin pages escape their output and use FusionPBX CSRF tokens.
- Removed
githook.php, which rangit pullfrom the web interface. - API requests never read or write the FusionPBX browser session.
- Every rejected key gets the same
401 {"error": "unauthorized"}; the reason only goes to the server's error log.
Upgrading
- Check out the tag in
app/rest_api:git fetch --tags && git checkout v1.0.0 - In FusionPBX, go to Advanced → Upgrade, check Schema, App Defaults, Menu Defaults and Permission Defaults, and press Execute. On a large CDR table, App Defaults can take a few minutes.
- Log out and back in, so the new permissions are loaded into the session.
- Edit each existing key: bind it to a user and enable it.
- Give each integration's user the permissions its actions need (see the README).
Known limitations
cdr-searchandcdr-detailslink the legs of a call throughbridge_uuidandoriginating_leg_uuid, following direct links only (no transfer chains). This linking hasn't yet been checked against a production CDR export.cdr-listis unchanged (last 100 legs, no filters) and kept as the legacy endpoint.
Development
- Unit and HTTP test suites run without FusionPBX (
composer test), using stand-ins that mimic FusionPBX 5.6.5. - A PostgreSQL suite runs in Docker (
composer test-pgsql).
Two choices before publishing:
- Ticket numbers: I left the Redmine numbers (#43936–#43940) out because the repo is public. Add them if the release page is meant for internal use.
- Secret check wording: the first security bullet says plainly that password_verify() had its arguments swapped, without saying how that could be abused. Say if you'd rather word it more vaguely.