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:
Status Codes:

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:

Example response:

Response:

Similar to GET instance method response.

Status Codes:
  • 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:
Status Codes:

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:

Example response:

Response:

Similar to GET instance method response.

Status Codes:
  • 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:

Outgoing Calling Plan Authorization Codes

List all authorization codes in the Group

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/group/codes/

List all authorization codes in the Group.

Authorization rights: minimum Group Admin.

Example request:

GET /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/group/codes/ HTTP/1.1
Host: example.com

{
   "includeDpts": true
}
Request JSON Object:
  • includeDpts (boolean) – (Optional) if True also the authorization codes for all Departments will be listed into the response “departmentCodes” objects list.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "authCodes": [
              {
                  "code": "10",
                  "description": "test_code_10"
              },
              {
                  "code": "11",
                  "description": "test_code_11"
              }
   ]
   "departmentCodes": [
              {
                  "department": {
                      "tenantId": "ApioSpTest",
                      "groupId": "ApioGrpTest",
                      "departmentName": "test_department_parent_1",
                      "fullPathName": "test_department_parent_1"
                  },
                  "authCodes": [
                      {
                          "code": "12",
                          "description": "test_code_12"
                      },
                      {
                          "code": "13",
                          "description": "test_code_13"
                      }
                  ]
              },
              {
                  "department": {
                      "tenantId": "ApioSpTest",
                      "groupId": "ApioGrpTest",
                      "departmentName": "test_department_parent_2",
                      "fullPathName": "test_department_parent_2"
                  },
                  "authCodes": []
              }
   ]
}
Response JSON Object:
Status Codes:

Get an authorization code in the Group

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/group/codes/(string: sub_instance_name)/

Get an authorization code in the Group.

Authorization rights: minimum Group Admin.

Example request:

GET /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/group/codes/foocode/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
      "code": "10",
      "description": "test_code_10"
}
Response JSON Object:
Status Codes:

Create a list of authorization codes in the Group

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/group/codes/

Create a list of authorization codes in the Group.

Authorization rights: minimum Group Admin.

Example request:

POST /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/group/codes/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
  "authCodes": [
              {
                  "code": "12",
                  "description": "test_code_12"
              },
              {
                  "code": "13",
                  "description": "test_code_13"
              }
          ]
}
Request JSON Object:

Example response:

HTTP/1.1 201 CREATED
Content-Type: "application/json"

{}
Status Codes:

Create an authorization code in the Group

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/group/codes/

Create an authorization code in the Group.

Authorization rights: minimum Group Admin.

Example request:

POST /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/group/codes/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
  "code": "14",
  "description": "test_code_14"
}
Request JSON Object:

Example response:

HTTP/1.1 201 CREATED
Content-Type: "application/json"

{}
Status Codes:

Remove a list of authorization codes from the Group

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/group/codes/

Remove a list of authorization codes from the Group.

Authorization rights: minimum Group Admin.

Example request:

DELETE /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/group/codes/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "authCodes": [
              {
                  "code": "10"
              },
              {
                  "code": "11"
              }
            ]
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:
  • 200 OK – no error (note that trying to delete an authorization code that is not present will not generate an error)

  • 400 Bad Request – bad request due to invalid parameters

Remove an authorization code from the Group

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/group/codes/(string: sub_instance_name)/

Remove an authorization code from the Group.

Authorization rights: minimum Group Admin.

Example request:

DELETE /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/group/codes/foocode/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:
  • 200 OK – no error (note that trying to delete an authorization code that is not present will not generate an error)

List all authorization codes in a Department

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/departments/(string: instance_name)/codes/

List all authorization codes in a Department.

Authorization rights: minimum Group Admin.

Example request:

GET /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/departments/foodepartment/codes/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "authCodes": [
              {
                  "code": "10",
                  "description": "test_code_10"
              },
              {
                  "code": "11",
                  "description": "test_code_11"
              }
            ]
}
Response JSON Object:
Status Codes:

Get an authorization code in a Department

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/departments/(string: instance_name)/codes/(string: sub_instance_name)/

Get an authorization code in a Department.

Authorization rights: minimum Group Admin.

Example request:

GET /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/departments/foodepartment/codes/foocode/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
      "code": "10",
      "description": "test_code_10"
}
Response JSON Object:
Status Codes:

Create a list of authorization codes in a Department

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/departments/(string: instance_name)/codes/

Create a list of authorization codes in a Department.

Authorization rights: minimum Group Admin.

Example request:

POST /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/departments/foodepartment/codes/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
  "authCodes": [
              {
                  "code": "12",
                  "description": "test_code_12"
              },
              {
                  "code": "13",
                  "description": "test_code_13"
              }
          ]
}
Request JSON Object:

Example response:

HTTP/1.1 201 CREATED
Content-Type: "application/json"

{}
Status Codes:

Create an authorization code in a Department

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/departments/(string: instance_name)/codes/

Create an authorization code in a Department.

Authorization rights: minimum Group Admin.

Example request:

POST /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/departments/foodepartment/codes/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
  "code": "14",
  "description": "test_code_14"
}
Request JSON Object:

Example response:

HTTP/1.1 201 CREATED
Content-Type: "application/json"

{}
Status Codes:

Remove a list of authorization codes from a Department

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/departments/(string: instance_name)/codes/

Remove a list of authorization codes from a Department.

Authorization rights: minimum Group Admin.

Example request:

DELETE /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/departments/foodepartment/codes/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "authCodes": [
              {
                  "code": "10"
              },
              {
                  "code": "11"
              }
            ]
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:
  • 200 OK – no error (note that trying to delete an authorization code that is not present will not generate an error)

  • 400 Bad Request – bad request due to invalid parameters

Remove an authorization code from a Department

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/outgoing_calling_plan/departments/(string: instance_name)/codes/(string: sub_instance_name)/

Remove an authorization code from a Department.

Authorization rights: minimum Group Admin.

Example request:

DELETE /api/v1/tenants/footenant/groups/foogroup/services/outgoing_calling_plan/departments/foodepartment/codes/foocode/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:
  • 200 OK – no error (note that trying to delete an authorization code that is not present will not generate an error)

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.