lines
Creates, updates, deletes, gets or lists a lines resource.
Overview​
| Name | lines |
| Type | Resource |
| Id | ovh.telephony.lines |
Fields​
The following fields are returned by SELECT queries:
- get_by_service_name
- get
- list_by_billing_account
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
service_name | string | (wire: serviceName) |
can_change_password | boolean | Ability to manage SIP password on this service (wire: canChangePassword) |
description | string | |
device_slot | integer | The position of the line when attached to a device (0 if the line is not attached to a device) (wire: deviceSlot) |
get_public_offer | object | The line offers (wire: getPublicOffer) |
infrastructure | string | The infrastructure where is configured the line |
is_attached_to_other_lines_phone | boolean | Is this line attached to a phone that belongs to another line? (wire: isAttachedToOtherLinesPhone) |
notifications | object | Send notifications about Line's diagnosticReports |
offers | array | The line offers (Deprecated, prefer "name" in getPublicOffer) |
service_type | string | All existing types (alias, line) (wire: serviceType) |
simultaneous_lines | integer | (wire: simultaneousLines) |
successful operation
| Name | Datatype | Description |
|---|---|---|
service_name | string | (wire: serviceName) |
iam | object | IAM resource metadata |
Line service
| Name | Datatype | Description |
|---|---|---|
service_name | string | (wire: serviceName) |
can_change_password | boolean | Ability to manage SIP password on this service (wire: canChangePassword) |
description | string | |
device_slot | integer | The position of the line when attached to a device (0 if the line is not attached to a device) (wire: deviceSlot) |
get_public_offer | object | The line offers (wire: getPublicOffer) |
infrastructure | string | The infrastructure where is configured the line |
is_attached_to_other_lines_phone | boolean | Is this line attached to a phone that belongs to another line? (wire: isAttachedToOtherLinesPhone) |
notifications | object | Send notifications about Line's diagnosticReports |
offers | array | The line offers (Deprecated, prefer "name" in getPublicOffer) |
service_type | string | All existing types (alias, line) (wire: serviceType) |
simultaneous_lines | integer | (wire: simultaneousLines) |
Telephony service
| Name | Datatype | Description |
|---|---|---|
service_name | string | (wire: serviceName) |
iam | object | IAM resource metadata |
Methods​
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
billingAccount | string | The name of your billingAccount |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
serviceName | string | |
service_name | string | (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get_by_service_name
- get
- list_by_billing_account
- list
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
;
Get a line or trunk
SELECT
service_name,
iam
FROM ovh.telephony.lines
WHERE service_name = '{{ service_name }}' -- required
;
List lines
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 x_pagination_mode = '{{ x_pagination_mode }}'
;
List lines
SELECT
service_name,
iam
FROM ovh.telephony.lines
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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_contact
- activate_new_phone
- associate_device
- block
- cancel_convert_to_number
- change_password
- click2_call
- convert_to_number
- dissociate_device
- remove_simultaneous_lines
- softphone_token
- unblock
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 }}"
}'
;
Activate a new phone
EXEC ovh.telephony.lines.activate_new_phone
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
;
Associate a device
EXEC ovh.telephony.lines.associate_device
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"ipAddress": "{{ ipAddress }}",
"macAddress": "{{ macAddress }}",
"slot": {{ slot }}
}'
;
Block the line
EXEC ovh.telephony.lines.block
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"mode": "{{ mode }}"
}'
;
Cancel a scheduled conversion to number
EXEC ovh.telephony.lines.cancel_convert_to_number
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
;
Change the SIP password
EXEC ovh.telephony.lines.change_password
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;
Start a call from the line
EXEC ovh.telephony.lines.click2_call
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"calledNumber": "{{ calledNumber }}",
"callingNumber": "{{ callingNumber }}",
"intercom": {{ intercom }}
}'
;
Schedule a conversion to number
EXEC ovh.telephony.lines.convert_to_number
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
;
Dissociate a device
EXEC ovh.telephony.lines.dissociate_device
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"ipAddress": "{{ ipAddress }}",
"macAddress": "{{ macAddress }}"
}'
;
Remove extra simultaneous lines
EXEC ovh.telephony.lines.remove_simultaneous_lines
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"quantityRemove": {{ quantityRemove }}
}'
;
Generates a token to register a softphone device on the line, and sends it to the given email address.
EXEC ovh.telephony.lines.softphone_token
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"email": "{{ email }}"
}'
;
Unblock the line
EXEC ovh.telephony.lines.unblock
@billingAccount='{{ billingAccount }}' --required,
@serviceName='{{ serviceName }}' --required
;