# Web Cloud › Telephony › Phone Numbers (alias) › Voice Menus & PBX (IVR) API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 114 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr.json?format=openapi3

## Operations

- `GET /telephony/sounds` — Sounds attached to this telephony account
- `GET /telephony/sounds/{id}` — Get a sound
- `POST /telephony/sounds` — Create a sound
- `DELETE /telephony/sounds/{id}` — Delete a sound
- `PUT /telephony/sounds/{id}` — Update a sound
- `GET /telephony/{billingAccount}/ovhPabx` — List PBX services
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}` — Get a PBX service
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}` — Update a PBX service
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan` — List dialplans
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}` — Get a dialplan
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan` — Create a dialplan
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}` — Delete a dialplan
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}` — Update a dialplan
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension` — List extensions
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}` — Get an extension
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension` — Create an extension
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}` — Delete an extension
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}` — Update an extension
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList` — List filtering conditions
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}` — Get a filtering condition
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList` — Create a filtering condition
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}` — Delete a filtering condition
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime` — List time conditions
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}` — Get a time condition
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime` — Create a time condition
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}` — Delete a time condition
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}` — Update a time condition
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule` — List extension rules
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}` — Get an extension rule
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule` — Create an extension rule
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}` — Delete an extension rule
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}` — Update an extension rule
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting` — Get the queue system settings
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting` — Update the queue system settings
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent` — List agents
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}` — Get an agent
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent` — Create an agent
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}` — Delete an agent
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}` — Update an agent
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess` — Get the agent banner access
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess` — Create the agent banner access
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess` — Delete the agent banner access
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls` — List agent calls
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}` — Get a live call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/eavesdrop` — Eavesdrop on a call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hangup` — Hang up a call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hold` — Toggle hold on a call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/intercept` — Intercept an unanswered call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/transfer` — Transfer an answered call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/whisper` — Whisper on a call
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken` — Get the event token
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken` — Create an event token
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken` — Delete the event token
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/liveStatus` — Get the agent live status
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue` — List the queues of an agent
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}` — Get an agent position in a queue
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue` — Assign an agent to a queue
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}` — Remove an agent from a queue
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}` — Update an agent position in a queue
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}/liveStatus` — Get the agent live status
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus` — List custom statuses
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}` — Get a custom status
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus` — Create a custom status
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}` — Delete a custom status
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken` — Get the event token
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken` — Create an event token
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken` — Delete the event token
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue` — List queues
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}` — Get a queue
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue` — Create a queue
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}` — Delete a queue
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}` — Update a queue
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent` — List the agents of a queue
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}` — Get an agent position in a queue
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent` — Assign an agent to a queue
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}` — Remove an agent from a queue
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}` — Update an agent position in a queue
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}/liveStatus` — Get the agent live status
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls` — List queue live calls
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}` — Get a live call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/eavesdrop` — Eavesdrop on a call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hangup` — Hang up a call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hold` — Toggle hold on a call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/intercept` — Intercept an unanswered call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/transfer` — Transfer an answered call
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/whisper` — Whisper on a call
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveStatistics` — Get queue live statistics
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/menu` — List menus
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}` — Get a menu
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/menu` — Create a menu
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}` — Delete a menu
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}` — Update a menu
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry` — List menu entries
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}` — Get a menu entry
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry` — Create a menu entry
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}` — Delete a menu entry
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}` — Update a menu entry
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/records` — List call recordings
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}` — Get a call recording
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}` — Delete a call recording
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/sound` — List sounds
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}` — Get a sound
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}` — Delete a sound
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/soundUpload` — Upload a sound
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/tts` — List TTS prompts
- `GET /telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}` — Get a TTS prompt
- `POST /telephony/{billingAccount}/ovhPabx/{serviceName}/tts` — Create a TTS prompt
- `DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}` — Delete a TTS prompt
- `PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}` — Update a TTS prompt
- `GET /telephony/{billingAccount}/vxml` — List VXML services
- `GET /telephony/{billingAccount}/vxml/{serviceName}` — Get a VXML service
- `GET /telephony/{billingAccount}/vxml/{serviceName}/settings` — Get the VXML settings
- `PUT /telephony/{billingAccount}/vxml/{serviceName}/settings` — Update the VXML settings
- `POST /telephony/{billingAccount}/vxml/{serviceName}/settings/logs` — Generate a logs URL

## Sounds attached to this telephony account

`GET /1.0/telephony/sounds`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-sounds

**Status:** Stable production version  
**IAM actions:** `account:apiovh:voip/sounds/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/sounds" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/sounds")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/sounds");

print_r($result);
?>
```

## Get a sound

`GET /1.0/telephony/sounds/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-sounds-id

**Status:** Stable production version  
**IAM actions:** `account:apiovh:voip/sounds/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Sound ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Sound | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Sound creation date |
| `description` | string |  | Sound description |
| `filename` | string |  | Sound filename |
| `getUrl` | string | read-only | URL to get sound file |
| `id` | integer | read-only | Sound ID |
| `putUrl` | string | read-only | URL to upload sound file |
| `size` | integer | read-only | Sound file size (in bytes) |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "description": "string",
  "filename": "string",
  "getUrl": "string",
  "id": 0,
  "putUrl": "string",
  "size": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/sounds/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/sounds/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/sounds/{id}");

print_r($result);
?>
```

## Create a sound

`POST /1.0/telephony/sounds`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-sounds

**Status:** Stable production version  
**IAM actions:** `account:apiovh:voip/sounds/create`

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Sound description |
| `filename` | string | yes | Sound filename |

```json
{
  "description": "string",
  "filename": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Sound | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Sound creation date |
| `description` | string |  | Sound description |
| `filename` | string |  | Sound filename |
| `getUrl` | string | read-only | URL to get sound file |
| `id` | integer | read-only | Sound ID |
| `putUrl` | string | read-only | URL to upload sound file |
| `size` | integer | read-only | Sound file size (in bytes) |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "description": "string",
  "filename": "string",
  "getUrl": "string",
  "id": 0,
  "putUrl": "string",
  "size": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/sounds" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/sounds",
	description = None, # Sound description (type: string, nullable)
	filename = None, # Sound filename (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/sounds", array(
	description => null, // Sound description (type: string, nullable)
	filename => null, // Sound filename (type: string)
));

print_r($result);
?>
```

## Delete a sound

`DELETE /1.0/telephony/sounds/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-sounds-id

**Status:** Stable production version  
**IAM actions:** `account:apiovh:voip/sounds/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Sound ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/sounds/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/sounds/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/sounds/{id}");

print_r($result);
?>
```

## Update a sound

`PUT /1.0/telephony/sounds/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-sounds-id

**Status:** Stable production version  
**IAM actions:** `account:apiovh:voip/sounds/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Sound ID |

### Request body (required)

Type: `telephony.Sound`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Sound creation date |
| `description` | string |  | Sound description |
| `filename` | string |  | Sound filename |
| `getUrl` | string | read-only | URL to get sound file |
| `id` | integer | read-only | Sound ID |
| `putUrl` | string | read-only | URL to upload sound file |
| `size` | integer | read-only | Sound file size (in bytes) |

```json
{
  "description": "string",
  "filename": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/sounds/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.Sound
result = client.put("/telephony/sounds/{id}",
	description = None, # Sound description (type: string, nullable)
	filename = None, # Sound filename (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.Sound
$result = $ovh->put("/telephony/sounds/{id}", array(
	description => null, // Sound description (type: string, nullable)
	filename => null, // Sound filename (type: string)
));

print_r($result);
?>
```

## List PBX services

`GET /1.0/telephony/{billingAccount}/ovhPabx`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx");

print_r($result);
?>
```

## Get a PBX service

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabx | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Description of the service |
| `featureType` | telephony.TypeEnum | read-only | Feature of the service — one of `aiAgent`, `carrierSip`, `cloudHunting`, `cloudIvr`, `conference`, `contactCenterSolution`, `contactCenterSolutionExpert`, `ddi`, `easyHunting`, `empty`, `fax`, `freefax`, … |
| `isCCS` | boolean | read-only | Does the service have extended CCS options enabled? |
| `serviceName` | string | read-only |  |
| `serviceType` | telephony.TypeServiceEnum | read-only | General type of the service — one of `alias`, `line` |

```json
{
  "description": "string",
  "featureType": "aiAgent",
  "isCCS": true,
  "serviceName": "string",
  "serviceType": "alias"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}");

print_r($result);
?>
```

## Update a PBX service

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabx`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Description of the service |
| `featureType` | telephony.TypeEnum | read-only | Feature of the service — one of `aiAgent`, `carrierSip`, `cloudHunting`, `cloudIvr`, `conference`, `contactCenterSolution`, `contactCenterSolutionExpert`, `ddi`, `easyHunting`, `empty`, `fax`, `freefax`, … |
| `isCCS` | boolean | read-only | Does the service have extended CCS options enabled? |
| `serviceName` | string | read-only |  |
| `serviceType` | telephony.TypeServiceEnum | read-only | General type of the service — one of `alias`, `line` |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabx
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}",
	description = None, # Description of the service (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabx
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}", array(
	description => null, // Description of the service (type: string)
));

print_r($result);
?>
```

## List dialplans

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan");

print_r($result);
?>
```

## Get a dialplan

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplan | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `anonymousRejection` | boolean |  | Reject (hangup) anonymous calls |
| `dialplanId` | integer | read-only |  |
| `lastUpdate` | string (date-time) | read-only |  |
| `name` | string |  | The dialplan name |
| `showCallerNumber` | telephony.OvhPabxDialplanNumberPresentationEnum |  | The presented number when bridging calls — one of `alias`, `both`, `caller` |
| `transferTimeout` | integer |  | The timeout (in seconds) when bridging calls |

```json
{
  "anonymousRejection": true,
  "dialplanId": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "showCallerNumber": "alias",
  "transferTimeout": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}");

print_r($result);
?>
```

## Create a dialplan

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-dialplan

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `anonymousRejection` | boolean | yes | Reject (hangup) anonymous calls |
| `name` | string | yes | The dialplan name |
| `showCallerNumber` | telephony.OvhPabxDialplanNumberPresentationEnum | yes | The presented number when bridging calls — one of `alias`, `both`, `caller` |
| `transferTimeout` | integer | yes | The timeout (in seconds) when bridging calls |

```json
{
  "anonymousRejection": true,
  "name": "string",
  "showCallerNumber": "alias",
  "transferTimeout": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplan | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `anonymousRejection` | boolean |  | Reject (hangup) anonymous calls |
| `dialplanId` | integer | read-only |  |
| `lastUpdate` | string (date-time) | read-only |  |
| `name` | string |  | The dialplan name |
| `showCallerNumber` | telephony.OvhPabxDialplanNumberPresentationEnum |  | The presented number when bridging calls — one of `alias`, `both`, `caller` |
| `transferTimeout` | integer |  | The timeout (in seconds) when bridging calls |

```json
{
  "anonymousRejection": true,
  "dialplanId": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "showCallerNumber": "alias",
  "transferTimeout": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan",
	anonymousRejection = None, # Reject (hangup) anonymous calls (type: boolean)
	name = None, # The dialplan name (type: string)
	showCallerNumber = None, # The presented number when bridging calls (type: telephony.OvhPabxDialplanNumberPresentationEnum)
	transferTimeout = None, # The timeout (in seconds) when bridging calls (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan", array(
	anonymousRejection => null, // Reject (hangup) anonymous calls (type: boolean)
	name => null, // The dialplan name (type: string)
	showCallerNumber => null, // The presented number when bridging calls (type: telephony.OvhPabxDialplanNumberPresentationEnum)
	transferTimeout => null, // The timeout (in seconds) when bridging calls (type: long)
));

print_r($result);
?>
```

## Delete a dialplan

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}");

print_r($result);
?>
```

## Update a dialplan

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxDialplan`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `anonymousRejection` | boolean |  | Reject (hangup) anonymous calls |
| `dialplanId` | integer | read-only |  |
| `lastUpdate` | string (date-time) | read-only |  |
| `name` | string |  | The dialplan name |
| `showCallerNumber` | telephony.OvhPabxDialplanNumberPresentationEnum |  | The presented number when bridging calls — one of `alias`, `both`, `caller` |
| `transferTimeout` | integer |  | The timeout (in seconds) when bridging calls |

```json
{
  "anonymousRejection": true,
  "name": "string",
  "showCallerNumber": "alias",
  "transferTimeout": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxDialplan
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}",
	anonymousRejection = None, # Reject (hangup) anonymous calls (type: boolean)
	name = None, # The dialplan name (type: string)
	showCallerNumber = None, # The presented number when bridging calls (type: telephony.OvhPabxDialplanNumberPresentationEnum)
	transferTimeout = None, # The timeout (in seconds) when bridging calls (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxDialplan
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}", array(
	anonymousRejection => null, // Reject (hangup) anonymous calls (type: boolean)
	name => null, // The dialplan name (type: string)
	showCallerNumber => null, // The presented number when bridging calls (type: telephony.OvhPabxDialplanNumberPresentationEnum)
	transferTimeout => null, // The timeout (in seconds) when bridging calls (type: integer)
));

print_r($result);
?>
```

## List extensions

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension");

print_r($result);
?>
```

## Get an extension

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtension | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  | True if the extension is enabled |
| `extensionId` | integer | read-only |  |
| `position` | integer |  | The position of the extension in the dialplan (the extensions are executed following this order) |
| `schedulerCategory` | telephony.SchedulerCategoryEnum |  | Additionnal conditions are used from this chosen scheduler category — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum |  | The type of the screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "enabled": true,
  "extensionId": 0,
  "position": 0,
  "schedulerCategory": "holidays",
  "screenListType": "destinationBlackList"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}");

print_r($result);
?>
```

## Create an extension

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enable` | boolean | yes | True to enable the extension |
| `position` | integer | yes | The position of the extension in the dialplan (the extensions are executed following this order) |
| `schedulerCategory` | telephony.SchedulerCategoryEnum |  | Additionnal conditions will be used from this chosen scheduler category — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum |  | The type of the screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "enable": true,
  "position": 0,
  "schedulerCategory": "holidays",
  "screenListType": "destinationBlackList"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtension | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  | True if the extension is enabled |
| `extensionId` | integer | read-only |  |
| `position` | integer |  | The position of the extension in the dialplan (the extensions are executed following this order) |
| `schedulerCategory` | telephony.SchedulerCategoryEnum |  | Additionnal conditions are used from this chosen scheduler category — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum |  | The type of the screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "enabled": true,
  "extensionId": 0,
  "position": 0,
  "schedulerCategory": "holidays",
  "screenListType": "destinationBlackList"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension",
	enable = None, # True to enable the extension (type: boolean)
	position = None, # The position of the extension in the dialplan (the extensions are executed following this order) (type: long)
	schedulerCategory = None, # Additionnal conditions will be used from this chosen scheduler category (type: telephony.SchedulerCategoryEnum, nullable)
	screenListType = None, # The type of the screenlist (type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension", array(
	enable => null, // True to enable the extension (type: boolean)
	position => null, // The position of the extension in the dialplan (the extensions are executed following this order) (type: long)
	schedulerCategory => null, // Additionnal conditions will be used from this chosen scheduler category (type: telephony.SchedulerCategoryEnum, nullable)
	screenListType => null, // The type of the screenlist (type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum, nullable)
));

print_r($result);
?>
```

## Delete an extension

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}");

print_r($result);
?>
```

## Update an extension

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxDialplanExtension`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  | True if the extension is enabled |
| `extensionId` | integer | read-only |  |
| `position` | integer |  | The position of the extension in the dialplan (the extensions are executed following this order) |
| `schedulerCategory` | telephony.SchedulerCategoryEnum |  | Additionnal conditions are used from this chosen scheduler category — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum |  | The type of the screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "enabled": true,
  "position": 0,
  "schedulerCategory": "holidays",
  "screenListType": "destinationBlackList"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxDialplanExtension
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}",
	enabled = None, # True if the extension is enabled (type: boolean)
	position = None, # The position of the extension in the dialplan (the extensions are executed following this order) (type: integer)
	schedulerCategory = None, # Additionnal conditions are used from this chosen scheduler category (type: telephony.SchedulerCategoryEnum, nullable)
	screenListType = None, # The type of the screenlist (type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxDialplanExtension
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}", array(
	enabled => null, // True if the extension is enabled (type: boolean)
	position => null, // The position of the extension in the dialplan (the extensions are executed following this order) (type: integer)
	schedulerCategory => null, // Additionnal conditions are used from this chosen scheduler category (type: telephony.SchedulerCategoryEnum, nullable)
	screenListType => null, // The type of the screenlist (type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum, nullable)
));

print_r($result);
?>
```

## List filtering conditions

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditionscreenlist

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionScreenList/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList");

print_r($result);
?>
```

## Get a filtering condition

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditionscreenlist-conditionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionScreenList/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `conditionId` | path | integer | yes |  |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtensionConditionScreenList | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callerIdNumber` | string | read-only | Screenlist based on the presented caller number |
| `conditionId` | integer | read-only |  |
| `destinationNumber` | string | read-only | Screenlist based on the destination number |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum | read-only | Type of screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "callerIdNumber": "string",
  "conditionId": 0,
  "destinationNumber": "string",
  "screenListType": "destinationBlackList"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}");

print_r($result);
?>
```

## Create a filtering condition

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditionscreenlist

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionScreenList/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callerIdNumber` | string |  | Add a screenlist based on the presented caller number |
| `destinationNumber` | string |  | Add a screenlist based on the destination number |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum |  | Type of screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "callerIdNumber": "string",
  "destinationNumber": "string",
  "screenListType": "destinationBlackList"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtensionConditionScreenList | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callerIdNumber` | string | read-only | Screenlist based on the presented caller number |
| `conditionId` | integer | read-only |  |
| `destinationNumber` | string | read-only | Screenlist based on the destination number |
| `screenListType` | telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum | read-only | Type of screenlist — one of `destinationBlackList`, `destinationWhiteList`, `incomingBlackList`, `incomingWhiteList` |

```json
{
  "callerIdNumber": "string",
  "conditionId": 0,
  "destinationNumber": "string",
  "screenListType": "destinationBlackList"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList",
	callerIdNumber = None, # Add a screenlist based on the presented caller number (type: string, nullable)
	destinationNumber = None, # Add a screenlist based on the destination number (type: string, nullable)
	screenListType = None, # Type of screenlist (type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList", array(
	callerIdNumber => null, // Add a screenlist based on the presented caller number (type: string, nullable)
	destinationNumber => null, // Add a screenlist based on the destination number (type: string, nullable)
	screenListType => null, // Type of screenlist (type: telephony.OvhPabxDialplanExtensionConditionScreenListTypeEnum, nullable)
));

print_r($result);
?>
```

## Delete a filtering condition

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditionscreenlist-conditionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionScreenList/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `conditionId` | path | integer | yes |  |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList/{conditionId}");

print_r($result);
?>
```

## List time conditions

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditiontime

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionTime/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime");

print_r($result);
?>
```

## Get a time condition

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditiontime-conditionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionTime/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `conditionId` | path | integer | yes |  |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtensionConditionTime | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conditionId` | integer | read-only |  |
| `timeFrom` | time |  | The time of the day when the extension will start to be executed |
| `timeTo` | time |  | The time of the day when the extension will stop to be executed |
| `weekDay` | telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum |  | The day of the week when the extension will be executed — one of `friday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |

```json
{
  "conditionId": 0,
  "timeFrom": "15:04:05",
  "timeTo": "15:04:05",
  "weekDay": "friday"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}");

print_r($result);
?>
```

## Create a time condition

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditiontime

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionTime/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timeFrom` | time | yes | The time of the day when the extension will start to be executed |
| `timeTo` | time | yes | The time of the day when the extension will stop to be executed |
| `weekDay` | telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum | yes | The day of the week when the extension will be executed — one of `friday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |

```json
{
  "timeFrom": "15:04:05",
  "timeTo": "15:04:05",
  "weekDay": "friday"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtensionConditionTime | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conditionId` | integer | read-only |  |
| `timeFrom` | time |  | The time of the day when the extension will start to be executed |
| `timeTo` | time |  | The time of the day when the extension will stop to be executed |
| `weekDay` | telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum |  | The day of the week when the extension will be executed — one of `friday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |

```json
{
  "conditionId": 0,
  "timeFrom": "15:04:05",
  "timeTo": "15:04:05",
  "weekDay": "friday"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime",
	timeFrom = None, # The time of the day when the extension will start to be executed (type: time)
	timeTo = None, # The time of the day when the extension will stop to be executed (type: time)
	weekDay = None, # The day of the week when the extension will be executed (type: telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime", array(
	timeFrom => null, // The time of the day when the extension will start to be executed (type: time)
	timeTo => null, // The time of the day when the extension will stop to be executed (type: time)
	weekDay => null, // The day of the week when the extension will be executed (type: telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum)
));

print_r($result);
?>
```

## Delete a time condition

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditiontime-conditionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionTime/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `conditionId` | path | integer | yes |  |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}");

print_r($result);
?>
```

## Update a time condition

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-conditiontime-conditionid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/conditionTime/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `conditionId` | path | integer | yes |  |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxDialplanExtensionConditionTime`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conditionId` | integer | read-only |  |
| `timeFrom` | time |  | The time of the day when the extension will start to be executed |
| `timeTo` | time |  | The time of the day when the extension will stop to be executed |
| `weekDay` | telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum |  | The day of the week when the extension will be executed — one of `friday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |

```json
{
  "timeFrom": "15:04:05",
  "timeTo": "15:04:05",
  "weekDay": "friday"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxDialplanExtensionConditionTime
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}",
	timeFrom = None, # The time of the day when the extension will start to be executed (type: time)
	timeTo = None, # The time of the day when the extension will stop to be executed (type: time)
	weekDay = None, # The day of the week when the extension will be executed (type: telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxDialplanExtensionConditionTime
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}", array(
	timeFrom => null, // The time of the day when the extension will start to be executed (type: time)
	timeTo => null, // The time of the day when the extension will stop to be executed (type: time)
	weekDay => null, // The day of the week when the extension will be executed (type: telephony.OvhPabxDialplanExtensionConditionTimeWeekDayEnum)
));

print_r($result);
?>
```

## List extension rules

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-rule

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/rule/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule");

print_r($result);
?>
```

## Get an extension rule

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-rule-ruleid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/rule/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `ruleId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtensionRule | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxDialplanExtensionRuleActionEnum |  | The action made by the rule — one of `bridge`, `endless_playback`, `hangup`, `hunting`, `ivr`, `playback`, `readDtmf`, `setCallerName`, `sleep`, `tts`, `voicemail` |
| `actionParam` | string |  | The parameter of the chosen action |
| `negativeAction` | boolean |  | If true, the rule will be executed only when the result of the conditions is false |
| `position` | integer |  | The position of the rule in the extension (the rules are executed following this order) |
| `ruleId` | integer | read-only |  |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "negativeAction": true,
  "position": 0,
  "ruleId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}");

print_r($result);
?>
```

## Create an extension rule

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-rule

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/rule/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxDialplanExtensionRuleActionEnum | yes | The action made by the rule — one of `bridge`, `endless_playback`, `hangup`, `hunting`, `ivr`, `playback`, `readDtmf`, `setCallerName`, `sleep`, `tts`, `voicemail` |
| `actionParam` | string |  | The parameter of the chosen action |
| `negativeAction` | boolean | yes | If true, the rule will be executed only when the result of the conditions is false |
| `position` | integer | yes | The position of the rule in the extension (the rules are executed following this order) |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "negativeAction": true,
  "position": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxDialplanExtensionRule | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxDialplanExtensionRuleActionEnum |  | The action made by the rule — one of `bridge`, `endless_playback`, `hangup`, `hunting`, `ivr`, `playback`, `readDtmf`, `setCallerName`, `sleep`, `tts`, `voicemail` |
| `actionParam` | string |  | The parameter of the chosen action |
| `negativeAction` | boolean |  | If true, the rule will be executed only when the result of the conditions is false |
| `position` | integer |  | The position of the rule in the extension (the rules are executed following this order) |
| `ruleId` | integer | read-only |  |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "negativeAction": true,
  "position": 0,
  "ruleId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule",
	action = None, # The action made by the rule (type: telephony.OvhPabxDialplanExtensionRuleActionEnum)
	actionParam = None, # The parameter of the chosen action (type: string, nullable)
	negativeAction = None, # If true, the rule will be executed only when the result of the conditions is false (type: boolean)
	position = None, # The position of the rule in the extension (the rules are executed following this order) (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule", array(
	action => null, // The action made by the rule (type: telephony.OvhPabxDialplanExtensionRuleActionEnum)
	actionParam => null, // The parameter of the chosen action (type: string, nullable)
	negativeAction => null, // If true, the rule will be executed only when the result of the conditions is false (type: boolean)
	position => null, // The position of the rule in the extension (the rules are executed following this order) (type: long)
));

print_r($result);
?>
```

## Delete an extension rule

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-rule-ruleid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/rule/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `ruleId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}");

print_r($result);
?>
```

## Update an extension rule

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-dialplan-dialplanid-extension-extensionid-rule-ruleid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/dialplan/extension/rule/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `dialplanId` | path | integer | yes |  |
| `extensionId` | path | integer | yes |  |
| `ruleId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxDialplanExtensionRule`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxDialplanExtensionRuleActionEnum |  | The action made by the rule — one of `bridge`, `endless_playback`, `hangup`, `hunting`, `ivr`, `playback`, `readDtmf`, `setCallerName`, `sleep`, `tts`, `voicemail` |
| `actionParam` | string |  | The parameter of the chosen action |
| `negativeAction` | boolean |  | If true, the rule will be executed only when the result of the conditions is false |
| `position` | integer |  | The position of the rule in the extension (the rules are executed following this order) |
| `ruleId` | integer | read-only |  |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "negativeAction": true,
  "position": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxDialplanExtensionRule
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}",
	action = None, # The action made by the rule (type: telephony.OvhPabxDialplanExtensionRuleActionEnum)
	actionParam = None, # The parameter of the chosen action (type: string, nullable)
	negativeAction = None, # If true, the rule will be executed only when the result of the conditions is false (type: boolean)
	position = None, # The position of the rule in the extension (the rules are executed following this order) (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxDialplanExtensionRule
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/rule/{ruleId}", array(
	action => null, // The action made by the rule (type: telephony.OvhPabxDialplanExtensionRuleActionEnum)
	actionParam => null, // The parameter of the chosen action (type: string, nullable)
	negativeAction => null, // If true, the rule will be executed only when the result of the conditions is false (type: boolean)
	position => null, // The position of the rule in the extension (the rules are executed following this order) (type: integer)
));

print_r($result);
?>
```

## Get the queue system settings

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHunting | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `crmUrlTemplate` | string |  | The templated url of your CRM, opened by the banner application of your cloudpabx |
| `g729` | boolean |  | Enable G729 codec on your callcenter |
| `name` | string | read-only | The name of your callcenter offer |
| `statusIvrEnabled` | boolean |  | Enable/Disable the status change IVR on your callcenter. The IVR is enabled by default. |

```json
{
  "crmUrlTemplate": "string",
  "g729": true,
  "name": "string",
  "statusIvrEnabled": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting");

print_r($result);
?>
```

## Update the queue system settings

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-hunting

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxHunting`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `crmUrlTemplate` | string |  | The templated url of your CRM, opened by the banner application of your cloudpabx |
| `g729` | boolean |  | Enable G729 codec on your callcenter |
| `name` | string | read-only | The name of your callcenter offer |
| `statusIvrEnabled` | boolean |  | Enable/Disable the status change IVR on your callcenter. The IVR is enabled by default. |

```json
{
  "crmUrlTemplate": "string",
  "g729": true,
  "statusIvrEnabled": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxHunting
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting",
	crmUrlTemplate = None, # The templated url of your CRM, opened by the banner application of your cloudpabx (type: string, nullable)
	g729 = None, # Enable G729 codec on your callcenter (type: boolean, nullable)
	statusIvrEnabled = None, # Enable/Disable the status change IVR on your callcenter. The IVR is enabled by default. (type: boolean)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxHunting
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting", array(
	crmUrlTemplate => null, // The templated url of your CRM, opened by the banner application of your cloudpabx (type: string, nullable)
	g729 => null, // Enable G729 codec on your callcenter (type: boolean, nullable)
	statusIvrEnabled => null, // Enable/Disable the status change IVR on your callcenter. The IVR is enabled by default. (type: boolean)
));

print_r($result);
?>
```

## List agents

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent");

print_r($result);
?>
```

## Get an agent

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `breakStatus` | integer |  | The id of the current break status of the agent |
| `description` | string |  | The agent's description |
| `number` | phoneNumber |  | The number of the agent |
| `simultaneousLines` | integer |  | The maximum of simultaneous calls that the agent will receive from the hunting |
| `status` | telephony.OvhPabxHuntingAgentStatusEnum |  | The current status of the agent — one of `available`, `loggedOut`, `onBreak` |
| `timeout` | integer |  | The waiting timeout (in seconds) before hangup an assigned called |
| `type` | telephony.OvhPabxHuntingAgentTypeEnum | read-only | The agent's type — one of `external`, `internal` |
| `wrapUpTime` | integer |  | The wrap up time (in seconds) after the calls |

```json
{
  "agentId": 0,
  "breakStatus": 0,
  "description": "string",
  "number": "string",
  "simultaneousLines": 0,
  "status": "available",
  "timeout": 0,
  "type": "external",
  "wrapUpTime": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}");

print_r($result);
?>
```

## Create an agent

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | The agent's description |
| `number` | phoneNumber | yes | The number of the agent |
| `simultaneousLines` | integer | yes | The maximum of simultaneous calls that the agent will receive from the hunting |
| `status` | telephony.OvhPabxHuntingAgentStatusEnum | yes | The current status of the agent — one of `available`, `loggedOut`, `onBreak` |
| `timeout` | integer | yes | The waiting timeout (in seconds) before hangup for an assigned called |
| `wrapUpTime` | integer | yes | The wrap up time (in seconds) after the calls |

```json
{
  "description": "string",
  "number": "string",
  "simultaneousLines": 0,
  "status": "available",
  "timeout": 0,
  "wrapUpTime": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `breakStatus` | integer |  | The id of the current break status of the agent |
| `description` | string |  | The agent's description |
| `number` | phoneNumber |  | The number of the agent |
| `simultaneousLines` | integer |  | The maximum of simultaneous calls that the agent will receive from the hunting |
| `status` | telephony.OvhPabxHuntingAgentStatusEnum |  | The current status of the agent — one of `available`, `loggedOut`, `onBreak` |
| `timeout` | integer |  | The waiting timeout (in seconds) before hangup an assigned called |
| `type` | telephony.OvhPabxHuntingAgentTypeEnum | read-only | The agent's type — one of `external`, `internal` |
| `wrapUpTime` | integer |  | The wrap up time (in seconds) after the calls |

```json
{
  "agentId": 0,
  "breakStatus": 0,
  "description": "string",
  "number": "string",
  "simultaneousLines": 0,
  "status": "available",
  "timeout": 0,
  "type": "external",
  "wrapUpTime": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent",
	description = None, # The agent's description (type: string, nullable)
	number = None, # The number of the agent (type: phoneNumber)
	simultaneousLines = None, # The maximum of simultaneous calls that the agent will receive from the hunting (type: long)
	status = None, # The current status of the agent (type: telephony.OvhPabxHuntingAgentStatusEnum)
	timeout = None, # The waiting timeout (in seconds) before hangup for an assigned called (type: long)
	wrapUpTime = None, # The wrap up time (in seconds) after the calls (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent", array(
	description => null, // The agent's description (type: string, nullable)
	number => null, // The number of the agent (type: phoneNumber)
	simultaneousLines => null, // The maximum of simultaneous calls that the agent will receive from the hunting (type: long)
	status => null, // The current status of the agent (type: telephony.OvhPabxHuntingAgentStatusEnum)
	timeout => null, // The waiting timeout (in seconds) before hangup for an assigned called (type: long)
	wrapUpTime => null, // The wrap up time (in seconds) after the calls (type: long)
));

print_r($result);
?>
```

## Delete an agent

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}");

print_r($result);
?>
```

## Update an agent

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxHuntingAgent`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `breakStatus` | integer |  | The id of the current break status of the agent |
| `description` | string |  | The agent's description |
| `number` | phoneNumber |  | The number of the agent |
| `simultaneousLines` | integer |  | The maximum of simultaneous calls that the agent will receive from the hunting |
| `status` | telephony.OvhPabxHuntingAgentStatusEnum |  | The current status of the agent — one of `available`, `loggedOut`, `onBreak` |
| `timeout` | integer |  | The waiting timeout (in seconds) before hangup an assigned called |
| `type` | telephony.OvhPabxHuntingAgentTypeEnum | read-only | The agent's type — one of `external`, `internal` |
| `wrapUpTime` | integer |  | The wrap up time (in seconds) after the calls |

```json
{
  "breakStatus": 0,
  "description": "string",
  "number": "string",
  "simultaneousLines": 0,
  "status": "available",
  "timeout": 0,
  "wrapUpTime": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxHuntingAgent
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}",
	breakStatus = None, # The id of the current break status of the agent (type: integer, nullable)
	description = None, # The agent's description (type: string, nullable)
	number = None, # The number of the agent (type: phoneNumber)
	simultaneousLines = None, # The maximum of simultaneous calls that the agent will receive from the hunting (type: integer)
	status = None, # The current status of the agent (type: telephony.OvhPabxHuntingAgentStatusEnum)
	timeout = None, # The waiting timeout (in seconds) before hangup an assigned called (type: integer)
	wrapUpTime = None, # The wrap up time (in seconds) after the calls (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxHuntingAgent
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}", array(
	breakStatus => null, // The id of the current break status of the agent (type: integer, nullable)
	description => null, // The agent's description (type: string, nullable)
	number => null, // The number of the agent (type: phoneNumber)
	simultaneousLines => null, // The maximum of simultaneous calls that the agent will receive from the hunting (type: integer)
	status => null, // The current status of the agent (type: telephony.OvhPabxHuntingAgentStatusEnum)
	timeout => null, // The waiting timeout (in seconds) before hangup an assigned called (type: integer)
	wrapUpTime => null, // The wrap up time (in seconds) after the calls (type: integer)
));

print_r($result);
?>
```

## Get the agent banner access

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-banneraccess

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/bannerAccess/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.BannerAccess | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | The creation date of this access |
| `id` | integer | read-only |  |
| `url` | string | read-only | The url of the web access |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "url": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess");

print_r($result);
?>
```

## Create the agent banner access

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-banneraccess

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/bannerAccess/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.BannerAccess | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | The creation date of this access |
| `id` | integer | read-only |  |
| `url` | string | read-only | The url of the web access |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "url": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess");

print_r($result);
?>
```

## Delete the agent banner access

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-banneraccess

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/bannerAccess/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess");

print_r($result);
?>
```

## List agent calls

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls");

print_r($result);
?>
```

## Get a live call

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingQueueLiveCalls | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | string | read-only | Name or number of the agent who answered the call |
| `answered` | string (date-time) | read-only | Answer date of the call |
| `begin` | string (date-time) | read-only | Begin date of the call |
| `callerIdName` | string | read-only | Name of the caller (or anonymous if unknown) |
| `callerIdNumber` | string | read-only | Phone number of the caller (or anonymous if unknown) |
| `destinationNumber` | string | read-only | Phone number called (in case of an outgoing call) |
| `end` | string (date-time) | read-only | End date of the call |
| `id` | integer | read-only |  |
| `onHold` | boolean | read-only | Whether or not the call is on hold |
| `queue` | string | read-only | Name of the queue of the call |
| `state` | telephony.OvhPabxHuntingLiveCallsStateEnum | read-only | Current state of the call — one of `Answered`, `Waiting` |

```json
{
  "agent": "string",
  "answered": "2024-01-01T12:00:00Z",
  "begin": "2024-01-01T12:00:00Z",
  "callerIdName": "string",
  "callerIdNumber": "string",
  "destinationNumber": "string",
  "end": "2024-01-01T12:00:00Z",
  "id": 0,
  "onHold": true,
  "queue": "string",
  "state": "Answered"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}");

print_r($result);
?>
```

## Eavesdrop on a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/eavesdrop`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id-eavesdrop

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/eavesdrop`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number that will be called and bridged in the communication |

```json
{
  "number": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/eavesdrop" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: phoneNumber
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/eavesdrop",
	number = None, # Phone number that will be called and bridged in the communication (type: phoneNumber)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/eavesdrop", array(
	number => null, // Phone number that will be called and bridged in the communication (type: phoneNumber)
));

print_r($result);
?>
```

## Hang up a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hangup`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id-hangup

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/hangup`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hangup" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hangup")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hangup");

print_r($result);
?>
```

## Toggle hold on a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hold`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id-hold

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/hold`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hold" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hold")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/hold");

print_r($result);
?>
```

## Intercept an unanswered call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/intercept`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id-intercept

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/intercept`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number that will be called and that will intercept the communication |

```json
{
  "number": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/intercept" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: phoneNumber
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/intercept",
	number = None, # Phone number that will be called and that will intercept the communication (type: phoneNumber)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/intercept", array(
	number => null, // Phone number that will be called and that will intercept the communication (type: phoneNumber)
));

print_r($result);
?>
```

## Transfer an answered call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/transfer`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id-transfer

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/transfer`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number to whom the communication will be transfered |

```json
{
  "number": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/transfer" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: phoneNumber
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/transfer",
	number = None, # Phone number to whom the communication will be transfered (type: phoneNumber)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/transfer", array(
	number => null, // Phone number to whom the communication will be transfered (type: phoneNumber)
));

print_r($result);
?>
```

## Whisper on a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/whisper`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-calls-id-whisper

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/calls/whisper`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number that will be called and bridged in the communication |
| `whisperingMode` | telephony.OvhPabxWhisperingModeEnum | yes | Whispering mode — one of `Whisper to agent only`, `Whisper to all participants` |

```json
{
  "number": "string",
  "whisperingMode": "Whisper to agent only"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/whisper" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/whisper",
	number = None, # Phone number that will be called and bridged in the communication (type: phoneNumber)
	whisperingMode = None, # Whispering mode (type: telephony.OvhPabxWhisperingModeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/calls/{id}/whisper", array(
	number => null, // Phone number that will be called and bridged in the communication (type: phoneNumber)
	whisperingMode => null, // Whispering mode (type: telephony.OvhPabxWhisperingModeEnum)
));

print_r($result);
?>
```

## Get the event token

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-eventtoken

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/eventToken/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.EventToken | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | read-only |  |

```json
{
  "token": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken");

print_r($result);
?>
```

## Create an event token

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-eventtoken

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/eventToken/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expiration` | telephony.TokenExpirationEnum | yes | Time to live in seconds for the token — one of `1 day`, `1 hour`, `30 days`, `5 minutes`, `unlimited` |

```json
{
  "expiration": "1 day"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.TokenExpirationEnum
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken",
	expiration = None, # Time to live in seconds for the token (type: telephony.TokenExpirationEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.TokenExpirationEnum
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken", array(
	expiration => null, // Time to live in seconds for the token (type: telephony.TokenExpirationEnum)
));

print_r($result);
?>
```

## Delete the event token

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-eventtoken

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/eventToken/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/eventToken");

print_r($result);
?>
```

## Get the agent live status

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/liveStatus`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-livestatus

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/liveStatus/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentLiveStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `answeredCalls` | integer | read-only | The number of calls this agent took on the current day |
| `lastStatusChange` | string (date-time) | read-only | Last status change date |
| `status` | telephony.OvhPabxHuntingLiveAgentStatusEnum | read-only | Current status of the agent — one of `inAQueueCall`, `loggedOut`, `onBreak`, `receiving`, `waiting` |
| `totalCallDuration` | integer | read-only | The total duration in seconds of the calls this agent took on the current day |

```json
{
  "answeredCalls": 0,
  "lastStatusChange": "2024-01-01T12:00:00Z",
  "status": "inAQueueCall",
  "totalCallDuration": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/liveStatus" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/liveStatus")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/liveStatus");

print_r($result);
?>
```

## List the queues of an agent

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-queue

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/queue/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue");

print_r($result);
?>
```

## Get an agent position in a queue

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-queue-queueid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/queue/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentQueue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `position` | integer |  | The position in the queue |
| `queueId` | integer | read-only |  |

```json
{
  "agentId": 0,
  "position": 0,
  "queueId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}");

print_r($result);
?>
```

## Assign an agent to a queue

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-queue

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/queue/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `position` | integer | yes | The position of the agent in the queue |
| `queueId` | integer | yes | The queue where you want to add the agent |

```json
{
  "position": 0,
  "queueId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentQueue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `position` | integer |  | The position in the queue |
| `queueId` | integer | read-only |  |

```json
{
  "agentId": 0,
  "position": 0,
  "queueId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue",
	position = None, # The position of the agent in the queue (type: long)
	queueId = None, # The queue where you want to add the agent (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue", array(
	position => null, // The position of the agent in the queue (type: long)
	queueId => null, // The queue where you want to add the agent (type: long)
));

print_r($result);
?>
```

## Remove an agent from a queue

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-queue-queueid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/queue/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}");

print_r($result);
?>
```

## Update an agent position in a queue

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-queue-queueid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/queue/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxHuntingAgentQueue`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `position` | integer |  | The position in the queue |
| `queueId` | integer | read-only |  |

```json
{
  "position": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxHuntingAgentQueue
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}",
	position = None, # The position in the queue (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxHuntingAgentQueue
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}", array(
	position => null, // The position in the queue (type: integer)
));

print_r($result);
?>
```

## Get the agent live status

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}/liveStatus`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-agent-agentid-queue-queueid-livestatus

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/agent/queue/liveStatus/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentLiveStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `answeredCalls` | integer | read-only | The number of calls this agent took on the current day |
| `lastStatusChange` | string (date-time) | read-only | Last status change date |
| `status` | telephony.OvhPabxHuntingLiveAgentStatusEnum | read-only | Current status of the agent — one of `inAQueueCall`, `loggedOut`, `onBreak`, `receiving`, `waiting` |
| `totalCallDuration` | integer | read-only | The total duration in seconds of the calls this agent took on the current day |

```json
{
  "answeredCalls": 0,
  "lastStatusChange": "2024-01-01T12:00:00Z",
  "status": "inAQueueCall",
  "totalCallDuration": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}/liveStatus" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}/liveStatus")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/queue/{queueId}/liveStatus");

print_r($result);
?>
```

## List custom statuses

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-customstatus

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/customStatus/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus");

print_r($result);
?>
```

## Get a custom status

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-customstatus-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/customStatus/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxCustomStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | string | read-only | The color (in hexadecimal) of the status that will be displayed on agent banner web application |
| `description` | string | read-only | A short description of the status |
| `id` | integer | read-only |  |
| `name` | string | read-only | The name of the status (Pause, Mission, etc...) |

```json
{
  "color": "string",
  "description": "string",
  "id": 0,
  "name": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}");

print_r($result);
?>
```

## Create a custom status

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-customstatus

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/customStatus/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | string |  | The color (in hexadecimal) of the status that will be displayed on agent banner web application |
| `description` | string |  | A short description of the status |
| `name` | string | yes | The name of the status (Pause, Mission, etc...) |

```json
{
  "color": "string",
  "description": "string",
  "name": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxCustomStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | string | read-only | The color (in hexadecimal) of the status that will be displayed on agent banner web application |
| `description` | string | read-only | A short description of the status |
| `id` | integer | read-only |  |
| `name` | string | read-only | The name of the status (Pause, Mission, etc...) |

```json
{
  "color": "string",
  "description": "string",
  "id": 0,
  "name": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus",
	color = None, # The color (in hexadecimal) of the status that will be displayed on agent banner web application (type: string, nullable)
	description = None, # A short description of the status (type: string, nullable)
	name = None, # The name of the status (Pause, Mission, etc...) (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus", array(
	color => null, // The color (in hexadecimal) of the status that will be displayed on agent banner web application (type: string, nullable)
	description => null, // A short description of the status (type: string, nullable)
	name => null, // The name of the status (Pause, Mission, etc...) (type: string)
));

print_r($result);
?>
```

## Delete a custom status

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-customstatus-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/customStatus/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}");

print_r($result);
?>
```

## Get the event token

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-eventtoken

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/eventToken/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.EventToken | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | read-only |  |

```json
{
  "token": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken");

print_r($result);
?>
```

## Create an event token

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-eventtoken

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/eventToken/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expiration` | telephony.TokenExpirationEnum | yes | Time to live in seconds for the token — one of `1 day`, `1 hour`, `30 days`, `5 minutes`, `unlimited` |

```json
{
  "expiration": "1 day"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.TokenExpirationEnum
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken",
	expiration = None, # Time to live in seconds for the token (type: telephony.TokenExpirationEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.TokenExpirationEnum
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken", array(
	expiration => null, // Time to live in seconds for the token (type: telephony.TokenExpirationEnum)
));

print_r($result);
?>
```

## Delete the event token

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-eventtoken

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/eventToken/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/eventToken");

print_r($result);
?>
```

## List queues

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue");

print_r($result);
?>
```

## Get a queue

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingQueue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actionOnClosure` | telephony.OvhPabxQueueActionEnum |  | Action executed when there is no member in queue — one of `playback`, `voicemail` |
| `actionOnClosureParam` | string |  | The additionnal parameter of the on closure action |
| `actionOnOverflow` | telephony.OvhPabxQueueActionEnum |  | Action executed when caller enters a full queue — one of `playback`, `voicemail` |
| `actionOnOverflowParam` | string |  | The additionnal parameter of the overflow action |
| `askForRecordDisabling` | boolean |  | Allow the caller to disable call record by pressing a key |
| `confirmKey` | telephony.OvhPabxIvrMenuKeyEnum |  | The key that tells the IVR that digit-entry is finished. Also used as a "repeat" key in the menus when no input is expected. — one of `#`, `*`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `description` | string |  | The name of the queue |
| `followCallForwards` | boolean |  | Follow the calls forwarding |
| `maxMember` | integer |  | The maximum of people waiting in the queue |
| `maxWaitTime` | integer |  | The maximum waiting time (in seconds) in the queue |
| `queueId` | integer | read-only |  |
| `record` | boolean |  | Enable record on calls in queue |
| `recordDisablingDigit` | telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum |  | Key to press to disable record — one of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `recordDisablingLanguage` | telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum |  | Language of the sound played to the caller to inform that he can disable record — one of `english`, `french` |
| `soundOnHold` | integer |  | The id of the OvhPabxSound played to caller when on hold |
| `strategy` | telephony.OvhPabxHuntingQueueStrategyEnum |  | The calls dispatching strategy — one of `cumulationByAgentOrder`, `longestHangupAgent`, `longestIdleAgent`, `random`, `ringAll`, `roundRobin`, `sequentiallyByAgentOrder` |

```json
{
  "actionOnClosure": "playback",
  "actionOnClosureParam": "string",
  "actionOnOverflow": "playback",
  "actionOnOverflowParam": "string",
  "askForRecordDisabling": true,
  "confirmKey": "#",
  "description": "string",
  "followCallForwards": true,
  "maxMember": 0,
  "maxWaitTime": 0,
  "queueId": 0,
  "record": true,
  "recordDisablingDigit": 0,
  "recordDisablingLanguage": "english",
  "soundOnHold": 0,
  "strategy": "cumulationByAgentOrder"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}");

print_r($result);
?>
```

## Create a queue

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actionOnClosure` | telephony.OvhPabxQueueActionEnum |  | Action executed when there is no member in queue — one of `playback`, `voicemail` |
| `actionOnClosureParam` | string |  | The additionnal parameter of the on closure action |
| `actionOnOverflow` | telephony.OvhPabxQueueActionEnum |  | Action executed when caller enters a full queue — one of `playback`, `voicemail` |
| `actionOnOverflowParam` | string |  | The additionnal parameter of the overflow action |
| `askForRecordDisabling` | boolean |  | Allow the caller to disable call record by pressing a key |
| `description` | string |  | The name of the queue |
| `maxMember` | integer |  | The maximum of people waiting in the queue |
| `maxWaitTime` | integer |  | The maximum waiting time (in seconds) in the queue |
| `record` | boolean |  | Enable record on calls in queue |
| `recordDisablingDigit` | telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum |  | Key to press to disable record — one of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `recordDisablingLanguage` | telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum |  | Language of the sound played to the caller to inform that he can disable record — one of `english`, `french` |
| `soundOnHold` | integer |  | The id of the OvhPabxSound played to caller when on hold |
| `strategy` | telephony.OvhPabxHuntingQueueStrategyEnum | yes | The calls dispatching strategy — one of `cumulationByAgentOrder`, `longestHangupAgent`, `longestIdleAgent`, `random`, `ringAll`, `roundRobin`, `sequentiallyByAgentOrder` |

```json
{
  "actionOnClosure": "playback",
  "actionOnClosureParam": "string",
  "actionOnOverflow": "playback",
  "actionOnOverflowParam": "string",
  "askForRecordDisabling": true,
  "description": "string",
  "maxMember": 0,
  "maxWaitTime": 0,
  "record": true,
  "recordDisablingDigit": 0,
  "recordDisablingLanguage": "english",
  "soundOnHold": 0,
  "strategy": "cumulationByAgentOrder"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingQueue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actionOnClosure` | telephony.OvhPabxQueueActionEnum |  | Action executed when there is no member in queue — one of `playback`, `voicemail` |
| `actionOnClosureParam` | string |  | The additionnal parameter of the on closure action |
| `actionOnOverflow` | telephony.OvhPabxQueueActionEnum |  | Action executed when caller enters a full queue — one of `playback`, `voicemail` |
| `actionOnOverflowParam` | string |  | The additionnal parameter of the overflow action |
| `askForRecordDisabling` | boolean |  | Allow the caller to disable call record by pressing a key |
| `confirmKey` | telephony.OvhPabxIvrMenuKeyEnum |  | The key that tells the IVR that digit-entry is finished. Also used as a "repeat" key in the menus when no input is expected. — one of `#`, `*`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `description` | string |  | The name of the queue |
| `followCallForwards` | boolean |  | Follow the calls forwarding |
| `maxMember` | integer |  | The maximum of people waiting in the queue |
| `maxWaitTime` | integer |  | The maximum waiting time (in seconds) in the queue |
| `queueId` | integer | read-only |  |
| `record` | boolean |  | Enable record on calls in queue |
| `recordDisablingDigit` | telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum |  | Key to press to disable record — one of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `recordDisablingLanguage` | telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum |  | Language of the sound played to the caller to inform that he can disable record — one of `english`, `french` |
| `soundOnHold` | integer |  | The id of the OvhPabxSound played to caller when on hold |
| `strategy` | telephony.OvhPabxHuntingQueueStrategyEnum |  | The calls dispatching strategy — one of `cumulationByAgentOrder`, `longestHangupAgent`, `longestIdleAgent`, `random`, `ringAll`, `roundRobin`, `sequentiallyByAgentOrder` |

```json
{
  "actionOnClosure": "playback",
  "actionOnClosureParam": "string",
  "actionOnOverflow": "playback",
  "actionOnOverflowParam": "string",
  "askForRecordDisabling": true,
  "confirmKey": "#",
  "description": "string",
  "followCallForwards": true,
  "maxMember": 0,
  "maxWaitTime": 0,
  "queueId": 0,
  "record": true,
  "recordDisablingDigit": 0,
  "recordDisablingLanguage": "english",
  "soundOnHold": 0,
  "strategy": "cumulationByAgentOrder"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxHuntingQueueStrategyEnum
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue",
	actionOnClosure = None, # Action executed when there is no member in queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnClosureParam = None, # The additionnal parameter of the on closure action (type: string, nullable)
	actionOnOverflow = None, # Action executed when caller enters a full queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnOverflowParam = None, # The additionnal parameter of the overflow action (type: string, nullable)
	askForRecordDisabling = None, # Allow the caller to disable call record by pressing a key (type: boolean, nullable)
	description = None, # The name of the queue (type: string, nullable)
	maxMember = None, # The maximum of people waiting in the queue (type: long, nullable)
	maxWaitTime = None, # The maximum waiting time (in seconds) in the queue (type: long, nullable)
	record = None, # Enable record on calls in queue (type: boolean, nullable)
	recordDisablingDigit = None, # Key to press to disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum, nullable)
	recordDisablingLanguage = None, # Language of the sound played to the caller to inform that he can disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum, nullable)
	soundOnHold = None, # The id of the OvhPabxSound played to caller when on hold (type: long, nullable)
	strategy = None, # The calls dispatching strategy (type: telephony.OvhPabxHuntingQueueStrategyEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxHuntingQueueStrategyEnum
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue", array(
	actionOnClosure => null, // Action executed when there is no member in queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnClosureParam => null, // The additionnal parameter of the on closure action (type: string, nullable)
	actionOnOverflow => null, // Action executed when caller enters a full queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnOverflowParam => null, // The additionnal parameter of the overflow action (type: string, nullable)
	askForRecordDisabling => null, // Allow the caller to disable call record by pressing a key (type: boolean, nullable)
	description => null, // The name of the queue (type: string, nullable)
	maxMember => null, // The maximum of people waiting in the queue (type: long, nullable)
	maxWaitTime => null, // The maximum waiting time (in seconds) in the queue (type: long, nullable)
	record => null, // Enable record on calls in queue (type: boolean, nullable)
	recordDisablingDigit => null, // Key to press to disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum, nullable)
	recordDisablingLanguage => null, // Language of the sound played to the caller to inform that he can disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum, nullable)
	soundOnHold => null, // The id of the OvhPabxSound played to caller when on hold (type: long, nullable)
	strategy => null, // The calls dispatching strategy (type: telephony.OvhPabxHuntingQueueStrategyEnum)
));

print_r($result);
?>
```

## Delete a queue

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}");

print_r($result);
?>
```

## Update a queue

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxHuntingQueue`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actionOnClosure` | telephony.OvhPabxQueueActionEnum |  | Action executed when there is no member in queue — one of `playback`, `voicemail` |
| `actionOnClosureParam` | string |  | The additionnal parameter of the on closure action |
| `actionOnOverflow` | telephony.OvhPabxQueueActionEnum |  | Action executed when caller enters a full queue — one of `playback`, `voicemail` |
| `actionOnOverflowParam` | string |  | The additionnal parameter of the overflow action |
| `askForRecordDisabling` | boolean |  | Allow the caller to disable call record by pressing a key |
| `confirmKey` | telephony.OvhPabxIvrMenuKeyEnum |  | The key that tells the IVR that digit-entry is finished. Also used as a "repeat" key in the menus when no input is expected. — one of `#`, `*`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `description` | string |  | The name of the queue |
| `followCallForwards` | boolean |  | Follow the calls forwarding |
| `maxMember` | integer |  | The maximum of people waiting in the queue |
| `maxWaitTime` | integer |  | The maximum waiting time (in seconds) in the queue |
| `queueId` | integer | read-only |  |
| `record` | boolean |  | Enable record on calls in queue |
| `recordDisablingDigit` | telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum |  | Key to press to disable record — one of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| `recordDisablingLanguage` | telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum |  | Language of the sound played to the caller to inform that he can disable record — one of `english`, `french` |
| `soundOnHold` | integer |  | The id of the OvhPabxSound played to caller when on hold |
| `strategy` | telephony.OvhPabxHuntingQueueStrategyEnum |  | The calls dispatching strategy — one of `cumulationByAgentOrder`, `longestHangupAgent`, `longestIdleAgent`, `random`, `ringAll`, `roundRobin`, `sequentiallyByAgentOrder` |

```json
{
  "actionOnClosure": "playback",
  "actionOnClosureParam": "string",
  "actionOnOverflow": "playback",
  "actionOnOverflowParam": "string",
  "askForRecordDisabling": true,
  "confirmKey": "#",
  "description": "string",
  "followCallForwards": true,
  "maxMember": 0,
  "maxWaitTime": 0,
  "record": true,
  "recordDisablingDigit": 0,
  "recordDisablingLanguage": "english",
  "soundOnHold": 0,
  "strategy": "cumulationByAgentOrder"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxHuntingQueue
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}",
	actionOnClosure = None, # Action executed when there is no member in queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnClosureParam = None, # The additionnal parameter of the on closure action (type: string, nullable)
	actionOnOverflow = None, # Action executed when caller enters a full queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnOverflowParam = None, # The additionnal parameter of the overflow action (type: string, nullable)
	askForRecordDisabling = None, # Allow the caller to disable call record by pressing a key (type: boolean, nullable)
	confirmKey = None, # The key that tells the IVR that digit-entry is finished. Also used as a "repeat" key in the menus when no input is expected. (type: telephony.OvhPabxIvrMenuKeyEnum, nullable)
	description = None, # The name of the queue (type: string, nullable)
	followCallForwards = None, # Follow the calls forwarding (type: boolean, nullable)
	maxMember = None, # The maximum of people waiting in the queue (type: integer)
	maxWaitTime = None, # The maximum waiting time (in seconds) in the queue (type: integer)
	record = None, # Enable record on calls in queue (type: boolean, nullable)
	recordDisablingDigit = None, # Key to press to disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum, nullable)
	recordDisablingLanguage = None, # Language of the sound played to the caller to inform that he can disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum, nullable)
	soundOnHold = None, # The id of the OvhPabxSound played to caller when on hold (type: integer, nullable)
	strategy = None, # The calls dispatching strategy (type: telephony.OvhPabxHuntingQueueStrategyEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxHuntingQueue
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}", array(
	actionOnClosure => null, // Action executed when there is no member in queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnClosureParam => null, // The additionnal parameter of the on closure action (type: string, nullable)
	actionOnOverflow => null, // Action executed when caller enters a full queue (type: telephony.OvhPabxQueueActionEnum, nullable)
	actionOnOverflowParam => null, // The additionnal parameter of the overflow action (type: string, nullable)
	askForRecordDisabling => null, // Allow the caller to disable call record by pressing a key (type: boolean, nullable)
	confirmKey => null, // The key that tells the IVR that digit-entry is finished. Also used as a "repeat" key in the menus when no input is expected. (type: telephony.OvhPabxIvrMenuKeyEnum, nullable)
	description => null, // The name of the queue (type: string, nullable)
	followCallForwards => null, // Follow the calls forwarding (type: boolean, nullable)
	maxMember => null, // The maximum of people waiting in the queue (type: integer)
	maxWaitTime => null, // The maximum waiting time (in seconds) in the queue (type: integer)
	record => null, // Enable record on calls in queue (type: boolean, nullable)
	recordDisablingDigit => null, // Key to press to disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingDigitEnum, nullable)
	recordDisablingLanguage => null, // Language of the sound played to the caller to inform that he can disable record (type: telephony.OvhPabxHuntingQueueRecordDisablingLanguageEnum, nullable)
	soundOnHold => null, // The id of the OvhPabxSound played to caller when on hold (type: integer, nullable)
	strategy => null, // The calls dispatching strategy (type: telephony.OvhPabxHuntingQueueStrategyEnum)
));

print_r($result);
?>
```

## List the agents of a queue

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-agent

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/agent/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent");

print_r($result);
?>
```

## Get an agent position in a queue

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-agent-agentid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/agent/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentQueue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `position` | integer |  | The position in the queue |
| `queueId` | integer | read-only |  |

```json
{
  "agentId": 0,
  "position": 0,
  "queueId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}");

print_r($result);
?>
```

## Assign an agent to a queue

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-agent

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/agent/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `position` | integer | yes | The position of the agent in the queue |
| `queueId` | integer | yes | The queue where you want to add the agent |

```json
{
  "position": 0,
  "queueId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentQueue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `position` | integer |  | The position in the queue |
| `queueId` | integer | read-only |  |

```json
{
  "agentId": 0,
  "position": 0,
  "queueId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent",
	position = None, # The position of the agent in the queue (type: long)
	queueId = None, # The queue where you want to add the agent (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent", array(
	position => null, // The position of the agent in the queue (type: long)
	queueId => null, // The queue where you want to add the agent (type: long)
));

print_r($result);
?>
```

## Remove an agent from a queue

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-agent-agentid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/agent/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}");

print_r($result);
?>
```

## Update an agent position in a queue

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-agent-agentid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/agent/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxHuntingAgentQueue`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | integer | read-only |  |
| `position` | integer |  | The position in the queue |
| `queueId` | integer | read-only |  |

```json
{
  "position": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxHuntingAgentQueue
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}",
	position = None, # The position in the queue (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxHuntingAgentQueue
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}", array(
	position => null, // The position in the queue (type: integer)
));

print_r($result);
?>
```

## Get the agent live status

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}/liveStatus`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-agent-agentid-livestatus

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/agent/liveStatus/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | integer | yes |  |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingAgentLiveStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `answeredCalls` | integer | read-only | The number of calls this agent took on the current day |
| `lastStatusChange` | string (date-time) | read-only | Last status change date |
| `status` | telephony.OvhPabxHuntingLiveAgentStatusEnum | read-only | Current status of the agent — one of `inAQueueCall`, `loggedOut`, `onBreak`, `receiving`, `waiting` |
| `totalCallDuration` | integer | read-only | The total duration in seconds of the calls this agent took on the current day |

```json
{
  "answeredCalls": 0,
  "lastStatusChange": "2024-01-01T12:00:00Z",
  "status": "inAQueueCall",
  "totalCallDuration": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}/liveStatus" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}/liveStatus")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}/liveStatus");

print_r($result);
?>
```

## List queue live calls

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls");

print_r($result);
?>
```

## Get a live call

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingQueueLiveCalls | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | string | read-only | Name or number of the agent who answered the call |
| `answered` | string (date-time) | read-only | Answer date of the call |
| `begin` | string (date-time) | read-only | Begin date of the call |
| `callerIdName` | string | read-only | Name of the caller (or anonymous if unknown) |
| `callerIdNumber` | string | read-only | Phone number of the caller (or anonymous if unknown) |
| `destinationNumber` | string | read-only | Phone number called (in case of an outgoing call) |
| `end` | string (date-time) | read-only | End date of the call |
| `id` | integer | read-only |  |
| `onHold` | boolean | read-only | Whether or not the call is on hold |
| `queue` | string | read-only | Name of the queue of the call |
| `state` | telephony.OvhPabxHuntingLiveCallsStateEnum | read-only | Current state of the call — one of `Answered`, `Waiting` |

```json
{
  "agent": "string",
  "answered": "2024-01-01T12:00:00Z",
  "begin": "2024-01-01T12:00:00Z",
  "callerIdName": "string",
  "callerIdNumber": "string",
  "destinationNumber": "string",
  "end": "2024-01-01T12:00:00Z",
  "id": 0,
  "onHold": true,
  "queue": "string",
  "state": "Answered"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}");

print_r($result);
?>
```

## Eavesdrop on a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/eavesdrop`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id-eavesdrop

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/eavesdrop`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number that will be called and bridged in the communication |

```json
{
  "number": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/eavesdrop" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: phoneNumber
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/eavesdrop",
	number = None, # Phone number that will be called and bridged in the communication (type: phoneNumber)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/eavesdrop", array(
	number => null, // Phone number that will be called and bridged in the communication (type: phoneNumber)
));

print_r($result);
?>
```

## Hang up a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hangup`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id-hangup

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/hangup`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hangup" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hangup")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hangup");

print_r($result);
?>
```

## Toggle hold on a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hold`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id-hold

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/hold`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hold" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hold")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/hold");

print_r($result);
?>
```

## Intercept an unanswered call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/intercept`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id-intercept

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/intercept`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number that will be called and that will intercept the communication |

```json
{
  "number": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/intercept" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: phoneNumber
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/intercept",
	number = None, # Phone number that will be called and that will intercept the communication (type: phoneNumber)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/intercept", array(
	number => null, // Phone number that will be called and that will intercept the communication (type: phoneNumber)
));

print_r($result);
?>
```

## Transfer an answered call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/transfer`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id-transfer

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/transfer`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number to whom the communication will be transfered |

```json
{
  "number": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/transfer" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: phoneNumber
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/transfer",
	number = None, # Phone number to whom the communication will be transfered (type: phoneNumber)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/transfer", array(
	number => null, // Phone number to whom the communication will be transfered (type: phoneNumber)
));

print_r($result);
?>
```

## Whisper on a call

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/whisper`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livecalls-id-whisper

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveCalls/whisper`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | phoneNumber | yes | Phone number that will be called and bridged in the communication |
| `whisperingMode` | telephony.OvhPabxWhisperingModeEnum | yes | Whispering mode — one of `Whisper to agent only`, `Whisper to all participants` |

```json
{
  "number": "string",
  "whisperingMode": "Whisper to agent only"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/whisper" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/whisper",
	number = None, # Phone number that will be called and bridged in the communication (type: phoneNumber)
	whisperingMode = None, # Whispering mode (type: telephony.OvhPabxWhisperingModeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveCalls/{id}/whisper", array(
	number => null, // Phone number that will be called and bridged in the communication (type: phoneNumber)
	whisperingMode => null, // Whispering mode (type: telephony.OvhPabxWhisperingModeEnum)
));

print_r($result);
?>
```

## Get queue live statistics

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveStatistics`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-hunting-queue-queueid-livestatistics

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/hunting/queue/liveStatistics/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `queueId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxHuntingQueueLiveStatistics | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callsAnswered` | integer | read-only | Total of calls answered |
| `callsLost` | integer | read-only | Total of calls lost |
| `callsTotal` | integer | read-only | Total of calls |
| `lastReset` | string (date-time) | read-only | Last reset datetime of queue's statistics |
| `totalCallDuration` | integer | read-only | Total call duration in seconds |
| `totalWaitingDuration` | integer | read-only | Total waiting duration in seconds |

```json
{
  "callsAnswered": 0,
  "callsLost": 0,
  "callsTotal": 0,
  "lastReset": "2024-01-01T12:00:00Z",
  "totalCallDuration": 0,
  "totalWaitingDuration": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveStatistics" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveStatistics")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/liveStatistics");

print_r($result);
?>
```

## List menus

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-menu

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu");

print_r($result);
?>
```

## Get a menu

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-menu-menuid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxMenu | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `greetSound` | integer |  | The id of the OvhPabxSound played to greet |
| `greetSoundTts` | integer |  | The text to speech sound played to greet |
| `interDigitTimeout` | integer |  | The timeout in milliseconds before considering the DTMF entry as done |
| `invalidSound` | integer |  | The id of the OvhPabxSound played when the caller uses an invalid DTMF |
| `invalidSoundTts` | integer |  | The text to speech sound played when the caller uses an invalid DTMF |
| `menuId` | integer | read-only |  |
| `name` | string |  | The name of the menu |
| `timeout` | integer |  | The timeout in milliseconds before ending the menu when no DTMF is received |

```json
{
  "greetSound": 0,
  "greetSoundTts": 0,
  "interDigitTimeout": 0,
  "invalidSound": 0,
  "invalidSoundTts": 0,
  "menuId": 0,
  "name": "string",
  "timeout": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}");

print_r($result);
?>
```

## Create a menu

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-menu

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `greetSound` | integer |  | The id of the OvhPabxSound played to greet |
| `greetSoundTts` | integer |  | The text to speech sound played to greet |
| `interDigitTimeout` | integer |  | The timeout in milliseconds before considering the DTMF entry as done |
| `invalidSound` | integer |  | The id of the OvhPabxSound played when the caller uses an invalid DTMF |
| `invalidSoundTts` | integer |  | The text to speech sound played when the caller uses an invalid DTMF |
| `name` | string | yes | The name of the menu |
| `timeout` | integer |  | The timeout in milliseconds before ending the menu when no DTMF is received |

```json
{
  "greetSound": 0,
  "greetSoundTts": 0,
  "interDigitTimeout": 0,
  "invalidSound": 0,
  "invalidSoundTts": 0,
  "name": "string",
  "timeout": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxMenu | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `greetSound` | integer |  | The id of the OvhPabxSound played to greet |
| `greetSoundTts` | integer |  | The text to speech sound played to greet |
| `interDigitTimeout` | integer |  | The timeout in milliseconds before considering the DTMF entry as done |
| `invalidSound` | integer |  | The id of the OvhPabxSound played when the caller uses an invalid DTMF |
| `invalidSoundTts` | integer |  | The text to speech sound played when the caller uses an invalid DTMF |
| `menuId` | integer | read-only |  |
| `name` | string |  | The name of the menu |
| `timeout` | integer |  | The timeout in milliseconds before ending the menu when no DTMF is received |

```json
{
  "greetSound": 0,
  "greetSoundTts": 0,
  "interDigitTimeout": 0,
  "invalidSound": 0,
  "invalidSoundTts": 0,
  "menuId": 0,
  "name": "string",
  "timeout": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: long
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu",
	greetSound = None, # The id of the OvhPabxSound played to greet (type: long, nullable)
	greetSoundTts = None, # The text to speech sound played to greet (type: long, nullable)
	interDigitTimeout = None, # The timeout in milliseconds before considering the DTMF entry as done (type: long, nullable)
	invalidSound = None, # The id of the OvhPabxSound played when the caller uses an invalid DTMF (type: long, nullable)
	invalidSoundTts = None, # The text to speech sound played when the caller uses an invalid DTMF (type: long, nullable)
	name = None, # The name of the menu (type: string)
	timeout = None, # The timeout in milliseconds before ending the menu when no DTMF is received (type: long, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: long
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu", array(
	greetSound => null, // The id of the OvhPabxSound played to greet (type: long, nullable)
	greetSoundTts => null, // The text to speech sound played to greet (type: long, nullable)
	interDigitTimeout => null, // The timeout in milliseconds before considering the DTMF entry as done (type: long, nullable)
	invalidSound => null, // The id of the OvhPabxSound played when the caller uses an invalid DTMF (type: long, nullable)
	invalidSoundTts => null, // The text to speech sound played when the caller uses an invalid DTMF (type: long, nullable)
	name => null, // The name of the menu (type: string)
	timeout => null, // The timeout in milliseconds before ending the menu when no DTMF is received (type: long, nullable)
));

print_r($result);
?>
```

## Delete a menu

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-menu-menuid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}");

print_r($result);
?>
```

## Update a menu

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-menu-menuid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxMenu`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `greetSound` | integer |  | The id of the OvhPabxSound played to greet |
| `greetSoundTts` | integer |  | The text to speech sound played to greet |
| `interDigitTimeout` | integer |  | The timeout in milliseconds before considering the DTMF entry as done |
| `invalidSound` | integer |  | The id of the OvhPabxSound played when the caller uses an invalid DTMF |
| `invalidSoundTts` | integer |  | The text to speech sound played when the caller uses an invalid DTMF |
| `menuId` | integer | read-only |  |
| `name` | string |  | The name of the menu |
| `timeout` | integer |  | The timeout in milliseconds before ending the menu when no DTMF is received |

```json
{
  "greetSound": 0,
  "greetSoundTts": 0,
  "interDigitTimeout": 0,
  "invalidSound": 0,
  "invalidSoundTts": 0,
  "name": "string",
  "timeout": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxMenu
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}",
	greetSound = None, # The id of the OvhPabxSound played to greet (type: integer, nullable)
	greetSoundTts = None, # The text to speech sound played to greet (type: integer, nullable)
	interDigitTimeout = None, # The timeout in milliseconds before considering the DTMF entry as done (type: integer)
	invalidSound = None, # The id of the OvhPabxSound played when the caller uses an invalid DTMF (type: integer, nullable)
	invalidSoundTts = None, # The text to speech sound played when the caller uses an invalid DTMF (type: integer, nullable)
	name = None, # The name of the menu (type: string)
	timeout = None, # The timeout in milliseconds before ending the menu when no DTMF is received (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxMenu
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}", array(
	greetSound => null, // The id of the OvhPabxSound played to greet (type: integer, nullable)
	greetSoundTts => null, // The text to speech sound played to greet (type: integer, nullable)
	interDigitTimeout => null, // The timeout in milliseconds before considering the DTMF entry as done (type: integer)
	invalidSound => null, // The id of the OvhPabxSound played when the caller uses an invalid DTMF (type: integer, nullable)
	invalidSoundTts => null, // The text to speech sound played when the caller uses an invalid DTMF (type: integer, nullable)
	name => null, // The name of the menu (type: string)
	timeout => null, // The timeout in milliseconds before ending the menu when no DTMF is received (type: integer)
));

print_r($result);
?>
```

## List menu entries

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-menu-menuid-entry

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/entry/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry");

print_r($result);
?>
```

## Get a menu entry

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-menu-menuid-entry-entryid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/entry/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `entryId` | path | integer | yes |  |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxMenuEntry | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxIvrMenuEntryActionEnum |  | The action triggered by the DTMF — one of `bridge`, `callcenter`, `menuBack`, `menuExit`, `menuSub`, `menuTop`, `playback`, `readDtmf`, `setCallerName` |
| `actionParam` | string |  | The additionnal parameter of the action |
| `dtmf` | string |  | The DTMF that triggers the action |
| `entryId` | integer | read-only |  |
| `position` | integer | read-only | The position of the entry in the menu |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "dtmf": "string",
  "entryId": 0,
  "position": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}");

print_r($result);
?>
```

## Create a menu entry

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-menu-menuid-entry

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/entry/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxIvrMenuEntryActionEnum | yes | The action triggered by the DTMF — one of `bridge`, `callcenter`, `menuBack`, `menuExit`, `menuSub`, `menuTop`, `playback`, `readDtmf`, `setCallerName` |
| `actionParam` | string |  | The additionnal parameter of the action |
| `dtmf` | string | yes | The DTMF that triggers the action |
| `position` | integer | yes | The position of the entry in the menu |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "dtmf": "string",
  "position": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxMenuEntry | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxIvrMenuEntryActionEnum |  | The action triggered by the DTMF — one of `bridge`, `callcenter`, `menuBack`, `menuExit`, `menuSub`, `menuTop`, `playback`, `readDtmf`, `setCallerName` |
| `actionParam` | string |  | The additionnal parameter of the action |
| `dtmf` | string |  | The DTMF that triggers the action |
| `entryId` | integer | read-only |  |
| `position` | integer | read-only | The position of the entry in the menu |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "dtmf": "string",
  "entryId": 0,
  "position": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry",
	action = None, # The action triggered by the DTMF (type: telephony.OvhPabxIvrMenuEntryActionEnum)
	actionParam = None, # The additionnal parameter of the action (type: string, nullable)
	dtmf = None, # The DTMF that triggers the action (type: string)
	position = None, # The position of the entry in the menu (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry", array(
	action => null, // The action triggered by the DTMF (type: telephony.OvhPabxIvrMenuEntryActionEnum)
	actionParam => null, // The additionnal parameter of the action (type: string, nullable)
	dtmf => null, // The DTMF that triggers the action (type: string)
	position => null, // The position of the entry in the menu (type: long)
));

print_r($result);
?>
```

## Delete a menu entry

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-menu-menuid-entry-entryid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/entry/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `entryId` | path | integer | yes |  |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}");

print_r($result);
?>
```

## Update a menu entry

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-menu-menuid-entry-entryid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/menu/entry/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `entryId` | path | integer | yes |  |
| `menuId` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxMenuEntry`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OvhPabxIvrMenuEntryActionEnum |  | The action triggered by the DTMF — one of `bridge`, `callcenter`, `menuBack`, `menuExit`, `menuSub`, `menuTop`, `playback`, `readDtmf`, `setCallerName` |
| `actionParam` | string |  | The additionnal parameter of the action |
| `dtmf` | string |  | The DTMF that triggers the action |
| `entryId` | integer | read-only |  |
| `position` | integer | read-only | The position of the entry in the menu |

```json
{
  "action": "bridge",
  "actionParam": "string",
  "dtmf": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxMenuEntry
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}",
	action = None, # The action triggered by the DTMF (type: telephony.OvhPabxIvrMenuEntryActionEnum)
	actionParam = None, # The additionnal parameter of the action (type: string)
	dtmf = None, # The DTMF that triggers the action (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxMenuEntry
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}", array(
	action => null, // The action triggered by the DTMF (type: telephony.OvhPabxIvrMenuEntryActionEnum)
	actionParam => null, // The additionnal parameter of the action (type: string)
	dtmf => null, // The DTMF that triggers the action (type: string)
));

print_r($result);
?>
```

## List call recordings

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/records`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-records

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/records/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/records" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/records")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/records");

print_r($result);
?>
```

## Get a call recording

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-records-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/records/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxRecord | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | string | read-only | The agent number of the recorded call |
| `callEnd` | string (date-time) | read-only | The end date of the recorded call |
| `callStart` | string (date-time) | read-only | The begin date of the recorded call |
| `callerIdName` | string | read-only | The caller name of the recorded call |
| `callerIdNumber` | string | read-only | The caller number of the recorded call |
| `destinationNumber` | string | read-only | The destination number of the recorded call |
| `duration` | integer | read-only | The duration in seconds of the recorded call |
| `fileUrl` | string | read-only | The record sound url |
| `id` | integer | read-only |  |

```json
{
  "agent": "string",
  "callEnd": "2024-01-01T12:00:00Z",
  "callStart": "2024-01-01T12:00:00Z",
  "callerIdName": "string",
  "callerIdNumber": "string",
  "destinationNumber": "string",
  "duration": 0,
  "fileUrl": "string",
  "id": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}");

print_r($result);
?>
```

## Delete a call recording

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-records-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/records/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/records/{id}");

print_r($result);
?>
```

## List sounds

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/sound`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-sound

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/sound/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/sound" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/sound")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/sound");

print_r($result);
?>
```

## Get a sound

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-sound-soundid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/sound/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |
| `soundId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxSound | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | read-only | The sound filename |
| `soundId` | integer | read-only |  |

```json
{
  "name": "string",
  "soundId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}");

print_r($result);
?>
```

## Delete a sound

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-sound-soundid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/sound/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |
| `soundId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/sound/{soundId}");

print_r($result);
?>
```

## Upload a sound

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/soundUpload`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-soundupload

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/soundUpload`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `documentId` | string |  | ID of the /me/document file you want to import |
| `name` | string |  | The name you want to give to your file |
| `url` | string |  | URL of the file you want to import (instead of /me/document ID) |

```json
{
  "documentId": "string",
  "name": "string",
  "url": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/soundUpload" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/soundUpload",
	documentId = None, # ID of the /me/document file you want to import (type: string, nullable)
	name = None, # The name you want to give to your file (type: string, nullable)
	url = None, # URL of the file you want to import (instead of /me/document ID) (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/soundUpload", array(
	documentId => null, // ID of the /me/document file you want to import (type: string, nullable)
	name => null, // The name you want to give to your file (type: string, nullable)
	url => null, // URL of the file you want to import (instead of /me/document ID) (type: string, nullable)
));

print_r($result);
?>
```

## List TTS prompts

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-tts

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/tts/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts");

print_r($result);
?>
```

## Get a TTS prompt

`GET /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-ovhpabx-servicename-tts-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/tts/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.OvhPabxTts | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only |  |
| `text` | string |  | The text that will be played |
| `voice` | telephony.OvhPabxTtsVoiceEnum |  | The voice used to say text — one of `Bruce`, `Helene`, `Jenny`, `Loic` |

```json
{
  "id": 0,
  "text": "string",
  "voice": "Bruce"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}");

print_r($result);
?>
```

## Create a TTS prompt

`POST /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-ovhpabx-servicename-tts

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/tts/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | yes |  |
| `voice` | telephony.OvhPabxTtsVoiceEnum |  | Voice to use for your text to speech — one of `Bruce`, `Helene`, `Jenny`, `Loic` |

```json
{
  "text": "string",
  "voice": "Bruce"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts",
	text = None, #  (type: string)
	voice = None, #  (type: telephony.OvhPabxTtsVoiceEnum, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts", array(
	text => null, //  (type: string)
	voice => null, //  (type: telephony.OvhPabxTtsVoiceEnum, nullable)
));

print_r($result);
?>
```

## Delete a TTS prompt

`DELETE /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#delete-telephony-billingaccount-ovhpabx-servicename-tts-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/tts/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}");

print_r($result);
?>
```

## Update a TTS prompt

`PUT /1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-ovhpabx-servicename-tts-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:ovhPabx/tts/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes |  |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.OvhPabxTts`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only |  |
| `text` | string |  | The text that will be played |
| `voice` | telephony.OvhPabxTtsVoiceEnum |  | The voice used to say text — one of `Bruce`, `Helene`, `Jenny`, `Loic` |

```json
{
  "text": "string",
  "voice": "Bruce"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.OvhPabxTts
result = client.put("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}",
	text = None, # The text that will be played (type: string)
	voice = None, # The voice used to say text (type: telephony.OvhPabxTtsVoiceEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.OvhPabxTts
$result = $ovh->put("/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}", array(
	text => null, // The text that will be played (type: string)
	voice => null, // The voice used to say text (type: telephony.OvhPabxTtsVoiceEnum)
));

print_r($result);
?>
```

## List VXML services

`GET /1.0/telephony/{billingAccount}/vxml`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-vxml

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:vxml/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/vxml" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/vxml")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/vxml");

print_r($result);
?>
```

## Get a VXML service

`GET /1.0/telephony/{billingAccount}/vxml/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-vxml-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:vxml/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.Vxml | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | read-only |  |
| `offers` | string[] | read-only |  |
| `serviceName` | string | read-only |  |
| `serviceType` | telephony.TypeServiceEnum | read-only | All existing types — one of `alias`, `line` |

```json
{
  "description": "string",
  "offers": [
    "string"
  ],
  "serviceName": "string",
  "serviceType": "alias"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/vxml/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/vxml/{serviceName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/vxml/{serviceName}");

print_r($result);
?>
```

## Get the VXML settings

`GET /1.0/telephony/{billingAccount}/vxml/{serviceName}/settings`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#get-telephony-billingaccount-vxml-servicename-settings

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:vxml/settings/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.VxmlProperties | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string |  |  |
| `urlRecord` | string |  |  |

```json
{
  "url": "string",
  "urlRecord": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/vxml/{serviceName}/settings" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/telephony/{billingAccount}/vxml/{serviceName}/settings")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/telephony/{billingAccount}/vxml/{serviceName}/settings");

print_r($result);
?>
```

## Update the VXML settings

`PUT /1.0/telephony/{billingAccount}/vxml/{serviceName}/settings`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#put-telephony-billingaccount-vxml-servicename-settings

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:vxml/settings/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.VxmlProperties`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string |  |  |
| `urlRecord` | string |  |  |

```json
{
  "url": "string",
  "urlRecord": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/vxml/{serviceName}/settings" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: telephony.VxmlProperties
result = client.put("/telephony/{billingAccount}/vxml/{serviceName}/settings",
	url = None, #  (type: string)
	urlRecord = None, #  (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: telephony.VxmlProperties
$result = $ovh->put("/telephony/{billingAccount}/vxml/{serviceName}/settings", array(
	url => null, //  (type: string)
	urlRecord => null, //  (type: string)
));

print_r($result);
?>
```

## Generate a logs URL

`POST /1.0/telephony/{billingAccount}/vxml/{serviceName}/settings/logs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/phone-numbers-alias/voice-menus-pbx-ivr/#post-telephony-billingaccount-vxml-servicename-settings-logs

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:vxml/settings/logs/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.TemporaryLogsLink | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expirationDate` | string (date-time) |  | Temporary url expiration date |
| `url` | string |  | Temporary url |

```json
{
  "expirationDate": "2024-01-01T12:00:00Z",
  "url": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/vxml/{serviceName}/settings/logs" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/telephony/{billingAccount}/vxml/{serviceName}/settings/logs")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/telephony/{billingAccount}/vxml/{serviceName}/settings/logs");

print_r($result);
?>
```
