Add an Extension

Add and configure an extension.

Request URL

{base_url}/{api_path}/extension/add?token={token}

Request parameters

Parameter Required Type Description
number Yes String Extension number.
Note:
  • Only numbers are allowed.
  • The maximum length is 7.
username Yes String Caller ID name.
Note: The following characters are NOT allowed:

! % . @ : ; & " ' \ < >` $

registername Yes String Registration name.
Note:
  • Only alphanumerics are allowed.
  • The maximum length is 31.
registerpassword Yes String Registration password.
Note:

Only alphanumerics and the following characters are allowed: ~ ^ * - _ ?

Strong password is required by default.
  • Must contain non-consecutive numbers, uppercase and lowercase.
  • The minimum length is 16.
  • Do not contain "Extension" and "Caller ID Name" of this extension.
callerid No String Caller ID.
Note:
  • Only alphanumerics are allowed.
  • The maximum length is 31.

Default value: Same as extension number.

maxregistrations No Integer Maximum concurrent registrations allowed.

Valid values: 1-5

Default value: 1

loginpassword No String Login password.
Note: Only alphanumerics and the following characters are allowed: ~ ^ * - _ ?

Strong password is required by default.

  • Must contain non-consecutive numbers, uppercase and lowercase.
  • The minimum length is 10.
  • Do not contain "Extension" and "Caller ID Name" of this extension.
email No String Email address.
Note:
  • Must be in the format of email address.
  • Space and the following characters are NOT allowed:# ; , [ ] = & " ' \ <> ` $
mobile No Integer Mobile number.
Note:
  • When Enable Mobility Extension feature is enabled or Call Forwarding destination is set to Mobile Number, the parameter is required.
  • Only numbers are allowed.
  • The maximum length is 31.
hasvoicemail No String Whether to enable Enable Voicemail feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: on

vmsecret No Integer Voicemail password.
Note:
  • Only numbers are allowed.
  • The maximum length is 63.

Default value: Same as extension number.

enablevmtoemail No String Whether to enable Send Voicemail to Email feature or not.

Valid values:

  • off: disable
  • on: enable. Send voicemail to extension user's email.
  • custom: Send voicemail to custom email.

Default value: off

alwaysforward No String Whether to enable Always Call Forwarding feature or not.

Valid values:

  • on: enable
  • off: disable
Default value: off
atransferto No String The destination of alwaysforward.

Valid values:

  • Voicemail
  • Extension
  • Mobile Number
  • Custom Number
atransferext No Integer When atransferto is Extension, the extension number should be configured.
atransferprefix No Integer When atransferto is Mobile Number or Custom Number, prefix may need to be configured according to outbound routes.
Note:
  • Only numbers are allowed.
  • The maximum length is 7.
atransfernum No Integer When atransferto is Custom Number, phone number must be configured.
Note:
  • Only numbers are allowed.
  • The maximum length is 15.
noanswerforward No String Whether to enable No Answer Call Forwarding feature or not.

Valid values:

  • on: enable
  • off: disable
Default value: on
ntransferto No String The destination of noanswerforward.

Valid values:

  • Voicemail
  • Extension
  • Mobile Number
  • Custom Number

Default value: Voicemail

ntransferext No Integer When ntransferto is Extension, the extension number should be configured.
ntransferprefix No Integer When ntransferto is Mobile Number or Custom Number, prefix may need to be configured according to outbound routes.
Note:
  • Only numbers are allowed.
  • The maximum length is 7.
ntransfernum No Integer When ntransferto is Custom Number, phone number must be configured.
Note:
  • Only numbers are allowed.
  • The maximum length is 15.
busyforward No String Whether to enable When Busy Call Forwarding feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: on

btransferto No String The destination of busyforward.

Valid values:

  • Voicemail
  • Extension
  • Mobile Number
  • Custom Number

Default value: Voicemail

btransferext No Integer When btransferto is Extension, the extension number should be configured.
btransferprefix No Integer When btransferto is Mobile Number or Custom Number, prefix may need to be configured according to outbound routes.
Note:
  • Only numbers are allowed.
  • The maximum length is 7.
btransfernum No Integer When btransferto is Custom Number, phone number must be configured.
Note:
  • Only numbers are allowed.
  • The maximum length is 15.
ringsimultaneous No String Whether to enable Ring Simultaneous feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: off

enablemobile No String Whether to enable Enable Mobility Extension feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: off

mobileprefix No String When Enable Mobility Extension feature is enabled, prefix may need to be configured according to outbound routes.
allowbeingmonitored No String Whether to enable Allow Being Monitored feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: off

monitormode No String Monitor mode.

Valid values:

  • Disabled
  • Extensive
  • Listen
  • Whisper
  • Barge-in

Default value: Disabled

ringtimeout No String Ring timeout in seconds.

Default value: 30

maxduration No String The maximum call duration allowed in seconds.

Default value: Follow System

dnd No String Whether to enable DND feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: off

callrestriction No String Whether to enable Outbound Restriction feature or not.

Valid values:

  • on: enable
  • off: disable

Default value: off

agentid No String The agent ID to be announced in the greeting prompt when users call to a queue. By default, the parameter is null, which means that the extension number will be announced.
Tip: Call extension/update to edit the extension agentid.
selectoutroute No String The outbound routes that are available to the extension.

Response parameters

Parameter Type Description
status String Request result.
  • Success
  • Failed

Examples

Request example

Add extension 5000.

POST /api/v2.0.0/extension/add?token=721eebe15cb3c27b60daeb1f120f0c05
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
	"number": "5000",
	"username": "5000",
	"registername": "5000",
	"registerpassword": "v0S*ZrB6Y3g~1-oe"
}
Response example
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE

{
    "status": "Success"
}