Skip to main content

numbers

Creates, updates, deletes, gets or lists a numbers resource.

Overview​

Namenumbers
TypeResource
Idovh.telephony.numbers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
service_namestringName of the service (wire: serviceName)
descriptionstringDescription of the service
feature_typestringFeature enabled on the number (aiAgent, carrierSip, cloudHunting, cloudIvr, conference, contactCenterSolution, contactCenterSolutionExpert, ddi, easyHunting, empty, fax, freefax, mgcp, oldConference, plugAndFax, redirect, sip, svi, voicefax, voicemail, vxml) (wire: featureType)
part_of_poolstringParent of the service (if it is part of a pool) (wire: partOfPool)
service_typestringAll existing types (alias, line) (wire: serviceType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, service_nameGet a number
listselectbilling_accountx_pagination_modeList numbers
updateupdatebilling_account, service_nameUpdate a number
cancel_convert_to_lineexecbillingAccount, serviceNameCancel a scheduled conversion to line
change_feature_typeexecbillingAccount, serviceName, featureTypeChange the number feature type
convert_to_lineexecbillingAccount, serviceName, offerSchedule a conversion to line

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
billingAccountstringThe name of your billingAccount
billing_accountstringThe name of your billingAccount (wire: billingAccount)
serviceNamestringName of the service
service_namestringName of the service (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a number

SELECT
service_name,
description,
feature_type,
part_of_pool,
service_type
FROM ovh.telephony.numbers
WHERE billing_account = '{{ billing_account }}' -- required
AND service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Update a number

UPDATE ovh.telephony.numbers
SET
description = '{{ description }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND service_name = '{{ service_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Cancel a scheduled conversion to line

EXEC ovh.telephony.numbers.cancel_convert_to_line
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
;