ovh_pabx_dialplan_extension_rules
Creates, updates, deletes, gets or lists an ovh_pabx_dialplan_extension_rules resource.
Overview​
| Name | ovh_pabx_dialplan_extension_rules |
| Type | Resource |
| Id | ovh.telephony.ovh_pabx_dialplan_extension_rules |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
rule_id | integer | (wire: ruleId) |
action | string | The action made by the rule (bridge, endless_playback, hangup, hunting, ivr, playback, readDtmf, setCallerName, sleep, tts, voicemail) |
action_param | string | The parameter of the chosen action (wire: actionParam) |
negative_action | boolean | If true, the rule will be executed only when the result of the conditions is false (wire: negativeAction) |
position | integer | The position of the rule in the extension (the rules are executed following this order) |
Dialplan rule
| Name | Datatype | Description |
|---|---|---|
rule_id | integer | (wire: ruleId) |
action | string | The action made by the rule (bridge, endless_playback, hangup, hunting, ivr, playback, readDtmf, setCallerName, sleep, tts, voicemail) |
action_param | string | The parameter of the chosen action (wire: actionParam) |
negative_action | boolean | If true, the rule will be executed only when the result of the conditions is false (wire: negativeAction) |
position | integer | The position of the rule in the extension (the rules are executed following this order) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, dialplan_id, extension_id, rule_id, service_name | Get an extension rule | |
list | select | billing_account, dialplan_id, extension_id, service_name | x_pagination_mode | List extension rules |
create | insert | billing_account, dialplan_id, extension_id, service_name, action, negative_action, position | Create an extension rule | |
update | update | billing_account, dialplan_id, extension_id, rule_id, service_name | Update an extension rule | |
delete | delete | billing_account, dialplan_id, extension_id, rule_id, service_name | Delete 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.
| 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"}}) |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
dialplan_id | integer | (wire: dialplanId) |
extension_id | integer | (wire: extensionId) |
rule_id | integer | (wire: ruleId) |
service_name | string | (wire: serviceName) |
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
- list
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
;
List extension rules
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 service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: ovh_pabx_dialplan_extension_rules
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the ovh_pabx_dialplan_extension_rules resource.
- name: dialplan_id
value: {{ dialplan_id }}
description: Required parameter for the ovh_pabx_dialplan_extension_rules resource.
- name: extension_id
value: {{ extension_id }}
description: Required parameter for the ovh_pabx_dialplan_extension_rules resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the ovh_pabx_dialplan_extension_rules resource.
- name: action
value: "{{ action }}"
description: |
The action made by the rule
valid_values: ['bridge', 'endless_playback', 'hangup', 'hunting', 'ivr', 'playback', 'readDtmf', 'setCallerName', 'sleep', 'tts', 'voicemail']
- name: action_param
value: "{{ action_param }}"
description: |
The parameter of the chosen action
- name: negative_action
value: {{ negative_action }}
description: |
If true, the rule will be executed only when the result of the conditions is false
- name: position
value: {{ position }}
description: |
The position of the rule in the extension (the rules are executed following this order)
UPDATE examples​
- update
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
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
;