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
.
Indicates that this 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.
Response Properties
Only returned when originatorNumber
is specified in the request.
Indicates the type of call source.
Indicates that the call source is a route list.
Indicates that the call source is a dial pattern.
Indicates that the call source extension is unknown.
Indicates that the call source phone number is unknown.
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.
When originatorType
is trunk
, originatorId
is a valid trunk with name trunkA
, trunkA
belongs to a route group which is assigned to a route list with 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
.
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.
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.
Indicates that this object is a person.
Indicates 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.
Indicates that this destination is an auto attendant.
Indicates that this destination is the Office (Broadworks) Anywhere feature.
Indicates that this destination is the Call Queue feature.
Indicates that this destination is the Contact Center Link feature.
Indicates that this destination is the Group Paging feature.
Indicates that this destination is the Hunt Group feature.
Indicates that this destination is the Voice Messaging feature.
Indicates that this 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 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
.
Indicates 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.
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.
{ "originatorId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS8xMWEzZjk5MC1hNjg5LTQ3N2QtYmU2Yi03MTIwMDI1ZDhhYmI", "originatorType": "PEOPLE", "destination": "0007" }
{ "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" } }