CEN/Docs
CEN Documentation

Community setup guide · Customer guide

Own Routing API setup

Keep your own routing. You run an HTTPS Routing API that answers which of your PBXs owns a number; CEN asks it on the caller’s behalf and hands the caller a dial string for that PBX.

1. Run a Routing API

Implement the Routing API contract at a public HTTPS URL with a valid certificate. It receives a seven-digit number (block and line) and returns the host and port of the PBX that answers it.

2. Register it with CEN

  1. In manage.cenpbx.com open your network → Routing, choose Your own Routing API, enter the URL and save.
  2. If your API requires authentication, generate the token CEN sends to your API and configure your API to accept it as Authorization: Bearer.
  3. Use Test your Routing API with a real seven-digit number. CEN shows exactly what your API answered.

3. Receive calls

Generate the IAX password for your PBXs on the Routing tab. When someone dials a number in your area, CEN asks your API which PBX answers and gives the caller IAX2/from-cen:PASSWORD@host:port/AAAXXXYYYY. On every PBX your API can return, add to iax_custom.conf (Admin → Config Edit):

[from-cen]
type=user
username=from-cen
secret=YOUR-IAX-PASSWORD
auth=md5
encryption=yes
context=from-cen
requirecalltoken=yes
disallow=all
allow=ulaw,alaw,g722

and a [from-cen] context in extensions_custom.conf that only routes the full 10-digit number to local extensions, never to from-internal. Forward UDP 4569 to those PBXs.

4. Place calls

Issue a network key under API access and use the [from-internal-additional-custom] and [cen-dial] blocks from the PBX setup guide with CEN_KEY set to it. With a network key, dial all 10 digits; seven-digit numbers in your own area stay on your own routing.

5. Ask for activation

Lookups for your area return CEN-03 until a CEN administrator activates your network. Contact support once your test lookup succeeds.

Download Integration API Explorer