Internal Number (/extension/)

You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).

The internal number is the main unit of the PBX that performs a certain list of functions in accordance with the specified type. The resource is used to manage the most abstract properties of an internal number. For specific parameters of internal numbers, depending on the type, there are separate sections (for example, the /phone/ resource for internal numbers of the "phone terminal" type).

The internal number can be addressed by different types of numbers:

  • absolute - has the form domain_ prefix*client_ prefix*internal_number_name or client_ prefix*internal_number_name@domain_name (for example, 00500*0003*100 or 0003*100@somehost.com). You can get the client and domain prefixes from the “Client resource (/client/)”;

  • relative - within the same domain, the client_prefix*internal_number_name (for example, 0003*100) and just internal_number_name within the same client (for example, 100).

The option client_prefix*internal_number_name is the main one used when issuing results and receiving parameters.

Once created, the internal number cannot be renamed. It can be deleted and then created under a different name.

It is possible to combine several internal numbers into a group of internal numbers.

When you update the parameters of the extension located in , the sync parameters (List of Sync Parameters) will also be updated on the rest of the extensions in the “bundle“

Description of data structures

Internal number (ExtensionItem)

Name

Type

Mandatory

Description

Name

Type

Mandatory

Description

ani_rfc3325

boolean

none

It is intended for insertion in the P-Asserted-Identity field of the external number to which the call came to the PBX, in case of further call forwarding from this internal number to another external number (do not use it unnecessarily, please check with the telephony provider about the possibilities and consequences of using it)

caller_id_name

string

none

The name displayed during outgoing call

client_id

long

yes

ID of the client that the internal number belongs to

create_date 

string

none

Internal number creation date

dial_rule_id 

long

none

ID of the dialing rule

dial_rule_limit

long

none

Limit on the number of dialing rules

did_as_transfer_caller_id 

string

none

The external PBX number that the call originally came to, which is displayed when the number is further forwarded

domain

string

none

Client Domain

extension_group_id

long

none

ID of the group that the internal number belongs to

extra_params

string

none

Additional parameters

id

long

yes

Unique ID of the internal number

label

string

none

Display Name of the internal number. Displayed on the called terminal for outgoing calls (if supported)

message_did

string

none

The message that will be sent to this internal number if an external number is assigned to it

name

string

yes

client_ prefix*internal_number_name or just internal_number_name (in this case, the prefix will be added automatically). The bit depth of the number within the client is the same and is determined by its properties

status

string

none

Internal number status:

  • 'active' – active;

  • 'blocked' – blocked

type

string

yes

Type of internal number. The settings that depend on the type can be found in the corresponding sections:

caller_id_group_method

string

none

Sets the DID(public_caller_id_number) selection type from the caller_id_group_id group.

To choose from:

  • 'f' – fixed (default): only the DID set in client_public_caller_id_number will be used

  • 'r' – random (a random DID will be selected, from the caller_id_group_id group)

Example

Creating an internal number of the 'phone' type:

System response:

{   "status": "active",   "domain": "sip.ringme.ru",   "create_date": "2020-03-16 12:11:13",   "name": "000*100",    "dial_rule_limit": null,   "extension_group_id": null,   "label": "Ivanov Peter",   "caller_id_name": null,   "client_id": 12,   "extra_params": null,    "message_did": null,   "dial_rule_id": null,    "ani_rfc3325": false,   "type": "phone",   "id": 190,   "did_as_transfer_caller_id": null, "caller_id_group_method": "f" }

Resources of the "Client" section

POST /client/{client_id}/extension/
Add an internal number

URL Parameters

Name

Type

Name

Type

client_id

string

JSON parameters

Name

Type

Mandatory

Name

Type

Mandatory

caller_id_name

string

none

dial_rule_id 

long

none

dial_rule_limit

long

none

did_as_transfer_caller_id 

string

none

extension_group_id

long

none

extra_params

string

none

label

string

none

message_did

string

none

name

string

yes

status

string

none

type

string

yes

caller_id_group_id

long

none

client_public_caller_id_number

string

none

caller_id_group_method

string

none

Response fields

Name

Type

Name

Type

ani_rfc3325

boolean

caller_id_name

string

client_id

long

create_date 

string

dial_rule_id 

long

dial_rule_limit

long

did_as_transfer_caller_id 

string

domain

string

extension_group_id

long

extra_params

string

id

long

label

string

message_did

string

name

string

status

string

type

string

caller_id_group_id

long

client_public_caller_id_number

string

caller_id_group_method

string

GET /client/{client_id}/extension/
Get a list of internal client numbers

URL Parameters

Name

Type

Name

Type

client_id

string

JSON parameters

Name

Type

Name

Type

status

array [string]

name

array [string]

id

array [string]

client_id

string

extension_group_id

array [string]

per_page

integer

type

array [string]

page

integer

Response fields

Name

Type

Name

Type

ani_rfc3325

boolean

caller_id_name

string

client_id

long

create_date 

string

dial_rule_id 

long

dial_rule_limit

long

did_as_transfer_caller_id 

string

domain

string

extension_group_id

long

extra_params

string

id

long

label

string

message_did

string

name

string

status

string

type

string

caller_id_group_id

long

client_public_caller_id_number

string

caller_id_group_method

string

PUT /client/{client_id}/extension/{extension_id}
Update the internal number

URL Parameters

Name

Type

Name

Type

extension_id

integer

client_id

string

JSON parameters

Name

Type

Mandatory

Name

Type

Mandatory

caller_id_name

string

none

dial_rule_id 

long

none

dial_rule_limit

long

none

did_as_transfer_caller_id 

string

none

extension_group_id

long

none

extra_params

string

none

label

string

none

message_did

string

none

status

string

none

caller_id_group_id

long

none

client_public_caller_id_number

string

none

caller_id_group_method

string

none

Response fields

Name

Type

Name

Type

ani_rfc3325

boolean

caller_id_name

string

client_id

long

create_date 

string

dial_rule_id 

long

dial_rule_limit

long

did_as_transfer_caller_id 

string

domain

string

extension_group_id

long

extra_params

string

id

long

label

string

message_did

string

name

string

status

string

type

string

caller_id_group_id

long

client_public_caller_id_number

string

caller_id_group_method

string

GET /client/{client_id}/extension/{extension_id}
Get information about the internal number

URL Parameters

Name

Type

Name

Type

extension_id

integer

client_id

string

Response fields

Name

Type

Name

Type

ani_rfc3325

boolean

caller_id_name

string

client_id

long

create_date 

string

dial_rule_id 

long

dial_rule_limit

long

did_as_transfer_caller_id 

string

domain

string

extension_group_id

long

extra_params

string

id

long

label

string

message_did

string

name

string

status

string

type

string

caller_id_group_id

long

client_public_caller_id_number

string

caller_id_group_method

string

Resources of the "Internal numbers group" section

Resources of the "Internal number" section