Skip to main content

ovh_pabx_dialplan_extensions

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

Overview​

Nameovh_pabx_dialplan_extensions
TypeResource
Idovh.telephony.ovh_pabx_dialplan_extensions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
extension_idinteger (wire: extensionId)
enabledbooleanTrue if the extension is enabled
positionintegerThe position of the extension in the dialplan (the extensions are executed following this order)
scheduler_categorystringAdditionnal conditions are used from this chosen scheduler category (holidays, scheduler1, scheduler2, scheduler3) (wire: schedulerCategory)
screen_list_typestringThe type of the screenlist (destinationBlackList, destinationWhiteList, incomingBlackList, incomingWhiteList) (wire: screenListType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, dialplan_id, extension_id, service_nameGet an extension
listselectbilling_account, dialplan_id, service_namex_pagination_modeList extensions
createinsertbilling_account, dialplan_id, service_name, enable, positionCreate an extension
updateupdatebilling_account, dialplan_id, extension_id, service_nameUpdate an extension
deletedeletebilling_account, dialplan_id, extension_id, service_nameDelete an extension

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)
extension_idinteger (wire: extensionId)
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 an extension

SELECT
extension_id,
enabled,
position,
scheduler_category,
screen_list_type
FROM ovh.telephony.ovh_pabx_dialplan_extensions
WHERE billing_account = '{{ billing_account }}' -- required
AND dialplan_id = '{{ dialplan_id }}' -- required
AND extension_id = '{{ extension_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create an extension

INSERT INTO ovh.telephony.ovh_pabx_dialplan_extensions (
enable,
position,
scheduler_category,
screen_list_type,
billing_account,
dialplan_id,
service_name
)
SELECT
{{ enable }} /* required */,
{{ position }} /* required */,
'{{ scheduler_category }}',
'{{ screen_list_type }}',
'{{ billing_account }}',
'{{ dialplan_id }}',
'{{ service_name }}'
RETURNING
extension_id,
enabled,
position,
scheduler_category,
screen_list_type
;

UPDATE examples​

Update an extension

UPDATE ovh.telephony.ovh_pabx_dialplan_extensions
SET
enabled = {{ enabled }},
position = {{ position }},
scheduler_category = '{{ scheduler_category }}',
screen_list_type = '{{ screen_list_type }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND dialplan_id = '{{ dialplan_id }}' --required
AND extension_id = '{{ extension_id }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete an extension

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