Destroy an extension group
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
id
string
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
200
404
400
Sample Response
Retrieve extension
Path parameters
-
access_token
string
required
token to be passed as a header -
id
string
required
The id of the extension.
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
application/json
-
belong_groups
array
-
voice_mail
object
-
password
string
Extension SIP password -
profile
object
-
web_access_password
string
Extension independent password -
id
string
The id of the extension. -
forward_rules
object
-
options
object
-
extension_number
string
Extension number -
blfs
array
-
office_hours
object
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.
Path parameters
-
access_token
string
required
token to be passed as a header
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
application/json
-
id
string
Extension group unique ID. -
group_name
string
Name of extension group to be created.
Sample Response
{}
List extension voicemail greetings
Path parameters
-
access_token
string
required
token to be passed as a header -
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
application/json
-
pagesize
integer
-
sort_by
string
-
rules
array
-
pagination
integer
-
count
integer
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
Delete an extension
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
id
string
required
The id of the extension.
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
404
400
Sample Response
Create extension voicemail greeting
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
extension_id
string
required
The id of the extension. -
file_id
string
required
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
application/json
-
id
string
404
400
Sample Response
{
"id": 1234
}
Retrieve extension group
Path parameters
-
access_token
string
required
token to be passed as a header -
id
string
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
application/json
-
monitor_members
array
-
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. -
enable_intercom
boolean
Indicates if extension group members are allowed for intercom. -
enable_call_cross_group
boolean
enable_call_cross_group -
members
array
Sample Response
{}
refer extension's call
Path parameters
-
access_token
string
required
token to be passed as a header
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. -
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.
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
Sample Response
Update extension group.
Path parameters
-
access_token
string
required
token to be passed as a header
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. -
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
Sample Response
Udpate extension
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
voice_mail
object
required
-
profile
object
required
-
password
string
required
Extension SIP password -
id
string
required
The id of the extension. -
forward_rules
object
required
-
options
object
required
-
web_access_password
string
required
Extension independent password -
blfs
array
required
-
office_hours
object
required
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
Sample Response
hold extension's call
Path parameters
-
access_token
string
required
token to be passed as a header
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. -
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.
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
Sample Response
List extensions
Path parameters
-
access_token
string
required
token to be passed as a header -
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
application/json
-
pagesize
integer
-
sort_by
string
-
pagination
integer
-
extensions
array
-
count
integer
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
attended refer extension's call
Path parameters
-
access_token
string
required
token to be passed as a header
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. -
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. -
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.
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
Sample Response
Destroy extension voicemail greeting
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
extension_id
string
required
The id of the extension. -
id
string
required
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
404
400
Sample Response
List extension groups
Path parameters
-
access_token
string
required
token to be passed as a header -
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
application/json
-
pagesize
integer
-
sort_by
string
-
pagination
integer
-
groups
array
-
count
integer
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
Retrieves status of extensions
Path parameters
-
access_token
string
required
token to be passed as a header
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
]
}'
Sample Response
{}
Set extension voicemail greeting activated or deactivated
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
extension_id
string
required
The id of the extension. -
id
string
required
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
404
400
Sample Response
search extensions
Path parameters
-
access_token
string
required
token to be passed as a header -
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. -
extension_number
string
optional
Extension number
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/extensions/search \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
application/json
-
pagesize
integer
-
sort_by
string
-
pagination
integer
-
extensions
array
-
count
integer
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
Add a new extension to the system.
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
voice_mail
object
required
-
extension_number
string
required
Extension number -
profile
object
required
-
password
string
required
Extension SIP password -
office_hours
object
required
-
options
object
required
-
web_access_password
string
required
Extension independent password -
blfs
array
required
-
forward_rules
object
required
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
application/json
-
id
string
The id of the extension.
405
Sample Response
{
"id": 1234
}
Retrieve the current active call sessions of extension.
Path parameters
-
access_token
string
required
token to be passed as a header -
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" \
Sample Response
{}
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. -
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
Sample Response