ExoVoIPDeveloper guide

Security

The security center protects the phone system from unauthorized access attempts: automatic blocking of suspicious addresses, geographic restrictions, a list of trusted addresses and an event log.

For tenants

GET /v1/security/summary (scope extensions:read) summarizes the access attempts blocked in recent hours, extension by extension: useful for spotting exposed SIP credentials or misconfigured phones.

curl -s https://centralino.exovoip.it/api/v1/security/summary -H "X-API-Key: $EXOPBX_API_KEY"

For the platform

The other endpoints are reserved for global keys (scopes security:read / security:write):

FeatureEndpoint
Overall status (active protections, blocked addresses, attempts per hour and per country)GET /v1/security/status
Blocked addresses, manual block and unblockGET/POST /v1/security/bans, POST /v1/security/bans/unban
Automatic blocking rules (attempts, window, duration)GET /v1/security/jails, PUT /v1/security/jails/:name
Geographic restrictions per service (SIP, WebRTC, control panel, API, SSH)GET /v1/security/geo, PUT /v1/security/geo/:service
Trusted addresses (never blocked), also per tenant or extensionGET/POST /v1/security/whitelist, DELETE /v1/security/whitelist/:id
Settings and event logGET/PUT /v1/security/settings, GET /v1/security/logs
Trunk verification (network overlap)GET /v1/trunks/approvals, POST /v1/trunks/:id/approve, POST /v1/trunks/:id/reject
curl -s https://centralino.exovoip.it/api/v1/security/status -H "X-API-Key: $EXOPBX_API_KEY"
curl -s -X POST https://centralino.exovoip.it/api/v1/security/bans -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "Content-Type: application/json" -d '{"ip":"203.0.113.10","durationS":3600,"reason":"manual"}'
curl -s -X POST https://centralino.exovoip.it/api/v1/security/bans/unban -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "Content-Type: application/json" -d '{"ip":"203.0.113.10"}'
curl -s -X POST https://centralino.exovoip.it/api/v1/security/whitelist -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "Content-Type: application/json" -d '{"cidr":"198.51.100.0/24","label":"Sede Acme","tenantId":3}'

API keys can also be restricted by IP address: see Authentication.

Endpoints

RequestScopeSDK method
GET /v1/security/summaryextensions:readsecurity.summary()
GET /v1/security/statussecurity:readsecurity.status()
GET /v1/security/banssecurity:readsecurity.bans()
POST /v1/security/banssecurity:writesecurity.ban()
POST /v1/security/bans/unbansecurity:writesecurity.unban()
GET /v1/security/jailssecurity:readsecurity.jails()
PUT /v1/security/jails/:namesecurity:writesecurity.updateJail() · py: security.update_jail()
GET /v1/security/geosecurity:readsecurity.geo()
PUT /v1/security/geo/:servicesecurity:writesecurity.updateGeo() · py: security.update_geo()
GET /v1/security/whitelistsecurity:readsecurity.whitelist()
POST /v1/security/whitelistsecurity:writesecurity.addWhitelist() · py: security.add_whitelist()
DELETE /v1/security/whitelist/:idsecurity:writesecurity.deleteWhitelist() · py: security.delete_whitelist()
GET /v1/security/settingssecurity:readsecurity.getSettings() · py: security.get_settings()
PUT /v1/security/settingssecurity:writesecurity.setSettings() · py: security.set_settings()
GET /v1/security/logssecurity:readsecurity.logs()