ExoVoIPDeveloper guide

Outbound routes

Outbound routes select the trunk for external calls based on the dialed number, with backup trunks in case of failure. Scopes outbound_routes:read / outbound_routes:write.

Creating a route

curl -s -X POST https://centralino.exovoip.it/api/v1/outbound-routes \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Cellulari","beginsWith":"3","restDigits":9,"trunkIds":[1,2]}'
curl -s -X POST https://centralino.exovoip.it/api/v1/outbound-routes/simulate \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" -d '{"number":"3331234567"}'
FieldDescription
beginsWith, restDigitsThe number begins with… and has N more digits
trim, prependLeading digits to strip / prefix to add
trunkIdsTrunks in order of preference (the following ones are backups)
priorityEvaluation order

The simulator (POST /v1/outbound-routes/simulate) shows, for a given number, whether the call is allowed, which route applies, the number actually dialed and the trunks used: useful for checking the configuration without placing a call.

Blocks by category

The tenant policy blocks entire categories of destinations (e.g. premium-rate, satellite, international numbers) and defines the allowed destinations for forwarding.

curl -s -X PUT https://centralino.exovoip.it/api/v1/outbound-routes/policy \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" \
  -d '{"blocked":["premium","satellite","international"]}'

If the policy has been locked by Exobyte, changes return 403.

Endpoints

RequestScopeSDK method
GET /v1/outbound-routesoutbound_routes:readoutboundRoutes.list() · py: outbound_routes.list()
POST /v1/outbound-routesoutbound_routes:writeoutboundRoutes.create() · py: outbound_routes.create()
PUT /v1/outbound-routes/orderoutbound_routes:writeoutboundRoutes.reorder() · py: outbound_routes.reorder()
GET /v1/outbound-routes/policyoutbound_routes:readoutboundRoutes.getPolicy() · py: outbound_routes.get_policy()
PUT /v1/outbound-routes/policyoutbound_routes:writeoutboundRoutes.setPolicy() · py: outbound_routes.set_policy()
POST /v1/outbound-routes/simulateoutbound_routes:readoutboundRoutes.simulate() · py: outbound_routes.simulate()
GET /v1/outbound-routes/:idoutbound_routes:readoutboundRoutes.get() · py: outbound_routes.get()
PATCH /v1/outbound-routes/:idoutbound_routes:writeoutboundRoutes.update() · py: outbound_routes.update()
DELETE /v1/outbound-routes/:idoutbound_routes:writeoutboundRoutes.delete() · py: outbound_routes.delete()