Skip to main content

ovh_pabx_dialplans

Creates, updates, deletes, gets or lists an ovh_pabx_dialplans resource.

Overview​

Nameovh_pabx_dialplans
TypeResource
Idovh.telephony.ovh_pabx_dialplans

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringThe dialplan name
dialplan_idinteger (wire: dialplanId)
anonymous_rejectionbooleanReject (hangup) anonymous calls (wire: anonymousRejection)
last_updatestring (date-time) (wire: lastUpdate)
show_caller_numberstringThe presented number when bridging calls (alias, both, caller) (wire: showCallerNumber)
transfer_timeoutintegerThe timeout (in seconds) when bridging calls (wire: transferTimeout)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, dialplan_id, service_nameGet a dialplan
listselectbilling_account, service_namex_pagination_modeList dialplans
createinsertbilling_account, service_name, anonymous_rejection, name, show_caller_number, transfer_timeoutCreate a dialplan
updateupdatebilling_account, dialplan_id, service_nameUpdate a dialplan
deletedeletebilling_account, dialplan_id, service_nameDelete a dialplan

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"}})
billing_accountstringThe name of your billingAccount (wire: billingAccount)
dialplan_idinteger (wire: dialplanId)
service_namestring (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 dialplan

SELECT
name,
dialplan_id,
anonymous_rejection,
last_update,
show_caller_number,
transfer_timeout
FROM ovh.telephony.ovh_pabx_dialplans
WHERE billing_account = '{{ billing_account }}' -- required
AND dialplan_id = '{{ dialplan_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a dialplan

INSERT INTO ovh.telephony.ovh_pabx_dialplans (
anonymous_rejection,
name,
show_caller_number,
transfer_timeout,
billing_account,
service_name
)
SELECT
{{ anonymous_rejection }} /* required */,
'{{ name }}' /* required */,
'{{ show_caller_number }}' /* required */,
{{ transfer_timeout }} /* required */,
'{{ billing_account }}',
'{{ service_name }}'
RETURNING
name,
dialplan_id,
anonymous_rejection,
last_update,
show_caller_number,
transfer_timeout
;

UPDATE examples​

Update a dialplan

UPDATE ovh.telephony.ovh_pabx_dialplans
SET
anonymous_rejection = {{ anonymous_rejection }},
name = '{{ name }}',
show_caller_number = '{{ show_caller_number }}',
transfer_timeout = {{ transfer_timeout }}
WHERE
billing_account = '{{ billing_account }}' --required
AND dialplan_id = '{{ dialplan_id }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete a dialplan

DELETE FROM ovh.telephony.ovh_pabx_dialplans
WHERE billing_account = '{{ billing_account }}' --required
AND dialplan_id = '{{ dialplan_id }}' --required
AND service_name = '{{ service_name }}' --required
;