IVR Instances¶
Retrieve list of IVRs¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/ivrs/
¶ Get the list of IVRs of the group.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/services/ivrs/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "ivrs": [ { "serviceUserId": "basic_group_test@sip.netaxis.be", "active": true, "name": "BasicGroupTest", "type": "Basic" "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_initial", "fullPathName": "test_department_parent_1 \\ test_department_initial" }, "phoneNumber": "+323334223", "extension": "" }, { "serviceUserId": "standard_group_test@sip.netaxis.be", "active": false, "name": "StandardGroupTest", "type": "Standard" "phoneNumber": "", "extension": "" } ] }
- Response JSON Object:
ivrs (array) – a list of auto attendant objects as defined as IVR attributes in List.
- Status Codes:
200 OK – no error
Display group’s IVR instance¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/ivrs/
(string: user_id)/
¶ Retrieve the settings of the specified IVR instance.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/services/ivrs/basic_group_test@sip.netaxis.be/ HTTP/1.1 Host: example.com
or
GET /api/v1/tenants/foo/groups/foogroup/services/ivrs/basic_group_test@sip.netaxis.be/ HTTP/1.1 Host: example.com { "full_response": true }
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "ivrInstance": { "serviceInstanceProfile": { "department": "", "phoneNumber": "", "name": "BasicGroupTest", "extension": "5413" }, "serviceUserId": "basic_group_test@sip.netaxis.be", "extensionDialingScope": "Group", "afterHoursMenu": { "enableFirstMenuLevelExtensionDialing": false, "announcementSelection": "Default", "keys": [ { "key": "0" "action": "Transfer To Operator", "submenuId": "", "phoneNumber": "", "description": "group operator", }, { "key": "1" "action": "Extension Dialing", "submenuId": "", "phoneNumber": "", "description": "dial by extension", } ] }, "businessHoursMenu": { "enableFirstMenuLevelExtensionDialing": false, "announcementSelection": "Default", "keys": [ { "key": "0" "action": "Repeat Menu", "submenuId": "", "phoneNumber": "", "description": "repeat menu", }, { "key": "2" "action": "Name Dialing", "submenuId": "", "phoneNumber": "", "description": "dial by name", } ] }, "nameDialingScope": "Group", "firstDigitTimeoutSeconds": 15, "type": "Basic", "nameDialingEntries": "LastName + FirstName" } }
- Request JSON Object:
full_response (boolean) – If True, it will loop through all the keys of each menu and retrieve each connected entity.
- Response JSON Object:
ivrInstance (object) – see IVR Instance attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Create a group’s IVR instance¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/ivrs/
¶ Create new settings for IVR instance.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/services/ivrs/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "ivrInstance": { "serviceUserId": "basic_group_test@sip.netaxis.be", "type": "Basic", "serviceInstanceProfile": { "cliFirstName": "Basic Group", "cliLast Name": "Test", "name": "BasicGroupTest", }, "templateName": "basic_menu" } }
Example response:
HTTP/1.1 200 OK
- Request JSON Object:
ivrInstance (object) – see IVR Instance attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Update a group’s IVR instance¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/ivrs/
(string: user_id)/
¶ Update the settings of the specified IVR instance.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/services/ivrs/basic_group_test@sip.netaxis.be/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "ivrInstance": { "serviceUserId": "basic_group_test@sip.netaxis.be", "nameDialingScope": "Enterprise", "firstDigitTimeoutSeconds": 10, "nameDialingEntries": "LastName + FirstName or FirstName + LastName", "templateName": "additional" } }
Example response:
HTTP/1.1 200 OK
- Request JSON Object:
ivrInstance (object) – see IVR Instance attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Disassign a group’s IVR instance¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/ivrs/
(string: user_id)/
¶ Disassign the settings of the specified IVR instance.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/services/ivrs/basic_group_test@sip.netaxis.be/ HTTP/1.1 Host: example.com Content-Type: "application/json" {}
Example response:
HTTP/1.1 200 OK
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the deletion
Configuration Information for IVR Management¶
In the POST API, when creating an IVR (aka auto attendant), it is possible to configure APIO to generate automatically the service user ID according to a specific rule.
The APIO behaviour for the IVR automatic service user ID generation is controlled by the following setting:
"AUTOMATIC_ID_RULES": {
"SUID_AUTO_ATTENDANT_AUTO_GENERATE": true,
"SUID_AUTO_ATTENDANT_RULE": "{{group_id}}_aa{{RND_4}}@{{domain}}"
}
- Settings description:
SUID_AUTO_ATTENDANT_AUTO_GENERATE: APIO will enable the auto-generation of IVR service ids. Default is False, it must be set to True to have this feature working.
SUID_AUTO_ATTENDANT_RULE: the formatting rule for the IVR service user id. Default is “{{group_id}}_aa{{RND_4}}@{{domain}}”.
If the service user id number is built using the phone number in the generation rule, it is possible to configure APIO to change the service user io according to phone number modification on PUT request.
The APIO behaviour for the IVR automatic service user id modification is controlled by the following setting:
"AUTOMATIC_ID_RULES": {
"SERVICE_USERS_UPDATE_ID_PHONE_NUMBER": true
}
- Settings description:
SERVICE_USERS_UPDATE_ID_PHONE_NUMBER: APIO will enable the auto-update of auto attendant service ids. Default is False, it must be set to have this feature working with phone numbers based service user ids and containing any of “{{phone_number_e164}}”, “{{country_code}}” or “{{national_no_0}}” placeholders in id generation rule.
The formatting of the phone Number in the List answer is controlled by the following settings:
"GROUP_NUMBERS_USE_CC_CLI": false
- With following parameters:
GROUP_NUMBERS_USE_CC_CLI, the OCI documentation says explicitly the numbers will be returned in E164. But it has been reported that sometimes it is not the case, and we have no info from Cisco about this. This parameter is used in some APIs (in this page the answer of the GET Hunt Groups List) to implement a workaround that will assume that the number is in national format if same country code as Grouo CLi. It is based on observations and not on Cisco doc. Therefore toi be used carefully