Skip to main content

ovh_pabx_dialplan_extension_rules

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

Overview​

Nameovh_pabx_dialplan_extension_rules
TypeResource
Idovh.telephony.ovh_pabx_dialplan_extension_rules

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
rule_idinteger (wire: ruleId)
actionstringThe action made by the rule (bridge, endless_playback, hangup, hunting, ivr, playback, readDtmf, setCallerName, sleep, tts, voicemail)
action_paramstringThe parameter of the chosen action (wire: actionParam)
negative_actionbooleanIf true, the rule will be executed only when the result of the conditions is false (wire: negativeAction)
positionintegerThe position of the rule in the extension (the rules are executed following this order)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, dialplan_id, extension_id, rule_id, service_nameGet an extension rule
listselectbilling_account, dialplan_id, extension_id, service_namex_pagination_modeList extension rules
createinsertbilling_account, dialplan_id, extension_id, service_name, action, negative_action, positionCreate an extension rule
updateupdatebilling_account, dialplan_id, extension_id, rule_id, service_nameUpdate an extension rule
deletedeletebilling_account, dialplan_id, extension_id, rule_id, service_nameDelete an extension rule

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)
rule_idinteger (wire: ruleId)
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 rule

SELECT
rule_id,
action,
action_param,
negative_action,
position
FROM ovh.telephony.ovh_pabx_dialplan_extension_rules
WHERE billing_account = '{{ billing_account }}' -- required
AND dialplan_id = '{{ dialplan_id }}' -- required
AND extension_id = '{{ extension_id }}' -- required
AND rule_id = '{{ rule_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create an extension rule

INSERT INTO ovh.telephony.ovh_pabx_dialplan_extension_rules (
action,
action_param,
negative_action,
position,
billing_account,
dialplan_id,
extension_id,
service_name
)
SELECT
'{{ action }}' /* required */,
'{{ action_param }}',
{{ negative_action }} /* required */,
{{ position }} /* required */,
'{{ billing_account }}',
'{{ dialplan_id }}',
'{{ extension_id }}',
'{{ service_name }}'
RETURNING
rule_id,
action,
action_param,
negative_action,
position
;

UPDATE examples​

Update an extension rule

UPDATE ovh.telephony.ovh_pabx_dialplan_extension_rules
SET
action = '{{ action }}',
action_param = '{{ action_param }}',
negative_action = {{ negative_action }},
position = {{ position }}
WHERE
billing_account = '{{ billing_account }}' --required
AND dialplan_id = '{{ dialplan_id }}' --required
AND extension_id = '{{ extension_id }}' --required
AND rule_id = '{{ rule_id }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete an extension rule

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