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

404
User not found
200
Successful operation
application/json
  • id

    integer

    format : int64

400
Invalid extension number supplied

Sample Response

                      
{
    "id": 1234
}
                      
                    

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

    integer

  • count

    integer

  • pagination

    integer

  • groups

    array

    Show child attributes
  • sort_by

    string

Sample Response

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

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

    string

    Name of extension group to be created.
  • enable_call_cross_group

    boolean

    enable_call_cross_group
  • enable_intercom

    boolean

    Indicates if extension group members are allowed for intercom.
  • 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.
  • members

    array

    Show child attributes
  • id

    integer

    Extension group unique ID.

    format : int64

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

    string

    required

    Name of extension group to be created.
  • enable_call_cross_group

    boolean

    required

    enable_call_cross_group
  • enable_intercom

    boolean

    required

    Indicates if extension group members are allowed for intercom.
  • 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.
  • members

    array

    required

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

    integer

  • count

    integer

  • extensions

    array

    Show child attributes
  • pagination

    integer

  • sort_by

    string

Sample Response

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

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

    object

    Show child attributes
  • extension_number

    string

    Extension number
  • profile

    object

    Show child attributes
  • password

    string

    Extension SIP password
  • forward_rules

    object

    Show child attributes
  • web_access_password

    string

    Extension independent password
  • options

    object

    Show child attributes
  • id

    integer

    The id of the extension.

    format : int64

  • voice_mail

    object

    Show child attributes
  • blfs

    array

    Show child attributes
  • belong_groups

    array

    Show child attributes

Sample Response

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

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

    string

    required

    Name of extension group to be created.
  • enable_call_cross_group

    boolean

    required

    enable_call_cross_group
  • enable_intercom

    boolean

    required

    Indicates if extension group members are allowed for intercom.
  • 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.
  • members

    array

    required

  • id

    integer

    required

    Extension group unique ID.

    format : int64

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

                      
                      
                    

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

    array

    required

    Extension numbers array

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 '{
    "extensions": [
        1,
        2,
        3
    ]
}'
                      
                    

Responses

200
Successful operation
application/json
  • --

    object

    Show child attributes

Sample Response

                      
{}
                      
                    

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

    object

    required

    Show child attributes
  • profile

    object

    required

    Show child attributes
  • password

    string

    required

    Extension SIP password
  • forward_rules

    object

    required

    Show child attributes
  • web_access_password

    string

    required

    Extension independent password
  • options

    object

    required

    Show child attributes
  • voice_mail

    object

    required

    Show child attributes
  • blfs

    array

    required

  • id

    integer

    required

    The id of the extension.

    format : int64

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

Responses

200
Udpate extension

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

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

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

    object

    required

    Show child attributes
  • profile

    object

    required

    Show child attributes
  • password

    string

    required

    Extension SIP password
  • forward_rules

    object

    required

    Show child attributes
  • web_access_password

    string

    required

    Extension independent password
  • options

    object

    required

    Show child attributes
  • voice_mail

    object

    required

    Show child attributes
  • blfs

    array

    required

  • extension_number

    string

    required

    Extension number

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

Responses

405
Invalid input
200
Created extension object
application/json
  • id

    integer

    The id of the extension.

    format : int64

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

    integer

    required

    The id of the extension.

    format : int64

  • id

    integer

    required

    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 '{
    "extension_id": 1234,
    "id": 1234
}'
                      
                    

Responses

404
User not found
200
Successful operation
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

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

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

    integer

  • count

    integer

  • pagination

    integer

  • rules

    array

    Show child attributes
  • sort_by

    string

Sample Response

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

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

    integer

    required

    The id of the extension.

    format : int64

  • id

    integer

    required

    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 '{
    "extension_id": 1234,
    "id": 1234
}'
                      
                    

Responses

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

Sample Response

                      
                      
                    

make call by extension

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

    string

    required

    Extension number
  • to

    string

    required

    Extension number
  • auth

    string

    required

    Extension independent password
  • src

    string

    required

    Extension number
  • domain

    string

    required

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