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

    string

    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

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

    string

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

    array

    Show child attributes
  • voice_mail

    object

    Show child attributes
  • password

    string

    Extension SIP password
  • profile

    object

    Show child attributes
  • web_access_password

    string

    Extension independent password
  • id

    string

    The id of the extension.

    format : int64

  • forward_rules

    object

    Show child attributes
  • options

    object

    Show child attributes
  • extension_number

    string

    Extension number
  • blfs

    array

    Show child attributes
  • office_hours

    object

    Show child attributes

Sample Response

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

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

    string

    required

    Name of extension group to be created.
  • members

    array

    required

  • enable_bargein

    boolean

    required

    Barge in, listen or whisper
  • 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.

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

    string

    Extension group unique ID.

    format : int64

  • group_name

    string

    Name of extension group to be created.

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

  • sort_by

    string

  • rules

    array

    Show child attributes
  • pagination

    integer

  • count

    integer

Sample Response

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

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

    string

    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

                      
                      
                    

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

    string

    required

    The id of the extension.

    format : int64

  • file_id

    string

    required

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

Responses

200
Successful operation
application/json
  • id

    string

    format : int64

404
User not found
400
Invalid extension number supplied

Sample Response

                      
{
    "id": 1234
}
                      
                    

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

    string

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

    array

    Show child attributes
  • 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.
  • 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_bargein

    boolean

    Barge in, listen or whisper
  • id

    string

    Extension group unique ID.

    format : int64

  • enable_intercom

    boolean

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

    boolean

    enable_call_cross_group
  • members

    array

    Show child attributes

Sample Response

                      
{}
                      
                    

refer extension's call

POST /refer
refer extension's call
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • description

    string

    required

    A notes for this API call, it's not mandatory.
  • refer_to

    string

    required

    the refer target, usually a number.
  • extension_number

    string

    required

    Extension number
  • request_id

    string

    required

    A uniqie ID used for track the result, it's not mandatory, you can specify it by yourself, or don't specified it then the server generate one for you and return it in the response.

    format : int64

  • session_id

    string

    required

    the session ID of the call which will be referred, it's not mandatory, if didn't specify the session ID and the extension has multiple calls, the PBX will refer a random call of the extension.

    format : int64

Sample Request

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

Responses

200
refer call

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

    string

    required

    Name of extension group to be created.
  • members

    array

    required

  • id

    string

    required

    Extension group unique ID.

    format : int64

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

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

                      
                      
                    

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

    object

    required

    Show child attributes
  • password

    string

    required

    Extension SIP password
  • id

    string

    required

    The id of the extension.

    format : int64

  • forward_rules

    object

    required

    Show child attributes
  • options

    object

    required

    Show child attributes
  • web_access_password

    string

    required

    Extension independent password
  • blfs

    array

    required

  • office_hours

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

Responses

200
Udpate extension

Sample Response

                      
                      
                    

hold extension's call

POST /hold
hold extension's call
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • description

    string

    required

    A notes for this API call, it's not mandatory.
  • session_id

    string

    required

    the session ID of the call which will be held, it's not mandatory, if didn't specify the session ID and the extension has multiple calls, the PBX will hold a random call of the extension.

    format : int64

  • extension_number

    string

    required

    Extension number
  • is_hold

    boolean

    required

    true use for hold the call, false to un-hold the call.
  • request_id

    string

    required

    A uniqie ID used for track the result, it's not mandatory, you can specify it by yourself, or don't specified it then the server generate one for you and return it in the response.

    format : int64

Sample Request

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

Responses

200
hold call

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

  • sort_by

    string

  • pagination

    integer

  • extensions

    array

    Show child attributes
  • count

    integer

Sample Response

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

attended refer extension's call

POST /attended_refer
attended refer extension's call
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • description

    string

    required

    A notes for this API call, it's not mandatory.
  • refer_to_2

    string

    required

    the refer target, usually a number.
  • refer_to_1

    string

    required

    the refer target, usually a number.
  • session_id_2

    string

    required

    the session ID of the "refer_to_2" call, this session ID is not mandatory.

    format : int64

  • extension_number

    string

    required

    Extension number
  • session_id_1

    string

    required

    the session ID of the "refer_to_1" call, this session ID is not mandatory.

    format : int64

  • request_id

    string

    required

    A uniqie ID used for track the result, it's not mandatory, you can specify it by yourself, or don't specified it then the server generate one for you and return it in the response.

    format : int64

Sample Request

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

Responses

200
attended refer call

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

    string

    required

    The id of the extension.

    format : int64

  • id

    string

    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

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

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

    integer

  • sort_by

    string

  • pagination

    integer

  • groups

    array

    Show child attributes
  • count

    integer

Sample Response

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

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

                      
{}
                      
                    

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

    string

    required

    The id of the extension.

    format : int64

  • id

    string

    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

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

    object

    required

    Show child attributes
  • extension_number

    string

    required

    Extension number
  • profile

    object

    required

    Show child attributes
  • password

    string

    required

    Extension SIP password
  • office_hours

    object

    required

    Show child attributes
  • options

    object

    required

    Show child attributes
  • web_access_password

    string

    required

    Extension independent password
  • blfs

    array

    required

  • forward_rules

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

Responses

200
Created extension object
application/json
  • id

    string

    The id of the extension.

    format : int64

405
Invalid input

Sample Response

                      
{
    "id": 1234
}
                      
                    

Retrieve the current active call sessions of extension.

GET /sessions
Retrieve the current active call sessions of extension.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • extension_number

    string

    required

    Extension number

Sample Request

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

Responses

200
Successful operation
application/json
  • --

    object

    Show child attributes

Sample Response

                      
{}
                      
                    

make call by extension

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

    string

    required

    Extension number
  • display_name

    string

    required

  • extension

    string

    required

    Extension number
  • domain

    string

    required

  • description

    string

    required

    A notes for this API call, it's not mandatory.
  • auth

    string

    required

    Extension independent password
  • to

    string

    required

    Extension number
  • request_id

    string

    required

    A uniqie ID used for track the result, it's not mandatory, you can specify it by yourself, or don't specified it then the server generate one for you and return it in the response.

    format : int64

  • sendsdp

    boolean

    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