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 id of the extension.

    format : int64

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
  • web_access_password

    string

    Extension independent password
  • forward_rules

    object

    Show child attributes
  • options

    object

    Show child attributes
  • id

    integer

    The id of the extension.

    format : int64

  • blfs

    array

    Show child attributes
  • profile

    object

    Show child attributes
  • office_hours

    object

    Show child attributes
  • extension_number

    string

    Extension number
  • belong_groups

    array

    Show child attributes
  • password

    string

    Extension SIP password
  • voice_mail

    object

    Show child attributes

Sample Response

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

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

    format : int64

  • extension_id

    integer

    required

    The id of the extension.

    format : int64

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

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

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 id of the extension.

    format : int64

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

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

Sample Response

                      
                      
                    

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.

    format : int64

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

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

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

    format : int64

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
  • group_name

    string

    Name of extension group to be created.
  • enable_external_call

    boolean

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

    boolean

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

    integer

    Extension group unique ID.

    format : int64

  • 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.
  • group_description

    string

    Description for extension group to be created.
  • members

    array

    Show child attributes
  • enable_call_cross_group

    boolean

    enable_call_cross_group

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 id of the extension.

    format : int64

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

                      
{}
                      
                    

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

    format : int64

  • extension_id

    integer

    required

    The id of the extension.

    format : int64

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

200
Successful operation
application/json
  • id

    integer

    format : int64

404
User not found
400
Invalid extension number supplied

Sample Response

                      
{
    "id": 1234
}
                      
                    

make call by extension

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

    string

    required

    Extension number
  • extension

    string

    required

    Extension number
  • auth

    string

    required

    Extension independent password
  • domain

    string

    required

  • src

    string

    required

    Extension number

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

                      
                      
                    

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.

    enum : ['DEFAULT', 'OPTIONAL']

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
  • sort_by

    string

  • pagesize

    integer

  • pagination

    integer

  • groups

    array

    Show child attributes
  • count

    integer

Sample Response

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

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
  • web_access_password

    string

    required

    Extension independent password
  • forward_rules

    object

    required

    Show child attributes
  • options

    object

    required

    Show child attributes
  • profile

    object

    required

    Show child attributes
  • office_hours

    object

    required

    Show child attributes
  • extension_number

    string

    required

    Extension number
  • blfs

    array

    required

  • password

    string

    required

    Extension SIP password
  • voice_mail

    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": {
        "tuesday_to": "17:00",
        "friday_from": "09:00",
        "tuesday_from": "09:00",
        "friday_to": "17:00",
        "sunday_to": "17:00",
        "monday_to": "17:00",
        "thursday_from": "09:00",
        "monday_from": "09:00",
        "wednesday_from": "09:00",
        "saturday_from": "09:00",
        "saturday_to": "17:00",
        "wednesday_to": "17:00",
        "thursday_to": "17:00",
        "sunday_from": "09:00",
        "office_hours_mode": "CUSTOM"
    }
}'
                      
                    

Responses

200
Created extension object
application/json
  • id

    integer

    The id of the extension.

    format : int64

405
Invalid input

Sample Response

                      
{
    "id": 1234
}
                      
                    

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
  • web_access_password

    string

    required

    Extension independent password
  • forward_rules

    object

    required

    Show child attributes
  • options

    object

    required

    Show child attributes
  • id

    integer

    required

    The id of the extension.

    format : int64

  • profile

    object

    required

    Show child attributes
  • office_hours

    object

    required

    Show child attributes
  • blfs

    array

    required

  • password

    string

    required

    Extension SIP password
  • voice_mail

    object

    required

    Show child attributes

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 '{
    "office_hours": {
        "tuesday_to": "17:00",
        "friday_from": "09:00",
        "tuesday_from": "09:00",
        "friday_to": "17:00",
        "sunday_to": "17:00",
        "monday_to": "17:00",
        "thursday_from": "09:00",
        "monday_from": "09:00",
        "wednesday_from": "09:00",
        "saturday_from": "09:00",
        "saturday_to": "17:00",
        "wednesday_to": "17:00",
        "thursday_to": "17:00",
        "sunday_from": "09:00",
        "office_hours_mode": "CUSTOM"
    },
    "id": 1234
}'
                      
                    

Responses

200
Udpate extension

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.

    enum : ['DEFAULT', 'OPTIONAL']

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
  • sort_by

    string

  • pagesize

    integer

  • pagination

    integer

  • rules

    array

    Show child attributes
  • count

    integer

Sample Response

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

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
  • group_name

    string

    required

    Name of extension group to be created.
  • enable_external_call

    boolean

    required

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

    boolean

    required

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

    boolean

    required

    enable_call_cross_group
  • group_description

    string

    required

    Description for extension group to be created.
  • members

    array

    required

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

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.

    format : int64

Sample Response

                      
{}
                      
                    

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.

    enum : ['DEFAULT', 'OPTIONAL']

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
  • sort_by

    string

  • pagesize

    integer

  • pagination

    integer

  • extensions

    array

    Show child attributes
  • count

    integer

Sample Response

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

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

    format : int64

  • extension_id

    integer

    required

    The id of the extension.

    format : int64

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

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

Sample Response

                      
                      
                    

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
  • group_name

    string

    required

    Name of extension group to be created.
  • enable_external_call

    boolean

    required

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

    boolean

    required

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

    integer

    required

    Extension group unique ID.

    format : int64

  • enable_call_cross_group

    boolean

    required

    enable_call_cross_group
  • group_description

    string

    required

    Description for extension group to be created.
  • members

    array

    required

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

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