Modify Dial Plan for SIP Connection
The Modify Dial Plan for SIP Connection request allows you to add or remove phone numbers for a specific SIP Connection.
URL
{{baseUrl}}/api/v2/customer/{{customerId}}/sitelocation/{{siteLocationId}}/dialplan
Method
PATCH
Request Headers
You can alternatively specify either of the following headers, both of which return identical output.
|
Attribute |
Type |
Description |
|---|---|---|
|
X-Ovoc-Channel-Id |
integer |
The Live Platform channel id. When specified, data is scoped to only customers belonging to the specified channel. See Get List of Channels to extract this value. |
|
X-IAM-Account-Id |
string |
The Live Platform iamAccountId of the channel. When specified, data is scoped to only customers belonging to the specified channel. See Get List of Channels to extract this value. |
Request Parameters
|
Parameters |
Type |
Mandatory |
Description |
|---|---|---|---|
|
customerGuid |
string($uuid) |
Ö |
Unique customer 'Id' created when customer is added. Extract this value from Get Services Brief Details (V3) request. |
|
sitelocationGuid |
string($uuid) |
Ö |
Unique Id for SIP Connection (Site Location). For services with a single site, this value is identical to Customer 'Id' above. To retrieve this value, see Get Site Location. |
Request Body
|
Parameters |
Type |
Description |
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
dialPlanId |
string |
Dial plan name. Default 'CustDialPlan'. |
|||||||||
|
add |
list array |
List array including the following parameters:
|
|||||||||
|
name |
string |
Name of the dial plan rule that is configured for the SIP Connection in the Onboarding script. |
|||||||||
|
prefix |
string |
The calling prefixes to add for users for this site location. For example "{{+019123854567}}" |
|||||||||
|
tag |
string |
The Derived Trunk FQDN of the SBC device used to manage calls for this site location. For example, "{{EMEA.Customers.AudioCodes.com}}". If a number is added with a tag that is not an AudioCodes SBC PSTN gateway, then for the purpose of User licensing calculations, its counted as a Service Number license factor. For more information, see User Licenses. |
Example Body (Add Prefixes)
{
"dialPlanId": "CustDialPlan",
"add": [
{
"prefix": "+97239753000",
"tag": "sandbox1.audiocodes.be"
},
{
"prefix": "+97239753001",
"tag": "sandbox1.audiocodes.be"
},
{
"prefix": "+97239753002",
"tag": "sandbox1.audiocodes.be"
},
{
"prefix": "+97239753003",
"tag": "sandbox1.audiocodes.be"
}
]
}
Example Body (Remove Prefixes)
{
"dialPlanId": "CustDialPlan",
"remove": [
{
"prefix": "+97239753000",
"tag": "sandbox1.audiocodes.be"
}
]
}
HTTP Responses
| ■ | 200 OK |
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 tsk string in the prefix is unique for this endpoint. |
|
Dial plan name |
string |
The name of the Dial plan specified in the Request Body. |
|
error |
string |
Indicates whether an error is raised on the operation. |
{
"taskId": "tsk_616565",
"dialPlanName": "CustDialPlan",
"error": null
}
The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.
{
"id": "tsk_616565",
"status": "Queued",
"details": [
null
],
"executionMessages": null,
"outputData": {}
}
{
"id": "tsk_616565",
"status": "CompletedSuccess",
"details": [
"Ok"
],
"executionMessages": null,
"outputData": {}
}
|
Parameter |
Type |
Description |
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
taskId |
string |
The task Id. |
|||||||||
|
status |
string |
|
|||||||||
|
details |
string |
Additional information on the task. e.g. OK |
|||||||||
|
executionMessages |
string |
Additional information. |
|||||||||
|
outputData |
string |
Additional information. |
| ■ | 400 Bad Request |
The table below shows the full list of fields returned in this response. The actual fields returned may differ according to the request.
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
string |
Error type |
|
title |
string |
Email title |
|
status |
integer |
StatusCodes.Status400BadRequest |
|
detail |
string |
Additional error details. |
|
instance |
string |
HttpContext.Request.Path |
|
errorTicket |
string |
errId.ToString() |
|
errorCode |
string |
Error code output in the request |
|
traceId |
string |
HttpContext.TraceIdentifier |
|
additionalProp1 |
string |
Error related to Custom script parameter |
|
additionalProp2 |
string |
Error related to Custom script parameter |
|
additionalProp3 |
string |
Error related to Custom script parameter |
| ■ | 403 Forbidden: This error is raised when the specified Request parameters are not associated with the channel specified in the Header request. |
|
Parameter |
Type |
Description/Examples |
|---|---|---|
|
errors |
string |
Text description of the error. |
|
type |
string |
"https://tools.ietf.org/html/rfc7231#section-6.5.1" |
|
title |
string |
Email title. For example "One or more validation errors occurred." |
|
status |
error code |
HTML error code i.e. 400 |
|
detail |
string |
Additional error details. |
|
traceId |
string |
Error trace Id |
|
instance |
string |
Error instance |
|
errorTicket |
string |
This field may not appear for all return codes. |
|
errorCode |
string |
This field may not appear for all return codes. |
|
additionalProp1 |
string |
Custom Script variable argument. For example "CacProfile": "5 sessions" |
|
additionalProp2 |
string |
Custom Script argument. For example, ProxySet": "SIPTrunk" |
|
additionalProp3 |
string |
Custom Script argument. For example, "OnlinePstnGateway": "sandbox1.audiocodes.be" |
| ■ | 404 Not Found |
The table below shows the full list of fields returned in this response. The actual fields returned may differ according to the request.
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
string |
Error type |
|
title |
string |
Email title |
|
status |
integer |
StatusCodes.Status400BadRequest |
|
detail |
string |
Additional error details. |
|
instance |
string |
HttpContext.Request.Path |
|
errorTicket |
string |
errId.ToString() |
|
errorCode |
string |
Error code output in the request |
|
traceId |
string |
HttpContext.TraceIdentifier |
|
additionalProp1 |
string |
Error related to Custom script parameter |
|
additionalProp2 |
string |
Error related to Custom script parameter |
|
additionalProp3 |
string |
Error related to Custom script parameter |
| ■ | 500 Internal Server Error |