ovh_pabx_dialplans
Creates, updates, deletes, gets or lists an ovh_pabx_dialplans resource.
Overview​
| Name | ovh_pabx_dialplans |
| Type | Resource |
| Id | ovh.telephony.ovh_pabx_dialplans |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | The dialplan name |
dialplan_id | integer | (wire: dialplanId) |
anonymous_rejection | boolean | Reject (hangup) anonymous calls (wire: anonymousRejection) |
last_update | string (date-time) | (wire: lastUpdate) |
show_caller_number | string | The presented number when bridging calls (alias, both, caller) (wire: showCallerNumber) |
transfer_timeout | integer | The timeout (in seconds) when bridging calls (wire: transferTimeout) |
Dialplan
| Name | Datatype | Description |
|---|---|---|
name | string | The dialplan name |
dialplan_id | integer | (wire: dialplanId) |
anonymous_rejection | boolean | Reject (hangup) anonymous calls (wire: anonymousRejection) |
last_update | string (date-time) | (wire: lastUpdate) |
show_caller_number | string | The presented number when bridging calls (alias, both, caller) (wire: showCallerNumber) |
transfer_timeout | integer | The timeout (in seconds) when bridging calls (wire: transferTimeout) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, dialplan_id, service_name | Get a dialplan | |
list | select | billing_account, service_name | x_pagination_mode | List dialplans |
create | insert | billing_account, service_name, anonymous_rejection, name, show_caller_number, transfer_timeout | Create a dialplan | |
update | update | billing_account, dialplan_id, service_name | Update a dialplan | |
delete | delete | billing_account, dialplan_id, service_name | Delete 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.
| 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) |
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 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
;
List dialplans
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 service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: ovh_pabx_dialplans
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the ovh_pabx_dialplans resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the ovh_pabx_dialplans resource.
- name: anonymous_rejection
value: {{ anonymous_rejection }}
description: |
Reject (hangup) anonymous calls
- name: name
value: "{{ name }}"
description: |
The dialplan name
- name: show_caller_number
value: "{{ show_caller_number }}"
description: |
The presented number when bridging calls
valid_values: ['alias', 'both', 'caller']
- name: transfer_timeout
value: {{ transfer_timeout }}
description: |
The timeout (in seconds) when bridging calls
UPDATE examples​
- update
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
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
;