Add an Emergency Number
Add an emergency number for a tenant.
Request URL
POST {base_url}/uc-cconfig/api/v1/emergency-numbers
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 emergency number. number Yes String The emergency number. callerIdPriority No String The Outbound Caller ID priority for emergency calls. Valid value:
trunk: Use the Emergency Outbound Caller ID configured for the trunk used to place the emergency call.- If an Emergency Outbound Caller ID is configured for the trunk, the system uses the configured number.
- If no Emergency Outbound Caller ID is configured for the trunk, the system uses the trunk's default Outbound Caller ID.
user: Use the Emergency Outbound Caller ID configured for the user who places the emergency call.- If an Emergency Outbound Caller ID is configured for the user, the system uses the configured number.
- If no Emergency Outbound Caller ID is configured for the user, the system uses the Emergency Outbound Caller ID configured for the trunk.
-
If no Emergency Outbound Caller ID is configured for either the user or the trunk, the system uses the trunk's default Outbound Caller ID.
userScope No String The users who can use the emergency number for emergency calling. Valid value:
all: All users can use the emergency number.specific: Only the specified users can use the emergency number.Note: If configured, you need to specify the authorized users using theusersparameter.
outboundRules Yes Array<Outbound_Rule> The outbound routing rules for emergency calls.
- Outbound_Rule
-
Parameter Required Type Description trunkId No String The unique identifier of the trunk used for the emergency call. Note: You can obtain the ID using the Query Trunks for Emergency Numbers interface.trunkEmergencyCallerId No String The custom outbound caller ID of the trunk used for emergency calls. Note: This parameter andtrunkEmergencyCallerIdInDidcannot both be specified.trunkEmergencyCallerIdInDid No String The ID of the DID number bound to the trunk and used as the Emergency Outbound Caller ID. Note:- You can query the ID using the POST /uc-cconfig/api/v1/tenant-dids/search-page interface.
- This parameter and
trunkEmergencyCallerIdcannot both be specified.
strip No Integer The number of leading digits stripped from the dialed number. prepend No String The prefix added to the dialed number. users No Object<Authorized_User> The list of users who can use the emergency number for emergency calling. Note: This parameter is required whenuserScopeis set tospecific.
- Authorized_User
-
Parameter Required Type Description ids No Array<String> The IDs of the users who can use the emergency number for emergency calling. Note: You can obtain IDs using the Query Users for Emergency Numbers interface.
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<Emergency_Number> | The details of the emergency number. |
- Emergency_Number
-
Parameter Type Description id String The unique identifier of the emergency number. name String The name of the emergency number. number String The emergency number. callerIdPriority String The Outbound Caller ID priority for emergency calls. trunk: Use the Emergency Outbound Caller ID configured for the trunk used to place the emergency call.- If an Emergency Outbound Caller ID is configured for the trunk, the system uses the configured number.
- If no Emergency Outbound Caller ID is configured for the trunk, the system uses the trunk's default Outbound Caller ID.
user: Use the Emergency Outbound Caller ID configured for the user who places the emergency call.- If an Emergency Outbound Caller ID is configured for the user, the system uses the configured number.
- If no Emergency Outbound Caller ID is configured for the user, the system uses the Emergency Outbound Caller ID configured for the trunk.
-
If no Emergency Outbound Caller ID is configured for either the user or the trunk, the system uses the trunk's default Outbound Caller ID.
userScope String The users who can use the emergency number for emergency calling. all: All users can use the emergency number.specific: Only the specified users can use the emergency number.
outboundRules Array<Outbound_Rule> The outbound routing rules for emergency calls. version Integer The version number of the emergency number, incremented with each update to prevent outdated data from overwriting new data.
- Outbound_Rule
-
Parameter Type Description id String The unique identifier of the outbound rule. trunkId String The unique identifier of the trunk used for emergency calls. trunkEmergencyCallerId String The outbound caller ID of the trunk used for emergency calls. trunkEmergencyCallerIdInDid String Whether the Emergency Outbound Caller ID is a DID number bound to the trunk. 0: The trunk is either configured with a custom number as the Emergency Outbound Caller ID or has no Emergency Outbound Caller ID configured.- Non-zero value: The ID of the DID number bound to the trunk and used as the Emergency Outbound Caller ID.
strip Integer The number of leading digits stripped from the dialed number. prepend String The prefix added to the dialed number. sortOrder Integer The sort order of the rule. users Object<Authorized_User> The list of users who can use the emergency number for emergency calling.
- Authorized_User
-
Parameter Type Description ids Array<String> The IDs of the users who can use the emergency number for emergency calling.Note: An empty array indicates that all users can use the emergency number.
Example
Request example
POST /uc-cconfig/api/v1/emergency-numbers HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJyZWdpb24ta2V5LTEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc4ODc4Njc2MCwiaWF0IjoxNzg4NzY1MTYwLCJqdGkiOiJkZDZmMGEzYS05NTg0LTRhOGQtYTZmYi0wOGQ2ZTE0ODdmZmUiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.1deRKiIDcYLXRg5CpWqCVFMN9a-YJT1sC3PcAHGCREP-Irc7vYOYkZT_OuV8KE2bQNRBb8P4krbM2bqXGMeen-X6cXFAVYRhcwHRgWJhZF3Xn8-uiHpESVhOAEPhEgoGS4rDmL-dzGomPQenp2C0D8l3Bwiw2cqRkHu8Y4ZxUtx7oOYvxyP84AhWPyLNX0Ge-C65ob18Lp3_m7_Z8j2EG0xnNbzk_C3IM-PozoDZJd_pccbfLI0bNWt_l5BUryRaAtz4MKHtHyPKjBH9EXxnLXwyZOC5PJ__bHTTh91MXsuiLUUHDbeTsTLQrYgPX2OGMnVwUPN8jho6YwL90rpW7g
Content-Type: application/json
x-tenant-code: jint
{
"name": "Fire Exit",
"number": "9119",
"callerIdPriority": "user",
"userScope": "specific",
"outboundRules": [
{
"trunkId": "337909436766003200",
"trunkEmergencyCallerId": "",
"strip": 0,
"prepend": "",
"users": {
"ids": [
"351260210717224960"
]
}
}
]
}
Response example
HTTP/1.1 200 OK { "requestId": "606d163c37ed62376a9514fe4bc66082", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "355287488894279680", "name": "Fire Exit", "number": "9119", "callerIdPriority": "user", "userScope": "specific", "outboundRules": [ { "id": "0", "trunkId": "337909436766003200", "trunkEmergencyCallerId": "", "strip": 0, "prepend": "", "sortOrder": 0, "users": { "ids": [ "351260210717224960" ] }, "trunkEmergencyCallerIdInDid": "0" } ], "version": 1 } }