Domain

This resource is designed to create and manage domains and their aliases.

Because the PBX platform is multi-domain, the domain name is a meaningful part of the full extension name. The fully qualified extension name consists of the client prefix, extension number, and domain, and has the following format:

client_prefix*extension_number@domain

For example, 001*100@sip.ringme.ru

Thus, when authorizing a SIP message from extensions, the domain name is also checked from the SIP field “From”. Because some devices send a domain IP address instead of a domain name, it is possible to set up domain aliases. Additionally, there are tools for matching a request to the desired domain based on the IP address of the request source, regardless of what is in the domain part of the From field, as well as tools for matching the request to the desired domain based on the actual content of the domain part of the sent “From” field. The procedure for authorization of SIP messages from extensions is described below.

Authorization order for SIP messages from extensions

  1. Searching for a header using information from the “From” field, matching the domain from the “From” field to the system domains.

  2. If the domain was not found in the previous step, the IP address from the From field is matched against the system's domain aliases. If a match is found, then the actual extension domain is calculated.

  3. If the domain was not found in the previous step, then the IP address of the request source is correlated with the Force Source of the system domains. If a match is found, then the actual extension domain is calculated.

  4. If the domain was not found in the previous step, then the contents of the domain part of the “From” field correspond to the Force Destinations of the system domains. If a match is found, then the actual extension domain is calculated.

  5. Authorization of the request in accordance with the settings of the extension.

Description of the Domain resource fields

Name

Type

Description

Required

Default value

Name

Type

Description

Required

Default value

name

string

Domain name. Cannot be changed after the domain has been created.

Yes

 

domain_prefix

string

Unique domain prefix, must be a string of 5 digits. The domain prefix can be used for client calls from different domains to each other. For such call, dial a number in the format domain_prefix*client_prefix*extension_number

Yes

 

comment

string

Comment

No

null

id

integer

Unique domain id. Read only.

-

-

Description of the Domain Alias resource fields

Name

Type

Description

Required

Default value

Name

Type

Description

Required

Default value

name

string

A domain alias, which can be in the “From” field in place of the domain. Can be a domain IP address.

Yes

 

comment

string

Comment

No

null

id

integer

Unique domain alias id. Read only.

-

-

Description of the domain Force Source resource fields

Name

Type

Description

Required

Default value

Name

Type

Description

Required

Default value

ip

string

IP address, requests from which will be considered related to this domain.

Yes

 

comment

string

Comment

No

null

id

integer

Unique domain Force Source id. Read only.

-

-

Description of the domain Force Destination resource fields

Name

Type

Description

Required

Default value

Name

Type

Description

Required

Default value

ip

string

The IP address in the “From” field that will map the request to this domain.

Yes

 

comment

string

Comment

No

null

id

integer

Unique domain Force Destination id. Read only.

-

-

Resources section "Admin"

POST /admin/domain/

Create a new domain

JSON params

Domain fields

Response fields

Domain fields

GET /admin/domain/

Get a list of domains

Request parameters

Name

Type

Name

Type

comment

array [string]

domain_prefix

array [string]

id

array [integer]

name

array [string]

Response fields

Domain fields


PUT /admin/domain/{domain_id}

Update a domain

URL parameters

Name

Type

Name

Type

domain_id

integer

JSON parameters

Domain fields

Response fields

Domain fields

GET /admin/domain/{domain_id}

Get a domain by its id

URL parameters

Name

Type

Name

Type

domain_id

integer

Response fields

Domain fields

DELETE /admin/domain/{domain_id}

Delete a domain

URL parameters

Name

Type

Name

Type

domain_id

integer


POST /admin/domain/{domain_id}/alias/

Add a domain alias

URL parameters

Name

Type

Name

Type

domain_id

integer

JSON parameters

Domain alias fields

Response fields

Domain alias fields

GET /admin/domain/{domain_id}/alias/

Get a list of the domain aliases

URL parameters

Name

Type

Name

Type

domain_id

integer

Response fields

Domain alias fields


PUT /admin/domain/{domain_id}/alias/{id}

Update a domain alias

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer

JSON parameters

Domain alias fields

Response fields

Domain alias fields

GET /admin/domain/{domain_id}/alias/{id}

Get a domain alias by its id

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer

Response fields

Domain alias fields

DELETE /admin/domain/{domain_id}/alias/{id}

Delete a domain alias

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer


POST /admin/domain/{domain_id}/force_src/

Add a domain force source

URL parameters

Name

Type

Name

Type

domain_id

integer

JSON parameters

Domain force source fields

Response fields

Domain force source fields

GET /admin/domain/{domain_id}/force_src/

Get a list of domain force source

URL parameters

Name

Type

Name

Type

domain_id

integer

Response fields

Domain force source fields


PUT /admin/domain/{domain_id}/force_src/{id}

Update a domain force source

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer

JSON parameters

Domain force source fields

Response fields

Domain force source fields

GET /admin/domain/{domain_id}/force_src/{id}

Get a domain force source

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer

Response fields

Domain force source fields

DELETE /admin/domain/{domain_id}/force_src/{id}

Delete a domain force source

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer


POST /admin/domain/{domain_id}/force_dst/

Add a domain force destination

URL parameters

Name

Type

Name

Type

domain_id

integer

JSON parameters

Domain force destination fields

Response fields

Domain force destination fields

GET /admin/domain/{domain_id}/force_dst/

Get a list of domain force destination

URL parameters

Name

Type

Name

Type

domain_id

integer

Response fields

Domain force destination fields


PUT /admin/domain/{domain_id}/force_dst/{id}

Update a domain force destination

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer

JSON parameters

Domain force destination fields

Response fields

Domain force destination fields

GET /admin/domain/{domain_id}/force_dst/{id}

Get a domain force destination

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer

Response fields

Domain force destination fields

DELETE /admin/domain/{domain_id}/force_dst/{id}

Delete a domain force destination

URL parameters

Name

Type

Name

Type

domain_id

integer

id

integer