List extensions

GET /list
List a collection of extension.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    optional

    Default value will be used when user does not specify value for this field.

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/extensions/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagination

    integer

  • count

    integer

  • sort_by

    string

  • pagesize

    integer

  • extensions

    array

    Show child attributes

Sample Response

                      
{
    "pagination": 8,
    "count": 100,
    "sort_by": "DEFAULT",
    "pagesize": 10
}
                      
                    

Udpate extension

POST /update
Modify the settings of an extension.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • voice_mail

    object

    required

    Show child attributes
  • id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • options

    object

    required

    Show child attributes
  • blfs

    array

    required

  • forward_rules

    object

    required

    Show child attributes
  • web_access_password

    string

    required

    Extension independent password
  • profile

    object

    required

    Show child attributes
  • office_hours

    object

    required

    Show child attributes
  • password

    string

    required

    Extension SIP password

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1234,
    "office_hours": {
        "wednesday_to": "17:00",
        "tuesday_from": "09:00",
        "sunday_to": "17:00",
        "tuesday_to": "17:00",
        "wednesday_from": "09:00",
        "sunday_from": "09:00",
        "saturday_from": "09:00",
        "friday_from": "09:00",
        "thursday_from": "09:00",
        "thursday_to": "17:00",
        "monday_from": "09:00",
        "saturday_to": "17:00",
        "friday_to": "17:00",
        "monday_to": "17:00",
        "office_hours_mode": "CUSTOM"
    }
}'
                      
                    

Responses

200
Created extension

Sample Response

                      
                      
                    

Delete an extension

POST /destroy
Delete a certain extension.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1234
}'
                      
                    

Responses

400
Invalid extension id supplied
404
User not found
200
Successful operation

Sample Response

                      
                      
                    

Destroy extension voicemail greeting

POST /greeting_file/destroy
Destroy a extension voicemail greeting.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

  • extension_id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/greeting_file/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1234,
    "extension_id": 1234
}'
                      
                    

Responses

400
Invalid extension number supplied
404
User not found
200
Successful operation

Sample Response

                      
                      
                    

Add a new extension group to the system.

POST /group/create
Create a new extension group.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • enable_intercom

    boolean

    required

    Indicates if extension group members are allowed for intercom.
  • enable_management_console_access

    boolean

    required

    Indicates if extension group members are allowed to access the PortSIP PBX Management Console. IMPORTANT NOTE: Make sure that the Access Password configured is secure.
  • enable_call_cross_group

    boolean

    required

    enable_call_cross_group
  • group_name

    string

    required

    Name of extension group to be created.
  • members

    array

    required

  • group_description

    string

    required

    Description for extension group to be created.
  • enable_external_call

    boolean

    required

    Indicates if extension group members are allowed to call external numbers.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/group/create \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Created extension group
application/json
  • group_name

    string

    Name of extension group to be created.
  • id

    integer

    Extension group unique ID.

Sample Response

                      
{}
                      
                    

Retrieve extension group

GET /group/show
Retrieves the properties of an extension group.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    Extension group ID

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/extensions/group/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • enable_management_console_access

    boolean

    Indicates if extension group members are allowed to access the PortSIP PBX Management Console. IMPORTANT NOTE: Make sure that the Access Password configured is secure.
  • enable_intercom

    boolean

    Indicates if extension group members are allowed for intercom.
  • id

    integer

    Extension group unique ID.
  • enable_call_cross_group

    boolean

    enable_call_cross_group
  • group_name

    string

    Name of extension group to be created.
  • members

    array

    Show child attributes
  • group_description

    string

    Description for extension group to be created.
  • enable_external_call

    boolean

    Indicates if extension group members are allowed to call external numbers.

Sample Response

                      
{}
                      
                    

List extension voicemail greetings

GET /greeting_file/list
Retrieves a list of greeting files available to certain extension.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    optional

    Default value will be used when user does not specify value for this field.

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/extensions/greeting_file/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagination

    integer

  • count

    integer

  • rules

    array

    Show child attributes
  • sort_by

    string

  • pagesize

    integer

Sample Response

                      
{
    "pagination": 8,
    "count": 100,
    "sort_by": "DEFAULT",
    "pagesize": 10
}
                      
                    

Destroy an extension group

POST /group/destroy
Destroy a certain extension group.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    Extension group unique ID.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/group/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

400
Invalid extension number supplied
404
User not found
200
Successful operation

Sample Response

                      
                      
                    

List extension groups

GET /group/list
List extension groups
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    optional

    Default value will be used when user does not specify value for this field.

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/extensions/group/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagination

    integer

  • count

    integer

  • groups

    array

    Show child attributes
  • sort_by

    string

  • pagesize

    integer

Sample Response

                      
{
    "pagination": 8,
    "count": 100,
    "sort_by": "DEFAULT",
    "pagesize": 10
}
                      
                    

make call by extension

POST /call
make call by extension.
Request body
application/json
  • src

    string

    required

    Extension number
  • domain

    string

    required

  • to

    string

    required

    Extension number
  • extension

    string

    required

    Extension number
  • auth

    string

    required

    Extension independent password

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/call \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "domain": "abc.com"
}'
                      
                    

Responses

200
Created call

Sample Response

                      
                      
                    

Retrieves status of extensions

POST /status
Retrieves the current status of given extensions.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • --

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/status \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "[]": 1234
}'
                      
                    

Responses

200
Successful operation
application/json
  • --

    object

    Show child attributes

Sample Response

                      
{}
                      
                    

Retrieve extension

GET /show
Retrieves the settings of an extension.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/extensions/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • voice_mail

    object

    Show child attributes
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • options

    object

    Show child attributes
  • belong_groups

    array

    Show child attributes
  • blfs

    array

    Show child attributes
  • forward_rules

    object

    Show child attributes
  • extension_number

    string

    Extension number
  • web_access_password

    string

    Extension independent password
  • profile

    object

    Show child attributes
  • office_hours

    object

    Show child attributes
  • password

    string

    Extension SIP password

Sample Response

                      
{
    "id": 1234,
    "office_hours": {
        "wednesday_to": "17:00",
        "tuesday_from": "09:00",
        "sunday_to": "17:00",
        "tuesday_to": "17:00",
        "wednesday_from": "09:00",
        "sunday_from": "09:00",
        "saturday_from": "09:00",
        "friday_from": "09:00",
        "thursday_from": "09:00",
        "thursday_to": "17:00",
        "monday_from": "09:00",
        "saturday_to": "17:00",
        "friday_to": "17:00",
        "monday_to": "17:00",
        "office_hours_mode": "CUSTOM"
    }
}
                      
                    

Update extension group.

POST /group/update
Update extension group
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • enable_management_console_access

    boolean

    required

    Indicates if extension group members are allowed to access the PortSIP PBX Management Console. IMPORTANT NOTE: Make sure that the Access Password configured is secure.
  • enable_intercom

    boolean

    required

    Indicates if extension group members are allowed for intercom.
  • id

    integer

    required

    Extension group unique ID.
  • enable_call_cross_group

    boolean

    required

    enable_call_cross_group
  • group_name

    string

    required

    Name of extension group to be created.
  • members

    array

    required

  • group_description

    string

    required

    Description for extension group to be created.
  • enable_external_call

    boolean

    required

    Indicates if extension group members are allowed to call external numbers.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/group/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Created extension group

Sample Response

                      
                      
                    

Add a new extension to the system.

POST /create
Create a new extension. Only tenant or admin user has access to this API.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • voice_mail

    object

    required

    Show child attributes
  • profile

    object

    required

    Show child attributes
  • options

    object

    required

    Show child attributes
  • blfs

    array

    required

  • forward_rules

    object

    required

    Show child attributes
  • extension_number

    string

    required

    Extension number
  • web_access_password

    string

    required

    Extension independent password
  • password

    string

    required

    Extension SIP password
  • office_hours

    object

    required

    Show child attributes

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/create \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "office_hours": {
        "wednesday_to": "17:00",
        "tuesday_from": "09:00",
        "sunday_to": "17:00",
        "tuesday_to": "17:00",
        "wednesday_from": "09:00",
        "sunday_from": "09:00",
        "saturday_from": "09:00",
        "friday_from": "09:00",
        "thursday_from": "09:00",
        "thursday_to": "17:00",
        "monday_from": "09:00",
        "saturday_to": "17:00",
        "friday_to": "17:00",
        "monday_to": "17:00",
        "office_hours_mode": "CUSTOM"
    }
}'
                      
                    

Responses

200
Created tenant object
application/json
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
405
Invalid input

Sample Response

                      
{
    "id": 1234
}
                      
                    

Create extension voicemail greeting

POST /greeting_file/create
Create extension voicemail greeting
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • file_id

    integer

    required

  • extension_id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/greeting_file/create \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "file_id": 1234,
    "extension_id": 1234
}'
                      
                    

Responses

400
Invalid extension number supplied
404
User not found
200
Successful operation
application/json
  • id

    integer

Sample Response

                      
{
    "id": 1234
}
                      
                    

Set extension voicemail greeting activated or deactivated

POST /greeting_file/update
Set extension voicemail greeting activated or deactivated
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

  • extension_id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/extensions/greeting_file/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1234,
    "extension_id": 1234
}'
                      
                    

Responses

400
Invalid extension number supplied
404
User not found
200
Successful operation

Sample Response