Destroy an extension group
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
idstring
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_tokenstring
required
token to be passed as a header -
idstring
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_groupsarray
Show child attributes -
voice_mailobject
Show child attributes -
passwordstring
Extension SIP password -
profileobject
Show child attributes -
web_access_passwordstring
Extension independent password -
idstring
The id of the extension. -
forward_rulesobject
Show child attributes -
optionsobject
Show child attributes -
extension_numberstring
Extension number -
blfsarray
Show child attributes -
office_hoursobject
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.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
monitor_membersarray
required
-
enable_management_console_accessboolean
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_namestring
required
Name of extension group to be created. -
membersarray
required
-
enable_bargeinboolean
required
Barge in, listen or whisper -
enable_call_cross_groupboolean
required
enable_call_cross_group -
enable_intercomboolean
required
Indicates if extension group members are allowed for intercom. -
group_descriptionstring
required
Description for extension group to be created. -
enable_external_callboolean
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
-
idstring
Extension group unique ID. -
group_namestring
Name of extension group to be created.
Sample Response
{}
List extension voicemail greetings
Path parameters
-
access_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
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
-
pagesizeinteger
-
sort_bystring
-
rulesarray
Show child attributes -
paginationinteger
-
countinteger
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
Delete an extension
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
idstring
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
extension_idstring
required
The id of the extension. -
file_idstring
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
-
idstring
404
400
Sample Response
{
"id": 1234
}
Retrieve extension group
Path parameters
-
access_tokenstring
required
token to be passed as a header -
idstring
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_membersarray
Show child attributes -
enable_management_console_accessboolean
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_descriptionstring
Description for extension group to be created. -
group_namestring
Name of extension group to be created. -
enable_external_callboolean
Indicates if extension group members are allowed to call external numbers. -
enable_bargeinboolean
Barge in, listen or whisper -
idstring
Extension group unique ID. -
enable_intercomboolean
Indicates if extension group members are allowed for intercom. -
enable_call_cross_groupboolean
enable_call_cross_group -
membersarray
Show child attributes
Sample Response
{}
refer extension's call
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
descriptionstring
required
A notes for this API call, it's not mandatory. -
refer_tostring
required
the refer target, usually a number. -
extension_numberstring
required
Extension number -
request_idstring
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_idstring
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
monitor_membersarray
required
-
enable_management_console_accessboolean
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_namestring
required
Name of extension group to be created. -
membersarray
required
-
idstring
required
Extension group unique ID. -
enable_call_cross_groupboolean
required
enable_call_cross_group -
enable_intercomboolean
required
Indicates if extension group members are allowed for intercom. -
group_descriptionstring
required
Description for extension group to be created. -
enable_external_callboolean
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
voice_mailobject
required
Show child attributes -
profileobject
required
Show child attributes -
passwordstring
required
Extension SIP password -
idstring
required
The id of the extension. -
forward_rulesobject
required
Show child attributes -
optionsobject
required
Show child attributes -
web_access_passwordstring
required
Extension independent password -
blfsarray
required
-
office_hoursobject
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
Sample Response
hold extension's call
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
descriptionstring
required
A notes for this API call, it's not mandatory. -
session_idstring
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_numberstring
required
Extension number -
is_holdboolean
required
true use for hold the call, false to un-hold the call. -
request_idstring
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_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
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
-
pagesizeinteger
-
sort_bystring
-
paginationinteger
-
extensionsarray
Show child attributes -
countinteger
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
attended refer extension's call
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
descriptionstring
required
A notes for this API call, it's not mandatory. -
refer_to_2string
required
the refer target, usually a number. -
refer_to_1string
required
the refer target, usually a number. -
session_id_2string
required
the session ID of the "refer_to_2" call, this session ID is not mandatory. -
extension_numberstring
required
Extension number -
session_id_1string
required
the session ID of the "refer_to_1" call, this session ID is not mandatory. -
request_idstring
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
extension_idstring
required
The id of the extension. -
idstring
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_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
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
-
pagesizeinteger
-
sort_bystring
-
paginationinteger
-
groupsarray
Show child attributes -
countinteger
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
Retrieves status of extensions
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
extensionsarray
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
extension_idstring
required
The id of the extension. -
idstring
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_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
optional
Default value will be used when user does not specify value for this field. -
extension_numberstring
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
-
pagesizeinteger
-
sort_bystring
-
paginationinteger
-
extensionsarray
Show child attributes -
countinteger
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}
Add a new extension to the system.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
voice_mailobject
required
Show child attributes -
extension_numberstring
required
Extension number -
profileobject
required
Show child attributes -
passwordstring
required
Extension SIP password -
office_hoursobject
required
Show child attributes -
optionsobject
required
Show child attributes -
web_access_passwordstring
required
Extension independent password -
blfsarray
required
-
forward_rulesobject
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
application/json
-
idstring
The id of the extension.
405
Sample Response
{
"id": 1234
}
Retrieve the current active call sessions of extension.
Path parameters
-
access_tokenstring
required
token to be passed as a header -
extension_numberstring
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_idstring
required
Extension number -
display_namestring
required
-
extensionstring
required
Extension number -
domainstring
required
-
descriptionstring
required
A notes for this API call, it's not mandatory. -
authstring
required
Extension independent password -
tostring
required
Extension number -
request_idstring
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. -
sendsdpboolean
required
-
srcstring
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