Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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).

This resource is intended for finding out the registration addresses of the telephone terminal on the PBX and managing them. To set the static registration, use the phone terminal resource.

Table of Contents

Description of data structures

Expand
titleExpand

Data of a single registration (registration)

Name

Type

Description

contact_address

string

The registration address and port specified by the device during registration in the address:port format

device

object

Device Name (User Agent)

expires

long

The date (UTC) after which the registration will be lost (if it is not renewed by the device)

real_address

string

The address and port where the registration request actually came from (as opposed to contact_address)

registration_id

string

Unique registration ID

Data of all registrations (RegInfo)

Name

Type

Description

extension_id

integer

Unique ID of the internal number

registered

boolean

The value is "true" if there are active registrations. If the value is "false", the "registrations" array contains data about the last (already expired) registrations

registrations

array

Array of registration elements

Examples

For an internal number with ID 3, you need to find out the status of its registrations:

System response:

Code Block
languagejson
{     
  "registered":true,  
  "extension_id":3,  
  "registrations": [
    {        
      "device":"Yealink SIP-T46G 28.72.14.5",        
      "real_address":"sip:xxx.xxx.xxx.xxx:62338",        
      "contact_address":"sip:000*002@192.168.5.52:5062",        
      "expires":699,        
      "registration_id": "uloc-572b0ffb-6d47-001"   
    }
  ]
}

Now, let's delete the above registration:

If the client has a lot of internal numbers, it is more convenient to get data about them in blocks:

Expand
titleSystem response:
Code Block
languagejson
[    
  {       
     "registered":true,        
     "extension_id":3,        
     "registrations":[            
       {               
          "device":"Yealink SIP-T46G 28.72.14.5",                
          "real_address":"sip:xxx.xxx.xxx.xxx:62338",                
          "contact_address":"sip:000*002@192.168.5.52:5062",                
          "expires":1764,                
          "registration_id":"uloc-5731d93c-4a88-51"            
        }        
      ]    
  },    
  {         
    "registered":true,        
    "extension_id":2,        
    "registrations":[            
      {                 
        "device":"Grandstream GXP2020 1.2.5.3",                
        "real_address":"sip:xxx.xxx.xxx.xxx:5060",                
        "contact_address":"sip:000*000@192.168.5.60:5060;transport=udp",                
        "expires":1444,                
        "registration_id":"uloc-570cfe57-aa6-8d4"            
       }        
     ]    
  }
]

Resources of the "Internal number" section

Expand
titleGET /extension/registration/

GET /extension/registration/

Get the registration status of all internal numbers

Request parameters

Name

Type

extension_id

array[integer]

Response fields

Name

Type

registered

boolean

extension_id

long

registrations

array[registration]

Expand
titleGET /extension/{extension_id}/registration/

GET /extension/{extension_id}/registration/

Get the internal number registration status

Request parameters

Name

Type

extension_id

string

Response fields

Name

Type

registered

boolean

extension_id

long

registrations

array[registration]

Expand
titleDELETE /extension/{extension_id}/registration/

DELETE /extension/{extension_id}/registration/

Delete all registrations on the internal number

Request parameters

Name

Type

extension_id

string

Expand
titleDELETE /extension/{extension_id}/registration/{registration_id}

DELETE /extension/{extension_id}/registration/{registration_id}

Delete a specific registration on an internal number

Request parameters

Name

Type

registration_id

string

extension_id

string