Add an Outbound Route
Adds an outbound route.
Request URL
POST {base_url}/uc-cconfig/api/v1/outbound-routes
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description name Yes String The name of the outbound route. The value ranges from 1 to 63 characters. dialPatterns Yes Array<Dial_Pattern> The dial pattern list of the outbound route. At least one dial pattern is required. authorizedExtensions No Object<Authorized_Extensions> The authorized extensions of the outbound route. trunkSequence Yes Array<String> The list of IDs of the trunks, which are attempted in order, supporting 1 to 500 trunks. You can obtain the IDs using the Get Available Trunks for Outbound Routes interface. outboundCallerId No String The outbound caller ID, which supports wildcards, the {.Ext}placeholder, andanonymous.passwordMode No String The password mode of the outbound route.
Valid value:
DISABLED: Disable the password.SINGLE_PIN: Use a single PIN.PIN_LIST: Use a PIN list.
If not specified,
DISABLEDis used.singlePin No String The single PIN, which is a 3 to 15 digit number. This parameter is required when passwordMode is SINGLE_PIN.rrmemoryHunt No Boolean Whether to enable memory hunt.
Valid value:
true: The trunks are selected in a round-robin manner with memory.false: Memory hunt is disabled.
If not specified,
falseis used.pinListId No String The ID of the PIN list to reference. This parameter is required when passwordMode is PIN_LIST. You can obtain the ID using the Get Available PIN Lists for Outbound Routes interface.timeBasedRoutingEnabled No Boolean Whether to enable time-based routing.
Valid value:
true: Enable time-based routing.false: Disable time-based routing.
If not specified,
falseis used.timeBasedRoutingProfileId No String The ID of the business hours profile that time-based routing references. timeBasedRoutingConfig No Object<Time_Based_Routing_Config> The time-based routing configuration. outboundCallerIdInDid No String The ID of the DID used as the outbound caller ID. The value 0 indicates that it is not configured. This parameter is mutually exclusive with outboundCallerId.
- Dial_Pattern
-
Parameter Required Type Description pattern Yes String The dial pattern, which supports the wildcards X,Z,N,[],., and!.strip No String The number of leading digits to strip. The value is an empty string or a number from 0 to 16. prepend No String The prefix number to prepend. The maximum length is 31 characters.
- Authorized_Extensions
-
Parameter Required Type Description ids No Array<String> The list of IDs of the authorized extensions.
- Time_Based_Routing_Config
-
Parameter Required Type Description allowBusinessHours No Boolean Whether outbound calls are allowed during business hours.
Valid value:
true: Allowed.false: Not allowed.
If not specified, outbound calls are not allowed during business hours.
allowOutside No Boolean Whether outbound calls are allowed outside business hours.
Valid value:
true: Allowed.false: Not allowed.
allowHoliday No Boolean Whether outbound calls are allowed on holidays.
Valid value:
true: Allowed.false: Not allowed.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Outbound_Route> | The outbound route. |
- Outbound_Route
-
Parameter Type Description id String The ID of the outbound route. name String The name of the outbound route. listOrder Integer The position of the outbound route in the route list. dialPatterns Array<Dial_Pattern> The dial pattern list of the outbound route. authorizedExtensions Object<Authorized_Extensions> The authorized extensions of the outbound route. trunkSequence Array<String> The list of IDs of the trunks, which are attempted in order. outboundCallerId String The outbound caller ID of the outbound route. passwordMode String The password mode of the outbound route:
DISABLEDSINGLE_PINPIN_LIST
rrmemoryHunt Boolean Whether memory hunt is enabled.
true: The trunks are selected in a round-robin manner with memory.false: Memory hunt is disabled.
createdAt String The time when the outbound route was created, in Unix timestamp format (milliseconds). updatedAt String The time when the outbound route was last updated, in Unix timestamp format (milliseconds). singlePin String The single PIN. pinListId String The ID of the PIN list. This parameter is valid only when passwordMode is PIN_LIST.timeBasedRoutingEnabled Boolean Whether time-based routing is enabled.
true: Time-based routing is enabled.false: Time-based routing is disabled.
timeBasedRoutingProfileId String The ID of the business hours profile that time-based routing references. timeBasedRoutingConfig Object<Time_Based_Routing_Config> The time-based routing configuration. outboundCallerIdInDid String The ID of the DID used as the outbound caller ID. The value 0 indicates that it is not configured.
- Dial_Pattern
-
Parameter Type Description pattern String The dial pattern, which supports the wildcards X,Z,N,[],., and!.strip String The number of leading digits to strip. The value is an empty string or a number from 0 to 16. prepend String The prefix number to prepend. The maximum length is 31 characters.
- Authorized_Extensions
-
Parameter Type Description ids Array<String> The list of IDs of the authorized extensions.
- Time_Based_Routing_Config
-
Parameter Type Description allowBusinessHours Boolean Whether outbound calls are allowed during business hours:
true: Allowed.false: Not allowed.
allowOutside Boolean Whether outbound calls are allowed outside business hours:
true: Allowed.false: Not allowed.
allowHoliday Boolean Whether outbound calls are allowed on holidays:
true: Allowed.false: Not allowed.
Example
Request example
POST /uc-cconfig/api/v1/outbound-routes HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzM3MDQ0OCwiaWF0IjoxNzkzMzQ4ODQ4LCJqdGkiOiI3YTJiZTNiMC0yN2VmLTQ3YzItOGUwMi1mNTBmYmZjMTc5YTMiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.jeynFNhyqaacwFl9HGXpvqNiAXidgYCilS88KrgJl5CpX3DqngfMiN6QdpBKigLpaA5ck0U1FAjBoFAUiSko4E32G8bDLjq4bcezA0h-d6kRBy6vF_cYVhNy2uYpHLFCHFS0dV4bxEc7bPZY2WVhcdQ6cX7fE-Ul9ULl8W1XUlaZQBGyQr1TsS_qBG8k43yn-ctK2Ms4NgF2jmOq_z-jDTEhAZBiKmqe2ZiVsNeZgzeVFoaEi6m-2TzNNJgomBb1UtpuDPUUfKzbv5Hc2WliZCFGxN4aYLl_tUZyNy2ot1NWdufAwbylbZ1CcJMzUSA69TsvD3bid3XkaTwJrX_TIQ
x-tenant-code: jint
Content-Type: application/json
{
"name": "ob-doc-test-1",
"dialPatterns": [
{
"pattern": "X.",
"strip": "",
"prepend": ""
}
],
"trunkSequence": [
"367177966216302592"
],
"authorizedExtensions": {
"ids": [
"338136731335409664"
]
},
"outboundCallerId": "{{.Ext}}"
}
Response example
HTTP/1.1 200 OK { "requestId": "3d0250cfe840d74ae5286717310acd35", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "374474380541255680", "name": "ob-doc-test-1", "listOrder": 3, "dialPatterns": [ { "pattern": "X.", "strip": "", "prepend": "" } ], "authorizedExtensions": { "ids": [ "338136731335409664" ] }, "trunkSequence": [ "367177966216302592" ], "outboundCallerId": "{{.Ext}}", "passwordMode": "DISABLED", "rrmemoryHunt": false, "createdAt": "0", "updatedAt": "0", "singlePin": "", "pinListId": "0", "timeBasedRoutingEnabled": false, "timeBasedRoutingProfileId": "", "outboundCallerIdInDid": "0" } }