Trunk Settings
All operations require authentication.
List trunksProduction
List trunks. Returns the trunks of the customer, across all billing accounts. A trunk connects a customer PBX to OVHcloud over SIP.
Query parameters
Filter resources on IAM tags
Response
Reads your token from $OVH_TOKEN
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ trunks \
-H "authorization: Bearer $OVH_TOKEN"[ "string"]
Get a line or trunkProduction
Get a line or trunk. Returns the line or trunk service, without its billing account. Use it to find a service across all billing accounts.
Path parameters
Your trunk number
Response
IAM resource metadata
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ trunks/ {serviceName} \
-H "authorization: Bearer $OVH_TOKEN"{ "iam": { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "state": "EXPIRED", "tags": { "key": "string" }, "urn": "string" }, "serviceName": "string"}
Change service contactsProduction
Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
Path parameters
Your trunk number
Request body (required)
The contact to set as admin contact
The contact to set as billing contact
The contact to set as tech contact
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ trunks/ {serviceName}/ changeContact \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get service informationProduction
Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.
Path parameters
Your trunk number
Response
Indicates that the service can be set up to be deleted at expiration
All the possible renew period of your service in month
Way of handling the renew
Detailed renewal type of a service
automaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoptionautorenewInProgressexpiredinCreationokpendingDebtunPaidExample uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ trunks/ {serviceName}/ serviceInfos \
-H "authorization: Bearer $OVH_TOKEN"{ "canDeleteAtExpiration": true, "contactAdmin": "string", "contactBilling": "string", "contactTech": "string", "creation": "2024-01-01", "domain": "string", "engagedUpTo": "2024-01-01", "expiration": "2024-01-01", "possibleRenewPeriod": [ 0 ], "renew": { "automatic": true, "deleteAtExpiration": true, "forced": true, "manualPayment": true, "period": 0 }, "renewalType": "automaticForcedProduct", "serviceId": 0, "status": "autorenewInProgress"}
Update service informationProduction
Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.
Path parameters
Your trunk number
Request body (required)
Indicates that the service can be set up to be deleted at expiration
All the possible renew period of your service in month
Way of handling the renew
Detailed renewal type of a service
automaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoptionautorenewInProgressexpiredinCreationokpendingDebtunPaidResponse
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ trunks/ {serviceName}/ serviceInfos \
-H "authorization: Bearer $OVH_TOKEN"Get the maximum simultaneous linesProduction
Get the maximum simultaneous lines. Returns the maximum number of simultaneous calls available for the line. The current, basic and extra channels are in the simultaneous channels details.
Path parameters
The name of your billingAccount
Response
Example uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ line/ {serviceName}/ maximumAvailableSimultaneousLines \
-H "authorization: Bearer $OVH_TOKEN"0
Remove extra simultaneous linesProduction
Remove extra simultaneous lines. Removes the given quantity of extra simultaneous lines from the line. The extra channels are listed in the simultaneous channels details.
Path parameters
The name of your billingAccount
Request body (required)
The quantity of extra simultaneous lines to remove
Response
Example uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ line/ {serviceName}/ removeSimultaneousLines \
-H "authorization: Bearer $OVH_TOKEN"Get simultaneous channels detailsProduction
Get simultaneous channels details. Returns the simultaneous call channels of the line: current, basic, extra, to be deleted and maximum.
Path parameters
The name of your billingAccount
Response
Basic quantity of simultaneous channels included in the line.
Current quantity of simultaneous channels.
Extra quantity of simultaneous channels added to the line.
Maximum quantity of simultaneous channels the line can have.
Quantity of simultaneous channels going to be deleted at the end of the billing cycle.
Example uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ line/ {serviceName}/ simultaneousChannelsDetails \
-H "authorization: Bearer $OVH_TOKEN"{ "basic": 0, "current": 0, "extra": 0, "maximum": 0, "toBeDeleted": 0}
List trunksProduction
List trunks. Returns the trunks of the billing account. A trunk connects a customer PBX to OVHcloud over SIP.
Path parameters
The name of your billingAccount
Response
Example uses billingAccount = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk \
-H "authorization: Bearer $OVH_TOKEN"[ "string"]
Get a trunkProduction
Get a trunk. Returns the trunk service: service name, service type and description. External displayed numbers and channel packs have their own calls.
Path parameters
The name of your billingAccount
Name of the service
Response
Description of the service
Name of the service
Type of the service
aliaslineExample uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName} \
-H "authorization: Bearer $OVH_TOKEN"{ "description": "string", "serviceName": "string", "serviceType": "alias"}
Get the best channel packsProduction
Get the best channel packs. Returns the best combination of channel packs for a number of simultaneous channels.
Path parameters
The name of your billingAccount
Name of the service
Query parameters
Channels quantity to get the best repartition on
Response
The optimized quantity of channels to order
The repartition of the packs
The total price of the channels packs combination
Example uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName}/ channelsPacksRepartition \
-H "authorization: Bearer $OVH_TOKEN"{ "optimizedChannelsQuantity": 0, "packsRepartition": [ { "channels": 0, "quantity": 0, "unitPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }}
List external displayed numbersProduction
List external displayed numbers. Returns the external numbers the trunk can display to callees. Each number must be validated by a phone call before use.
Path parameters
The name of your billingAccount
Name of the service
Response
Example uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName}/ externalDisplayedNumber \
-H "authorization: Bearer $OVH_TOKEN"[ "string"]
Get an external displayed numberProduction
Get an external displayed number. Returns the external displayed number, its creation and validation dates and its status: waitingValidation, enabled, toDelete or refused.
Path parameters
The name of your billingAccount
External displayed number linked to a trunk
Name of the service
Response
Creation date
External displayed number linked to a trunk
Validation status
enabledrefusedtoDeletewaitingValidationValidation date
Example uses billingAccount = string, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName}/ externalDisplayedNumber/ {number} \
-H "authorization: Bearer $OVH_TOKEN"{ "createdAt": "2024-01-01T12:00:00Z", "number": "string", "status": "enabled", "validatedAt": "2024-01-01T12:00:00Z"}
Create an external displayed numberProduction
Create an external displayed number. Adds an external number the trunk can display to callees. The number must then be validated.
Path parameters
The name of your billingAccount
Name of the service
Request body (required)
External displayed number auto-validation. Only available for partner. Must be owner of the number.
External displayed number to create, in international format
Response
Creation date
External displayed number linked to a trunk
Validation status
enabledrefusedtoDeletewaitingValidationValidation date
Example uses billingAccount = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName}/ externalDisplayedNumber \
-H "authorization: Bearer $OVH_TOKEN"{ "createdAt": "2024-01-01T12:00:00Z", "number": "string", "status": "enabled", "validatedAt": "2024-01-01T12:00:00Z"}
Delete an external displayed numberProduction
Delete an external displayed number. Deletes the external displayed number. The trunk can no longer display it to callees.
Path parameters
The name of your billingAccount
External displayed number linked to a trunk
Name of the service
Response
Example uses billingAccount = string, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName}/ externalDisplayedNumber/ {number} \
-H "authorization: Bearer $OVH_TOKEN"Validate an external displayed numberProduction
Validate an external displayed number. Calls the external number to validate it. Type the returned validation code when the call asks for it.
Path parameters
The name of your billingAccount
External displayed number linked to a trunk
Name of the service
Response
telephony.Task id of the validation phone call
Validation code to type during phone call
Example uses billingAccount = string, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ v1/ telephony/ {billingAccount}/ trunk/ {serviceName}/ externalDisplayedNumber/ {number}/ validate \
-H "authorization: Bearer $OVH_TOKEN"{ "phoneCallTaskId": 0, "validationCode": "string"}