Upload Operator Connect Numbers to Customer
The Upload Operator Connect Numbers to Customer request uploads a list of SBC prefixes to a target customer tenant. All numbers that are uploaded to Live Platform are also downloaded to the OC Dial plan on the SBC device. Uploaded numbers are routed through configured SIP Connections that are attached to Calling Profile templates:
| ■ | When uploading numbers to services with Tenant-based SIP Connections, you can choose the relevant Calling Profile. |
Prior to uploading numbers:
| ■ | Sync Calling Profiles (see Get Calling Profiles) and SBC Trunks Mapping (see Get Calling Profiles Mapping to SBC Devices) from Microsoft. |
| ■ | Validate the numbers that you wish to upload (see Validate Single Operator Connect Number) |
| ● | The customer must configure the company size and the Countries in their Calling plan prior to uploading |
| ● | OC Dial plan should be pre-configured on the SBC device that is designated to manage Operator Connect numbers. |
URI
{{baseUrl}}/api/v2/oc/numbers/action/upload?msTenantId={{msTenantId}}
You can also run this request with 'v3'.
HTTP Method
POST
Request Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
msTenantId |
string |
Microsoft TenantId (Azure Tenant ID of the customer). |
Request Body
|
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
callingProfile |
string |
The Id string for the Microsoft Operator Connect Calling Profile that is attached to the tenant service (see Get Calling Profiles). Each Calling Profile is mapped to an SBC trunk used to manage call functionality for tenant service. |
|||||||||||||||||||||||||||||||||||||||
|
Ticket ID |
Related Service Request ticket (see Managing Service Requests). |
Ticket ID |
|||||||||||||||||||||||||||||||||||||||
|
Usage |
string |
One of the following values (mapping to Teams admin center values is shown in parenthesis):
Verify that the 'ThirdPartyAppAssignment' value is supported on your Microsoft tenant. |
|||||||||||||||||||||||||||||||||||||||
|
AdditionalUsage |
string |
Support for an Additional usage type. For example if you configure 'CallingUserAssignment' as the Usage, then you can choose 'Conference Assignment' or 'FirstPartyAppAssignment' for the Additional Usage. Configuration of Additional usage requires workflow Version 3. |
|||||||||||||||||||||||||||||||||||||||
|
Capabilities |
list |
One of the following values with matching supported usages:
|
|||||||||||||||||||||||||||||||||||||||
|
Address |
Address for Emergency location (mandatory in the USA) |
Address |
|||||||||||||||||||||||||||||||||||||||
|
Location |
City of Emergency location. |
Location |
|||||||||||||||||||||||||||||||||||||||
|
Country |
string |
The Country dialing code of the number. See Country Dialing Codes for a full list of Country Dialing codes. A country dialing code is Mandatory when uploading a Toll-free number in a North America Numbering Plan. |
|||||||||||||||||||||||||||||||||||||||
|
Type of Service |
String |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||
|
phoneNumbers |
list array |
List of phone numbers that are uploaded to the customer. |
|||||||||||||||||||||||||||||||||||||||
| Phone numbers are validated according to the configuration of the customer Operator Settings on their Teams admin center. For example, if United Kingdom, France and Italy are configured then only phone numbers with Country codes for these countries can be uploaded, unless the "Geographic" option is configured above for the Type of Service. Phone number validation rules are in accordance with E.164 format:
Local telephone number or subscriber number. It has the following structure: [+][country code][area code][subscriber number]. Example of a number with E.164 format in the United States Telephone number: 415 123 1234 E.164 format number: +14151231234
Valid country code, per civic address and/or contact info of the given lead. See Country Dialing Codes. |
|||||||||||||||||||||||||||||||||||||||||
|
workflowVersion |
integer-3 |
Workflow version (coded value is 3). |
|||||||||||||||||||||||||||||||||||||||
|
scriptParameters refers to: CustomVar.Variable<VariableSequenceNumber> |
dictionary where <VariableSequenceNumber> is the sequence in database that the variable is defined in the 'Customer variables' column for the script properties (see Customer Variables). For example, when the following IP-PBX variables are defined in the database in the order: IPPBX-ProxyAddress, IPPBX-ProxyAddress-SIPPort, SIP-HostName then Custom variables should be defined as follows:
|
Custom variables can be defined to update specific parameters on the SBC device. These variables must be predefined in the UMP-365 database (see Customer Variables). Also verify that the custom variables notation has been added to the script (see parameter 'sbcOnboardingScript' above) that you are applying to the request. There are three fields displayed in the schema additionalProp1-3, however there is no limitation for the number of variables that can be added. |
|||||||||||||||||||||||||||||||||||||||
|
additionalProp1 |
string |
Custom Script variable argument. For example IP-Network. |
|||||||||||||||||||||||||||||||||||||||
Example Request Body
{
"callingProfile": "5f3fbb3b-df9b-483d-b294-c7eb01e22aac",
"usage": "CallingUserAssignment",
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+61395556880"],
"workflowVersion": "3",
"country": "AU"
}
You can also verify the new numbers using the Retrieve Customer Number request (see Get Operator Connect Customer Numbers V2).
Example Request Body-Range
{
"callingProfile": "5f3fbb3b-df9b-483d-b294-c7eb01e22aac",
"usage": "CallingUserAssignment",
"additionalUsages": ["FirstPartyAppAssignment"],
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+97239764533","+97239764535"],
"phoneNumberRanges": [
{
"start": "+97239764660",
"end": "+97239764670"
}
],
"workflowVersion": 3
}
Example Response
The initial response displays the Task Id.
|
Parameter |
Type |
Description |
|---|---|---|
|
Task Id |
string |
The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the wup string in the prefix is unique for this endpoint. |
{
"taskId": "wup_c14a0a55-fcc5-4598-b405-c978e7da1af4"
}
The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.
{
"id": "wup_d4b23bb0-3b8a-4966-a368-fef9667d019f",
"status": "CompletedSuccess",
"details": [
"NumbersUploaded"
],
"executionMessages": [
{
"level": "Information",
"message": "Input is valid."
},
{
"level": "Information",
"message": "All uploaded numbers are not present in Microsoft context."
},
{
"level": "Information",
"message": "Site GRXRATNEUZMNZ found."
},
{
"level": "Information",
"message": "Number(s) accepted by Microsoft."
},
{
"level": "Information",
"message": "UploadToAccount job status: Success."
},
{
"level": "Information",
"message": "Moving on"
},
{
"level": "Information",
"message": "Telephone numbers programmed in SBC. 8"
},
{
"level": "Information",
"message": "Workflow completed."
}
],
"outputData": {
"CreateTime": "2023-09-28T12:14:21.5111156Z",
"CompleteTime": "2023-09-28T12:14:47.2635149Z",
"OcUploadNumberResult": "NumbersUploaded",
"WorkflowVersion": 3,
"SbcIdList": [
8
],
"MsJobWhenUpdated": "2023-09-28T12:14:46.0908199+00:00",
"MsJobId": "899c58a5-92df-4e93-a142-a35e72b7b743",
"MsJobStatus": "Success"
}
}
HTTP Responses
| ■ | 200 OK |
|
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id |
string |
Task Id |
|||||||||||||||||||||||||||||||||||||||||||||
|
status |
string |
Task status is one of the following
The cache mechanism used to Upload numbers is according to Distributed Cache. |
|||||||||||||||||||||||||||||||||||||||||||||
|
details |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
executionMessages |
list array |
This list array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
level |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
message |
string |
The following 'Information' messages may appear:
The following 'Error' messages may appear:
The following are example error messages:
Copy
Copy
The following error is raised because the Copy
Copy
When attempting to upload a a Toll-free number with the usage "CallingUserAssignment". Copy
The following error message is displayed as Toll-free numbers must be configured with the usage 'FirstPartyAppAssignment'. Copy
The following message is displayed if there are no SBC devices assigned to the Calling Profile and therefore you cannot make or receive calls to this number. Copy
|
|||||||||||||||||||||||||||||||||||||||||||||
|
outputData |
List array |
This array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
CreateTime |
string($date-time) |
Timestamp at the commencement of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||
|
CompleteTime |
string($date-time) |
Timestamp at the completion of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||
|
OcUploadNumberResult |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
WorkflowVersion |
integer |
Version of the Workflow API. |
|||||||||||||||||||||||||||||||||||||||||||||
|
SbcIdList |
integer |
Id of the SBC device in the Live Platform database. |
|||||||||||||||||||||||||||||||||||||||||||||
|
MsJobWhenUpdated |
string($date-time) |
Timestamp when the Microsoft tenant platform was updated with the new number. |
|||||||||||||||||||||||||||||||||||||||||||||
|
MsJobId |
string |
Id of the job to update the Microsoft platform. |
| ■ | 400 Bad Request: When the Request Body includes the following: |
{
"callingProfile": "cd208b87-d81f-44dc-ac8c-802d5ee0b0c9",
"usage": "CallingUserAssignment",
"additionalUsages": ["FirstPartyAppAssignment"],
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+442064939000 [4939000-4939008]"],
"workflowVersion": 3,
"country": "GB"
}
The following error is raised because a phone number range was configured for the "phoneNumbers" parameter instead of for the "phoneNumberRanges" parameter.
{
"errors": {
"PhoneNumbers[0]": [
"The length of 'Phone Numbers' must be 30 characters or fewer. You entered 31 characters."
]
},
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-76cba65d497e16f6e7fdd0b042831dd9-0ada8ed0e650abc7-00"
}
| ■ | 400 Bad Request: When the Request Body includes the following: |
{
"callingProfile": "5f3fbb3b-df9b-483d-b294-c7eb01e22aac",
"usage": "CallingUserAssignment",
"additionalUsages": ["FirstPartyAppAssignment"],
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+97239764570","+97239764571","+97239764572","+97239764573","+97239764574","+97239764575","+97239764576","+97239764577","+97239764578","+97239764579","+97239764580",,"+97239764582","+97239764583", "97239764584","+97239764585","+97239764586","+97239764587","+97239764588","+97239764589"],
"workflowVersion": 3
}
The following error is raised:
Number upload example:
"phoneNumbers[11]": [
"Unexpected character encountered while parsing value: ,. Path 'phoneNumbers[11]', line 6, position 183."
| ■ | 400 Bad Request: The following error is raised when an invalid Calling Profile Id is entered in the request body; see Retrieve Microsoft Operator Connect Calling Profiles to verify configured Calling Profile Ids). |
{
"errors": {
"CallingProfile": [
"Invalid CallingProfileId!"
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-b0da85edb231924dee2cf223620f3e60-e788e6802f612a84-00"
}
| ■ | 400 Bad Request: The following error is raised when no SBC devices are attached to the Calling Profile; see Get Calling Profiles Mapping to SBC Devices to verify those SBC devices that are attached to Calling Profiles. |
{
"errors": {
"CallingProfile": [
"There are no SBCs assigned to this calling profile!"
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-ce7db116205054eee1c59c80ebe7f48d-d5a3edc4aadfc80d-00"
}
| ■ | 404 Not Found: The following error is raised when workflow is not found |
{
"title": "ERROR: Not found workflow for the given id = wup_300438d2-1bcf-4bb4-9b5e-c37d786ee650.",
"status": 404
}