ovh_pabx_dialplan_extensions
Creates, updates, deletes, gets or lists an ovh_pabx_dialplan_extensions resource.
Overview​
| Name | ovh_pabx_dialplan_extensions |
| Type | Resource |
| Id | ovh.telephony.ovh_pabx_dialplan_extensions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
extension_id | integer | (wire: extensionId) |
enabled | boolean | True if the extension is enabled |
position | integer | The position of the extension in the dialplan (the extensions are executed following this order) |
scheduler_category | string | Additionnal conditions are used from this chosen scheduler category (holidays, scheduler1, scheduler2, scheduler3) (wire: schedulerCategory) |
screen_list_type | string | The type of the screenlist (destinationBlackList, destinationWhiteList, incomingBlackList, incomingWhiteList) (wire: screenListType) |
Dialplan extension
| Name | Datatype | Description |
|---|---|---|
extension_id | integer | (wire: extensionId) |
enabled | boolean | True if the extension is enabled |
position | integer | The position of the extension in the dialplan (the extensions are executed following this order) |
scheduler_category | string | Additionnal conditions are used from this chosen scheduler category (holidays, scheduler1, scheduler2, scheduler3) (wire: schedulerCategory) |
screen_list_type | string | The type of the screenlist (destinationBlackList, destinationWhiteList, incomingBlackList, incomingWhiteList) (wire: screenListType) |
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, service_name | Get an extension | |
list | select | billing_account, dialplan_id, service_name | x_pagination_mode | List extensions |
create | insert | billing_account, dialplan_id, service_name, enable, position | Create an extension | |
update | update | billing_account, dialplan_id, extension_id, service_name | Update an extension | |
delete | delete | billing_account, dialplan_id, extension_id, service_name | Delete 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.
| 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) |
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
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
;
List extensions
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 service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: ovh_pabx_dialplan_extensions
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the ovh_pabx_dialplan_extensions resource.
- name: dialplan_id
value: {{ dialplan_id }}
description: Required parameter for the ovh_pabx_dialplan_extensions resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the ovh_pabx_dialplan_extensions resource.
- name: enable
value: {{ enable }}
description: |
True to enable the extension
- name: position
value: {{ position }}
description: |
The position of the extension in the dialplan (the extensions are executed following this order)
- name: scheduler_category
value: "{{ scheduler_category }}"
description: |
Additionnal conditions will be used from this chosen scheduler category
valid_values: ['holidays', 'scheduler1', 'scheduler2', 'scheduler3']
- name: screen_list_type
value: "{{ screen_list_type }}"
description: |
Screenlist condition type
valid_values: ['destinationBlackList', 'destinationWhiteList', 'incomingBlackList', 'incomingWhiteList']
UPDATE examples​
- update
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
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
;