CEN/Docs
CEN Documentation

Community setup guide · Customer guide

Self-hosted Community Router

A ready-built PHP and MariaDB site for your own blocks, local numbers, PBX credentials and CEN connection. Install independently on CloudPanel or adapt its API to an existing backend.

Install the ready-built PHP/MariaDB router to manage a community independently. It replaces the example’s PHP arrays and fixed administrator password with a private database, secure login, revocable API credentials and a web workspace.

Download version 1.0.0 CloudPanel installation & full guide

How the backends connect

DirectionEndpointCredentialResult
CEN → your directoryGET /api/route.php?number=XXXYYYYThe cen_hubreq_… token generated in CEN RoutingJSON host, port, block and extension; no passwords
Your PBX → your routerPOST /api/dial.php: num, aniYour local block’s cr_… keySensitive IAX dial string or CEN intercept
Your router → CENPOST https://api.cenpbx.com/v1/dial: numYour cen_net_… network keySensitive global IAX dial string or CEN intercept

Send credentials in Authorization: Bearer headers. The local dialing endpoint also accepts POST field auth for Asterisk CURL. Never use query strings for secrets.

External member response

{
  "success": true, "status": "route",
  "destination": {
    "protocol": "iax2", "host": "pbx.example.net", "port": 4569,
    "block": "315", "number": "1234"
  }
}

Require exactly seven digits; keep block and extension as strings, and port as an integer. Reject unknown or disabled local numbers with {"success":true,"status":"intercept","code":"CEN-08"}. CEN currently maps member intercepts to CEN-08 and unreachable/invalid APIs to CEN-05. Authentication, input and rate failures return 401, 422 and 429.

Keep an existing PHP backend

You do not have to adopt the complete application. Implement this JSON contract over your current directory, validate the separate incoming token, and register its public HTTPS URL in CEN’s external Routing settings. CEN supplies a seven-digit Local Number and your backend chooses the PBX. Your database, customer provisioning and local number assignment remain yours.

For outgoing calls, your trusted server may use CEN’s dial endpoint with a ten-digit number, or use the directory-only GET /v1/route handoff API and resolve an explicitly approved member. Do not forward your CEN key to member APIs.

PBX authentication and dialing

The router uses individual from-community IAX passwords for local destinations. CEN’s current external-network API uses one shared from-cen password per network; copy the CEN-generated value into the router and apply it to every receiving PBX. This password is not part of member JSON.

Seven-digit local calls work independently of CEN. Ten-digit calls within your own area stay local; other global numbers use CEN when enabled. Every originating PBX key is scoped to its ANI block. The generated FreePBX bundle includes restricted inbound contexts, prefixed outbound routes, timeouts and all twelve intercept codes. The website does not install a media server or create extensions.

Install and operate

Create a Generic PHP CloudPanel site and a separate database. Upload the complete package, point the document root at public/, edit private config.php, and run php bin/install.php as the site user. No default login is shipped. Schedule bin/health.php every five minutes, and back up the database and configuration together.

The full installation guide includes the CloudPanel steps, PHP request example, credential pairing, limits, key rotation, recovery, migration from the example router, and FreePBX testing.

Download Integration API Explorer