ExoVoIPDeveloper guide

Extensions

An extension is a phone system user: short number, name, SIP credentials for phones and softphones, voicemail, forwarding and recording. Scopes extensions:read / extensions:write.

Creating an extension

curl -s -X POST https://centralino.exovoip.it/api/v1/extensions \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" \
  -d '{"number":"105","name":"Giulia Verdi","email":"giulia.verdi@example.com",
       "voicemail":{"enabled":true,"email":"giulia.verdi@example.com"}}'

Main fields:

FieldDescription
numberExtension number (unique within the tenant)
name, emailDisplay name and address for notifications and voicemail
voicemailVoicemail: enabled, email, PIN
followMeForwarding to mobile
forwardingDestinations for busy / no answer / unreachable
recordModeRecording: inherit, always, on_demand, never

The SIP password is returned on creation and by POST /v1/extensions/:id/password (regeneration). GET /v1/extensions/:id/sip-credentials returns the full credentials for configuring a phone or the WebRTC softphone.

Limits: if the tenant has reached its maximum number of extensions, creation returns 409 LIMIT_REACHED.

Updating, searching, deleting

curl -s "https://centralino.exovoip.it/api/v1/extensions?registered=false" -H "X-API-Key: $EXOPBX_API_KEY"
curl -s -X PATCH https://centralino.exovoip.it/api/v1/extensions/12 -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "Content-Type: application/json" -d '{"name":"Giulia Verdi (Vendite)"}'
curl -s https://centralino.exovoip.it/api/v1/extensions/12/sip-credentials -H "X-API-Key: $EXOPBX_API_KEY"
curl -s -X DELETE https://centralino.exovoip.it/api/v1/extensions/12 -H "X-API-Key: $EXOPBX_API_KEY"

List filters: q (number or name), enabled, registered. Real-time status (registered, busy, ringing, connected devices) is covered in Real-time.

Forwarding to mobile

curl -s -X PUT https://centralino.exovoip.it/api/v1/extensions/12/follow-me \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" \
  -d '{"enabled":true,"number":"+393331234567","rings":3,"mode":"sequential"}'

External destinations follow the tenant's allowed-destinations policy (national only, national and European, all): a number that is not allowed returns 400 VALIDATION_ERROR with the reason in the details. For forwarding with announcement or in silent mode, see Mobile forwarding.

Feature codes and Do Not Disturb

From their phone, enabled extensions (canOverrideHours field) can force business hours open or closed (*90 closed, *91 open, *92 reset, *93 status). Each extension can also switch itself off or back on with *94 (off) and *95 (on): see Extension hours and status. The optional PIN for the business-hours codes is set like this:

curl -s -X PUT https://centralino.exovoip.it/api/v1/feature-codes/settings \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" -d '{"overridePin":"4821"}'

An extension's Do Not Disturb feature, when available on your phone system, appears among the endpoints below, and its status is visible in the dnd and availability fields of the real-time data.

Extension hours and status

Each extension has its own hours, which decide when it receives calls:

Hours (scheduleMode)Behaviour
alwaysAlways on (default)
tenantFollows the company's business hours (default calendar)
calendarFollows a specific company calendar, set in calendarId

Outside its hours, or when switched off, the extension does not ring: neither its phones nor the mobile linked through forwarding. The call follows the extension's "no answer" rule; if none is set, it goes to voicemail (if enabled). In ring groups and queues the extension is skipped. Callers from another extension, including during an attended transfer, first hear the message "The extension you called is not available at the moment".

The status can be forced at any time:

  • from the phone: *94 switches your own extension off and *95 switches it on, with a voice confirmation;
  • from the control panel: on the extension page, "Hours and status" card, with the Switch on, Switch off and Back to schedule buttons; the hours are chosen in the same card;
  • via API: force field with on, off or auto (back to schedule).

The override lasts until the extension's next scheduled change (with "Always on", until changed again) and does not affect the company's business hours, which are managed with *90–*93.

curl -s https://centralino.exovoip.it/api/v1/extensions/12/availability -H "X-API-Key: $EXOPBX_API_KEY"

curl -s -X PUT https://centralino.exovoip.it/api/v1/extensions/12/availability \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" \
  -d '{"scheduleMode":"calendar","calendarId":3}'

curl -s -X PUT https://centralino.exovoip.it/api/v1/extensions/12/availability \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" -d '{"force":"off"}'

The response includes the hours, the current override with its expiry (forceExpiresAt, null when it lasts until changed again) and available, i.e. whether the extension is receiving calls right now. Fields omitted from the PUT are left unchanged.

User role

Control panel users with the "user" role can view and edit only their own extension (details, forwarding, hours and status, SIP credentials).

Endpoints

RequestScopeSDK method
GET /v1/feature-codes/settingsextensions:readfeatureCodes.getSettings() · py: feature_codes.get_settings()
PUT /v1/feature-codes/settingsextensions:writefeatureCodes.setSettings() · py: feature_codes.set_settings()
GET /v1/extensionsextensions:readextensions.list()
POST /v1/extensionsextensions:writeextensions.create()
GET /v1/extensions/:idextensions:readextensions.get()
PATCH /v1/extensions/:idextensions:writeextensions.update()
DELETE /v1/extensions/:idextensions:writeextensions.delete()
PUT /v1/extensions/:id/follow-meextensions:writeextensions.followMe() · py: extensions.follow_me()
GET /v1/extensions/:id/dndextensions:readextensions.getDnd() · py: extensions.get_dnd()
PUT /v1/extensions/:id/dndextensions:writeextensions.setDnd() · py: extensions.set_dnd()
GET /v1/extensions/:id/availabilityextensions:readextensions.getAvailability() · py: extensions.get_availability()
PUT /v1/extensions/:id/availabilityextensions:writeextensions.setAvailability() · py: extensions.set_availability()
POST /v1/extensions/:id/passwordextensions:writeextensions.resetPassword() · py: extensions.reset_password()
GET /v1/extensions/:id/sip-credentialsextensions:writeextensions.sipCredentials() · py: extensions.sip_credentials()