Outgoing Calling Plan Services¶
Outgoing Calling Plan Originating¶
Display group’s external outgoing calling plan originating¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/outgoing_calling_plan/originating/
¶ Retrieve the settings of the Outgoing Calling Plan Originating service of the group.
If configured (see below), this API will also include the status of the Outgoing Digit Plan.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/services/outgoing_calling_plan/originating/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "groupPermissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "permission": "Allow"} ], }, "departmentsPermissions": [ { "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_available_parent_1", "fullPathName": "test_department_available_parent_1" }, "permissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "permission": "Allow"} ], } } ] }
- Response JSON Object:
groupPermissions (object) – an object as defined in Outgoing Calling Plan Permissions.
departmentsPermissions (array) – a list of objects as defined in Outgoing Calling Plan Department Permissions.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the group
Update a group’s external outgoing calling plan originating¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/outgoing_calling_plan/originating/
¶ Update the settings of the Outgoing Calling Plan Originating service of the group.
If configured (see below), this API will also allow to update the Outgoing Digit Plan.
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/services/outgoing_calling_plan/originating/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "groupPermissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "permission": "Allow"} ], }, "departmentsPermissions": [ { "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_available_parent_1" }, "permissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "permission": "allow"} ], } } ] }
- Request JSON Object:
groupPermissions (object) – an object as defined in Outgoing Calling Plan Permissions.
departmentsPermissions (array) – a list of objects as defined in Outgoing Calling Plan Department Permissions.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the group
400 Bad Request – error during the update. Specific eror cases:
2: INVALID_PARAMETERS, “It is not allowed to modify the permission {}.”, with a value in place of {} can occur if GROUP_OCP_UPDATES_ONLY is configure
Outgoing Calling Plan Redirecting¶
Display group’s external outgoing calling plan redirecting¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/outgoing_calling_plan/redirecting/
¶ Retrieve the settings of the Outgoing Calling Plan Redirecting service of the group.
If configured (see below), this API will also include the status of the Outgoing Digit Plan.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/services/outgoing_calling_plan/redirecting/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "groupPermissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "permission": "Allow"} ], }, "departmentsPermissions": [ { "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_available_parent_1", "fullPathName": "test_department_available_parent_1" }, "permissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "permission": "Allow"} ], } } ] }
- Response JSON Object:
groupPermissions (object) – an object as defined in Outgoing Calling Plan Permissions.
departmentsPermissions (array) – a list of objects as defined in Outgoing Calling Plan Department Permissions.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the group
Update a group’s external outgoing calling plan redirecting¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/outgoing_calling_plan/redirecting/
¶ Update the settings of the Outgoing Calling Plan Redirecting service of the group.
If configured (see below), this API will also allow to update the Outgoing Digit Plan.
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/services/outgoing_calling_plan/redirecting/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "groupPermissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "allow": True} ], }, "departmentsPermissions": [ { "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_available_parent_1" }, "permissions": { "group": "Allow", "local": "Allow", "tollFree": "Allow", "toll": "Allow", "international": "Allow", "operatorAssisted": "Allow", "chargeableDirectoryAssisted": "Allow", "specialServicesI": "Allow", "specialServicesII": "Allow", "premiumServicesI": "Disallow", "premiumServicesII": "Disallow", "casual": "Disallow", "urlDialing": "Allow", "unknown": "Allow", "digitPatternPermission": [ {"digitPatternName": "Test Digit String", "allow": True} ], } } ] }
- Request JSON Object:
groupPermissions (object) – an object as defined in Outgoing Calling Plan Permissions.
departmentsPermissions (array) – a list of objects as defined in Outgoing Calling Plan Department Permissions.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the group
400 Bad Request – error during the update. Specific eror cases:
2: INVALID_PARAMETERS, “It is not allowed to modify the permission {}.”, with a value in place of {} can occur if GROUP_OCP_UPDATES_ONLY is configure
Outgoing Calling Plan Properties¶
Display group’s outgoing calling plan properties¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/services/outgoing_calling_plan/properties/
¶ Retrieve the properties of the Outgoing Calling Plan service of the group.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/services/outgoing_calling_plan/properties/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "mode": "Normal" }
- Response JSON Object:
mode (string) – the outgoing calling plan mode. A value from list: [“Normal”,”Enhanced”].
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the group
Configuration Information for OCP¶
The APIO behaviour is controlled by the following settings:
"OCP_ENABLE_ENHANCED" : true
"OCP_ENABLE_ENHANCED_NUMBER_VALUES": false
"GROUP_OCP_EXPOSES_ONLY": ["group", "local", "tollFree", "toll", "international", "operatorAssisted", "chargeableDirectoryAssisted", "specialServicesI", "specialServicesII", "premiumServicesI", "premiumServicesII", "casual", "urlDialing", "unknown"],
"GROUP_OCP_UPDATES_ONLY": ["group", "local", "tollFree", "toll", "international", "operatorAssisted", "chargeableDirectoryAssisted", "specialServicesI", "specialServicesII", "premiumServicesI", "premiumServicesII", "casual", "urlDialing", "unknown"],
"GROUP_OCP_WITH_DIGITS" : false
- Explanation for the parameters:
OCP_ENABLE_ENHANCED: Enable the Enhanced mode if assigned. With this settings only the extra value ‘AuthCode’ is supported. Default is true. Next settings is only relevant if this one is True
OCP_ENABLE_ENHANCED_NUMBER_VALUES: Enable extra values for the Enhanced mode is assigned. With this settings ‘AuthCode’, ‘FirstTransferNumber’, ‘SecondTransferNumber’ and ‘ThirdTransferNumber’ are supported. Default is true.
GROUP_OCP_EXPOSES_ONLY: If this parameter is set, only the categories listed will be returned in the answers. By default all are returned.
GROUP_OCP_UPDATES_ONLY: If this parameter is set, only the categories listed will be allowed in a modify, if not set and GROUP_OCP_EXPOSES_ONLY is ste then that settings will be used. By default no filtering.
GROUP_OCP_WITH_DIGITS: If this parameter is set, permit to list and edit the originating/redirecting permissions for the digit patterns of a default group and for each assigned departments. digitPatternPermission is enabled by this global setting
- Old settings names were respectively:
OCP_ENABLE_VALUES_CHECK
OCP_ADDITIONAL_VALUES
The extra values of the Enhanced mode are obviously only relevant for the Originating OCP as it would make no sense to request and authorization code to the calling party for redirected call.