Skip to main content

Create a Voice Configuration Package

Due to the regulatory nature of expanding voice services globally, we've introduced Voice Configuration Packages (VCPs). This feature allows you to define and manage voice origination (inbound) settings and routing functionality for groups of phone numbers without regard for geographical constraints or the Location where those numbers are stored on your account.

As part of this effort, we've moved the Inbound and Routing configuration settings from Locations (Sip Peers) to VCPs as Locations didn't provide a scalable solution for the expanded scope of regulatory requirements for global services. Location settings will continue to be used for other products, such as Messaging.

note

Assigning phone numbers to a VCP enables them for the features configured on that VCP. VCPs allow large groups of numbers with identical configurations to be grouped together, helping you quickly update all numbers in the same VCP and reduce the administrative overhead of configuring settings for each Location.

Create a Voice Configuration Package

Example

Request
POST https://api.bandwidth.com/api/v2/accounts/{accountId}/voiceConfigs
Content-Type: application/json
Authorization: Bearer mySecretToken

{
"name": "Test VCP2",
"description": "Voice Config Description",
"cnam": {
"enabled": false
},
"pindropIntegration": {
"enabled": false
},
"callVerification": {
"enabled": false
},
"originationRoutePlan": {
"routes": [
{
"priority": 1,
"name": "Route Name",
"endpoints": [
{
"endpoint": "+12345678910",
"type": "TN",
"weight": 20
}
]
}
]
}
}
Response
{
"data": {
"voiceConfigId": "2168a9f5-9ad5-4435-a724-ddc8169e1b27",
"accountId": {accountId},
"name": "Test VCP2",
"description": "Voice Config Description",
"originationRoutePlan": {
"routes": [
{
"name": "Route Name",
"priority": 1,
"endpoints": [
{
"endpoint": "+12345678910",
"type": "TN",
"weight": 20
}
]
}
]
},
"stirShakenBehavior": null,
"cnam": {
"enabled": false
},
"httpVoiceV2ApplicationId": null,
"pindropIntegration": {
"enabled": false
},
"callVerification": {
"enabled": false
}
},
"links": [
{
"href": "http://api.bandwidth.com/api/v2/accounts/{accountid}/voiceConfigs/2168a9f5-9ad5-4435-a724-ddc8169e1b27",
"rel": "self",
"method": "GET"
},
{
"href": "http://api.bandwidth.com/api/v2/accounts/{accountid}/voiceConfigs",
"rel": "create",
"method": "POST"
},
{
"href": "http://api.bandwidth.com/api/v2/accounts/{accountid)/voiceConfigs/2168a9f5-9ad5-4435-a724-ddc8169e1b27",
"rel": "replace",
"method": "PUT"
},
{
"href": "http://api.bandwidth.com/api/v2/accounts/{accountid}/voiceConfigs/2168a9f5-9ad5-4435-a724-ddc8169e1b27",
"rel": "update",
"method": "PATCH"
},
{
"href": "http://api.bandwidth.com/api/v2/accounts/{accountid}/voiceConfigs/2168a9f5-9ad5-4435-a724-ddc8169e1b27",
"rel": "delete",
"method": "DELETE"
}
],
"errors": []
}

Assign Telephone Numbers to a Voice Configuration Package

Example

Request

Telephone Numbers must be assigned to a VCP to enable the features configured on that VCP. The following example shows how to assign phone numbers to a VCP.

More information can be found in the VCP API Reference.

POST https://api.bandwidth.com/api/v2/accounts/{accountId}/voiceConfigs/{voiceConfigId}/phoneNumbers/bulk
Content-Type: application/json
Authorization: Bearer mySecretToken

{
"action": "ADD",
"phoneNumbers": [
"+19843753563",
"+19843753564"
]
}
Response
204 No Content