Test Call Routing
Validates that an incoming call can be routed.
Dial plans route calls to on-premises destinations by use of trunks or route groups. They are configured globally for an enterprise and apply to all users, regardless of location. A dial plan also specifies the routing choice (trunk or route group) for calls that match any of its dial patterns. Specific dial patterns can be defined as part of your dial plan.
Test call routing requires a full administrator auth token with a scope of spark-admin:telephony_config_write
.
Query Parameters
Organization in which we are validating a call routing.
Body Parameters
This element is used to identify the originating party. It can be a person ID or a trunk ID.
This element is used to identify if the originatorId
is of type PEOPLE
or TRUNK
.
The originator type object is a person.
Connection between Webex Calling and the premises.
Only used when originatorType
is TRUNK
. The originatorNumber
can be a phone number or URI.
This element specifies the called party. It can be any dialable string, for example, an ESN number, E.164 number, hosted user DN, extension, extension with location code, URL, or FAC code.
This element is used to retrieve if any translation pattern, call intercept, permission by type is present for the called party.
Response Properties
Only returned when originatorNumber
is specified in the request.
Type of call source.
Route list is a type of call source.
Dial pattern is a type of call source.
The call source extension is unknown.
The call source phone number is unknown.
Name of a route list. When originatorType
is trunk
, originatorId
is a valid trunk and the trunk belongs to a route group which is assigned to a route list with the name routeListA
and also originatorNumber
is a number assigned to routeListA
, then routeListA
is returned here. This element is returned when callSourceType
is ROUTE_LIST
.
Unique identifier for the route list.
Name of a dial plan. When originatorType
is trunk
, originatorId
is a valid trunk with the name trunkA
, trunkA
belongs to a route group which is assigned to a route list with the name routeListA
, trunkA
is also assigned to dialPlanA
as routing choice, dialPlanA
has dialPattern
xxxx assigned. If the originatorNumber
matches the dialPattern
xxxx
, dialPlanA
is returned. This element is returned when callSourceType
is DIAL_PATTERN
.
Pattern given to a dial plan. When originatorType
is trunk
, originatorId
is a valid trunk with the name trunkA
, trunkA
belongs to a route group which is assigned to a route list with the name routeListA
, trunkA
is also assigned to dialPlanA
as routing choice, dialPlanA
has dialPattern
xxxx
assigned. If the originatorNumber
matches the dialPattern
xxxx
, dialPattern
xxxx
is returned. This element is returned when callSourceType
is DIAL_PATTERN
.
Unique identifier for dial plan.
Destination type for the call.
A destination is a person or workspace with details in the hostedAgent
field.
Destination is a calling feature like auto-attendant or hunt group with details in the hostedFeature
field.
Destination routes into a separate PBX with details in the pbxUser
field.
Destination routes into a PSTN phone number with details in the pstnNumber
field.
Destination routes into a virtual extension with details in the virtualExtension
field.
Destination routes into a virtual extension range with details in the virtualExtensionRange
field.
Destination routes into a route list with details in the routeList
field.
Destination routes into a feature access code (FAC) with details in the featureAccessCode
field.
Destination routes into an emergency service like Red Sky, with details in the emergency
field.
The route is in a repair state with routing choice details in the repair
field.
Target extension is unknown with routing choice details in the unknownExtension
field.
The target phone number is unknown with routing choice details in the unknownNumber
field.
FAC code if destinationType
is FAC. The routing address will be returned for all other destination types.
Outside access code.
true
if the call would be rejected.
Calling line ID (CLID) configured for the calling user.
Routing profile that is used to route network calls.
Returned when destinationType
is HOSTED_AGENT
.
Unique identifier for the person or workspace agent identified as call destination.
Type of agent for call destination.
This object is a person.
A workspace that is not assigned to a specific person such as for a shared device in a common area.
First name for the hosted agent specified by id
.
Last name for the hosted agent specified by id
.
Name of hosted agent's location.
Unique identifier for hosted agent's location.
Phone number for the hosted agent.
Extension for the hosted agent.
Returned when destinationType
is HOSTED_FEATURE
.
Type of the service identified as call destination.
The destination is an auto attendant.
The destination is the Office (Broadworks) Anywhere feature.
The destination is the Call Queue feature.
The destination is the Contact Center Link feature.
The destination is the Group Paging feature.
The destination is the Hunt Group feature.
The destination is the Voice Messaging feature.
The destination is the Voice Mail Group feature.
Name of the service identified as call destination.
Unique identifier of the service identified as call destination.
Name of the location with which the service is associated.
Unique identifier for the location of the service.
Phone number of the service.
Extension of the service.
Returned when destinationType
is PBX_USER
.
Dial plan name that the called string matches.
Unique identifier for the dial plan.
Dial pattern that the called string matches.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned when destinationType
is PSTN_NUMBER
.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned when destinationType
is VIRTUAL_EXTENSION
.
Unique identifier for the virtual extension.
First name of the virtual extension.
Last name of the virtual extension.
Full name of the virtual extension.
Extension that the virtual extension is associated with.
Phone number that the virtual extension is associated with.
Location name if the virtual extension is at the location level, empty if it is at the customer level.
Location ID if the virtual extension is at the location level, empty if it is at the customer level.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned when destinationType
is VIRTUAL_EXTENSION_RANGE
.
Unique identifier for virtual extension range.
Name of the virtual extension range.
Prefix that the virtual extension range is associated with (Note: Standard mode must have leading '+' in prefix; BCD/Enhanced mode can have any valid prefix).
Pattern associated with the virtual extension range.
Location name if the virtual extension range is at the location level, empty if it is at the customer level.
Location ID if the virtual extension range is at the location level, empty if it is at customer level.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned when destinationType
is ROUTE_LIST
.
Unique identifier of the route list.
Name of the route list.
Name of the route group the route list is associated with.
Unique identifier of the route group the route list is associated with.
Location name of the route list.
Location ID of the route list.
Returned when destinationType
is FAC
.
Feature access code to which the call is directed.
Name of the feature associated with code
.
Returned when destinationType
is EMERGENCY
.
If RedSky
is in use.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group that is associated with trunk specified by trunkId
.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Unique identifier of the location of the trunk; required if trunkName
is returned.
Returned when destinationType
is REPAIR
.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned when destinationType
is UNKNOWN_EXTENSION
.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned when destinationType
is UNKNOWN_NUMBER
.
Name of the trunk.
Unique identifier of the trunk.
Name of the route group.
Unique identifier of the route group.
Location of the trunk; required if trunkName
is returned.
Location ID of the trunk; required if trunkName
is returned.
Returned if any origin is configured with intercept details, outgoing permissions by type, or translation pattern.
Returns the details of the Translation Pattern if applied.
The level from which the configuration is applied.
The applied services of location level.
The applied services of the organization level.
Name given to a translation pattern.
Matching pattern given to a translation pattern.
Replacement pattern given to a translation pattern.
The original called number.
The modified number after matching against matchingPattern
and replacing with corresponding replacementPattern
.
Returns the details of call intercept if applied.
The level from which the configuration is applied.
The applied services at the location level.
The applied services at the people level.
The applied services at the place level.
The applied services at the virtual line level.
The choices that indicate call intercept permissions.
Call intercept is disabled.
Call intercept is transferred to a number.
The number to which the outgoing permission by type is to be transferred.
Returns the details of permissions by type configuration if applied under OCP.
The level from which the configuration is applied.
The applied services at the location level.
The applied services at the people level.
The applied services at the place level.
The applied services at the virtual line level.
Designates the action to be taken for each call type and if transferring the call type is allowed.
Controls calls within your own company.
Controls calls to a telephone number that is billed for all arriving calls instead of incurring charges to the originating caller, usually free of charge from a landline.
Controls calls to locations outside of the long-distance areas that require an international calling code before the number is dialed.
Controls calls requiring Operator Assistance.
Controls calls to Directory Assistant companies that require a charge to connect the call.
Controls calls to carrier-specific number assignments to special services or destinations.
Controls calls to carrier-specific number assignments to special services or destinations.
Controls calls used to provide information or entertainment for a fee charged directly to the caller.
Controls calls used to provide information or entertainment for a fee charged directly to the caller.
Controls calls that are within your country of origin, both within and outside of your local area code.
Action to be performed on the input number that matches with the OCP.
Allow the designated call type.
Block the designated call type.
Allow only via Authorization Code.
Transfer to Auto Transfer Number 1. The answering person can then approve the call and send it through or reject the call.
Transfer to Auto Transfer Number 2. The answering person can then approve the call and send it through or reject the call.
Transfer to Auto Transfer Number 3. The answering person can then approve the call and send it through or reject the call.
The number to which the outgoing permission by type is to be transferred.
The reason for the result reported for non-standard OCP service.
Calling plan gives the Fraud Containment reason.
The Cisco calling plan reason.
The reason if the transfer number 1 is not configured.
The reason if the transfer number 2 is not configured.
The reason if the transfer number 3 is not configured.
The reason for Webex mobile international transfer forward.
A transfer number is present in case it gets transferred to some other number.
Response Codes
The list below describes the common success and error responses you should expect from the API.
Code | Status | Description |
---|---|---|
200 | OK | Successful request with body content. |
201 | Created | The request has succeeded and has led to the creation of a resource. |
202 | Accepted | The request has been accepted for processing. |
204 | No Content | Successful request without body content. |
400 | Bad Request | The request was invalid or cannot be otherwise served. An accompanying error message will explain further. |
401 | Unauthorized | Authentication credentials were missing or incorrect. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. |
404 | Not Found | The URI requested is invalid or the resource requested, such as a user, does not exist. Also returned when the requested format is not supported by the requested method. |
405 | Method Not Allowed | The request was made to a resource using an HTTP request method that is not supported. |
409 | Conflict | The request could not be processed because it conflicts with some established rule of the system. For example, a person may not be added to a room more than once. |
410 | Gone | The requested resource is no longer available. |
415 | Unsupported Media Type | The request was made to a resource without specifying a media type or used a media type that is not supported. |
423 | Locked | The requested resource is temporarily unavailable. A Retry-After header may be present that specifies how many seconds you need to wait before attempting the request again. |
428 | Precondition Required | File(s) cannot be scanned for malware and need to be force downloaded. |
429 | Too Many Requests | Too many requests have been sent in a given amount of time and the request has been rate limited. A Retry-After header should be present that specifies how many seconds you need to wait before a successful request can be made. |
500 | Internal Server Error | Something went wrong on the server. If the issue persists, feel free to contact the Webex Developer Support team. |
502 | Bad Gateway | The server received an invalid response from an upstream server while processing the request. Try again later. |
503 | Service Unavailable | Server is overloaded with requests. Try again later. |
504 | Gateway Timeout | An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it. |
Header
Query Parameters
- orgIdstringOrganization in which we are validating a call routing.
Body
- originatorIdstringRequiredThis element is used to identify the originating party. It can be a person ID or a trunk ID.
- originatorTypeOriginatorTypeRequiredThis element is used to identify if the `originatorId` is of type `PEOPLE` or `TRUNK`.
- originatorNumberstringOnly used when `originatorType` is `TRUNK`. The `originatorNumber` can be a phone number or URI.
- destinationstringRequiredThis element specifies the called party. It can be any dialable string, for example, an ESN number, E.164 number, hosted user DN, extension, extension with location code, URL, or FAC code.
- includeAppliedServicesbooleanThis element is used to retrieve if any translation pattern, call intercept, permission by type is present for the called party.
{ "originatorId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS8xMWEzZjk5MC1hNjg5LTQ3N2QtYmU2Yi03MTIwMDI1ZDhhYmI", "originatorType": "PEOPLE", "destination": "0007", "includeAppliedServices": true }
{ "callSourceInfo": { "callSourceType": "DIAL_PATTERN", "routeListName": "routeList1", "routeListId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0xJU1QvZDA2YWQ5M2QtY2NkOC00MzI1LTg0YzUtMDA2NThhYTdhMDBj", "dialPlanName": "dialPlan1", "dialPattern": "*888", "dialPlanId": "Y2lzY29zcGFyazovL3VzL0RJQUxfUExBTi8wNTlhMjczZS1iYmIwLTExZWMtODQyMi0wMjQyYWMxMjAwMDI" }, "destinationType": "HOSTED_AGENT", "routingAddress": "007", "outsideAccessCode": "1234", "isRejected": false, "callingLineID": "+12036680442", "routingProfile": "AttRtPf", "hostedAgent": { "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMjU4YjhmZi1lODIxLTQ3MDktYTI2My1mMmI4OWZjN2FlYmQ", "type": "PEOPLE", "firstName": "firstName", "lastName": "lastName", "locationName": "locationName", "locationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA", "phoneNumber": "9874531287", "extension": "111" }, "hostedFeature": { "type": "AUTO_ATTENDANT", "name": "name1", "id": "Y2lzY29zcGFyazovL3VzL0FVVE9fQVRURU5EQU5UL2QyRXdhV2R5TVRCamIwQTJORGswTVRJNU55NXBiblF4TUM1aVkyeGtMbmRsWW1WNExtTnZiUT09", "locationName": "locationName1", "locationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA", "phoneNumber": "9874531287", "extension": "111" }, "pbxUser": { "dialPlanName": "dialPlan1", "dialPlanId": "Y2lzY29zcGFyazovL3VzL0RJQUxfUExBTi8wNTlhMjczZS1iYmIwLTExZWMtODQyMi0wMjQyYWMxMjAwMDI", "dialPattern": "442xxx", "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "pstnNumber": { "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "virtualExtension": { "id": "Y2lzY29zcGFyazovL3VzL1ZJUlRVQUxfRVhURU5TSU9OL2U4NTU0MGJjLWFiNDMtNGZjOS05ZThlLTkxZjRkN2E3ZjU5Ng", "firstName": "firstName1", "lastName": "lastName1", "displayName": "displayName1", "extension": "0007", "phoneNumber": "8701278963", "locationName": "locationName1", "locationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA", "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "virtualExtensionRange": { "id": "OTI0NzM1OTQtZGU1Mi00ZjViLTk0YjItN2Y5MzRmY2Y2NDk3", "name": "firstName1", "prefix": "+1214555", "pattern": "2XXX", "locationName": "locationName1", "locationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA", "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "routeList": { "id": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0xJU1QvZDA2YWQ5M2QtY2NkOC00MzI1LTg0YzUtMDA2NThhYTdhMDBj", "name": "routeListName1", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "locationName": "locationName1", "locationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "featureAccessCode": { "code": "*70", "name": "Cancel Call Waiting" }, "emergency": { "isRedSky": true, "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "repair": { "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "unknownExtension": { "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "unknownNumber": { "trunkName": "trunkName1", "trunkId": "Y2lzY29zcGFyazovL3VzL1RSVU5LLzA4Yjc2MmZlLWJmYWItNGFmYi04ODQ1LTNhNzJjNGQ0NjZiOQ", "routeGroupName": "routeGroupName1", "routeGroupId": "Y2lzY29zcGFyazovL3VzL1JPVVRFX0dST1VQL2YyODkyMTc0LWYxM2YtNDhjYy1iMmJhLWQ4ZmM4Yzg4MzJhYg", "trunkLocationName": "trunkLocationName1", "trunkLocationId": "Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzVlZmI5MTFhLThmNmUtNGU2Ny1iOTZkLWNkM2VmNmRhNDE2OA" }, "appliedServices": [ { "translationPattern": { "configurationLevel": "ORGANIZATION", "name": "TP1", "matchingPattern": "+91XXX", "replacementPattern": "+91234", "matchedNumber": "+91236", "translatedNumber": "+91234" }, "interceptDetails": { "configurationLevel": "USER", "permission": "TRANSFER", "transferNumber": "+14157279300" }, "outgoingCallingPlanPermissionsByType": { "configurationLevel": "PEOPLE", "callType": "INTERNAL_CALL", "permission": "ALLOW", "transferNumber": "+14157279300", "reason": "FRAUD_CONTAINMENT", "number": "+14157279300" }, "outgoingCallingPlanPermissionsByDigitPattern": { "configurationLevel": "USER", "name": "DPattern", "permission": "ALLOW", "transferNumber": "+14157279300", "pattern": "+91!", "reason": "FRAUD_CONTAINMENT", "number": "+14157279300" } } ] }