Add numbers to SIP Trunk
Add numbers to SIP trunk
Add phone numbers to a specific SIP trunk.
Note: A maximum of 500 phone numbers can be added in a single request. Added numbers will automatically have CLI (Caller Line Identification) enabled.
| Request | |
|---|---|
| Method | POST |
| Resource | https://[customer].asp.virtual-call-center.eu/v2/sip_trunks/[trunkid]/numbers |
| Options | N/A |
| Body | JSON object containing countryPrefix and an array of numbers to add. |
| Response | |
| Body | Object containing details of the added phone numbers keyed by number, encoded in JSON. |
Request
Resource parameters
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| customer | string | yes | Your account name |
| trunkid | string | yes | Unique SIP trunk identifier (routing ID). |
Body parameters
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| countryPrefix | integer | yes | Country calling code prefix (e.g. 36). |
| numbers | array of objects | yes | List of phone numbers to add (maximum 500 numbers). |
Numbers object
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| number | string | yes | Phone number in digits only (including country prefix). |
| label | string | no | Custom descriptive label assigned to the phone number (e.g. “Sales”). |
Response
Response object
| Name | Type | Comment |
|---|---|---|
| [number] | object | Details of the created phone number, identified by the phone number itself as key. |
Number details object
| Name | Type | Comment |
|---|---|---|
| number | string | The phone number. |
| label | string | Assigned label of the phone number. |
| routingId | string | Unique identifier of the SIP trunk routing. |
| routingName | string | Name of the SIP trunk routing. |
| cliEnabled | boolean | Specifies whether CLI is enabled for the number (always true). |
Example
URL: https://mycc.asp.virtual-call-center.eu/v2/sip_trunks/mycc_carrier_customer_routing/numbers
Request Body:
{
"countryPrefix": 36,
"numbers": [
{
"number": "3619999001",
"label": "Sales"
},
{
"number": "3619999002"
}
]
}
Response:
{
"response": {
"3619999001": {
"number": "3619999001",
"label": "Sales",
"routingId": "mycc_carrier_customer_routing",
"routingName": "Carrier",
"cliEnabled": true
},
"3619999002": {
"number": "3619999002",
"label": "",
"routingId": "mycc_carrier_customer_routing",
"routingName": "Carrier",
"cliEnabled": true
}
},
"errors": []
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.