Skip to main content

lines

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

Overview​

Namelines
TypeResource
Idovh.telephony.lines

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
service_namestring (wire: serviceName)
can_change_passwordbooleanAbility to manage SIP password on this service (wire: canChangePassword)
descriptionstring
device_slotintegerThe position of the line when attached to a device (0 if the line is not attached to a device) (wire: deviceSlot)
get_public_offerobjectThe line offers (wire: getPublicOffer)
infrastructurestringThe infrastructure where is configured the line
is_attached_to_other_lines_phonebooleanIs this line attached to a phone that belongs to another line? (wire: isAttachedToOtherLinesPhone)
notificationsobjectSend notifications about Line's diagnosticReports
offersarrayThe line offers (Deprecated, prefer "name" in getPublicOffer)
service_typestringAll existing types (alias, line) (wire: serviceType)
simultaneous_linesinteger (wire: simultaneousLines)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_service_nameselectbilling_account, service_nameGet a line
getselectservice_nameGet a line or trunk
list_by_billing_accountselectbilling_accountx_pagination_modeList lines
listselectiam_tags, x_pagination_modeList lines
updateupdatebilling_account, service_nameUpdate a line
change_contactexecserviceNameChange service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
activate_new_phoneexecbillingAccount, serviceNameActivate a new phone
associate_deviceexecbillingAccount, serviceName, macAddressAssociate a device
blockexecbillingAccount, serviceNameBlock the line
cancel_convert_to_numberexecbillingAccount, serviceNameCancel a scheduled conversion to number
change_passwordexecbillingAccount, serviceNameChange the SIP password
click2_callexecbillingAccount, serviceName, calledNumberStart a call from the line
convert_to_numberexecbillingAccount, serviceNameSchedule a conversion to number
dissociate_deviceexecbillingAccount, serviceName, macAddressDissociate a device
remove_simultaneous_linesexecbillingAccount, serviceName, quantityRemoveRemove extra simultaneous lines
softphone_tokenexecbillingAccount, serviceNameGenerates a token to register a softphone device on the line, and sends it to the given email address.
unblockexecbillingAccount, serviceNameUnblock the 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)
serviceNamestring
service_namestring (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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 line

SELECT
service_name,
can_change_password,
description,
device_slot,
get_public_offer,
infrastructure,
is_attached_to_other_lines_phone,
notifications,
offers,
service_type,
simultaneous_lines
FROM ovh.telephony.lines
WHERE billing_account = '{{ billing_account }}' -- required
AND service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Update a line

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

Lifecycle Methods​

EXEC variables use wire (API) names.

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

EXEC ovh.telephony.lines.change_contact
@serviceName='{{ serviceName }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;