# Web Cloud › Telephony › SIP Lines › Call Handling 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

> 61 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/sip-lines/call-handling/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/telephony/sip-lines/call-handling.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/telephony/sip-lines/call-handling.json?format=openapi3

## Operations

- `GET /telephony/{billingAccount}/abbreviatedNumber` — List speed dial numbers
- `GET /telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}` — Get a speed dial number
- `POST /telephony/{billingAccount}/abbreviatedNumber` — Create a speed dial number
- `DELETE /telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}` — Delete a speed dial number
- `PUT /telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}` — Update a speed dial number
- `GET /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber` — List speed dial numbers
- `GET /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}` — Get a speed dial number
- `POST /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber` — Create a speed dial number
- `DELETE /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}` — Delete a speed dial number
- `PUT /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}` — Update a speed dial number
- `GET /telephony/{billingAccount}/line/{serviceName}/automaticCall` — List automatic calls
- `GET /telephony/{billingAccount}/line/{serviceName}/automaticCall/{identifier}` — Get an automatic call
- `POST /telephony/{billingAccount}/line/{serviceName}/automaticCall` — Make an automatic call
- `GET /telephony/{billingAccount}/line/{serviceName}/calls` — List live calls
- `GET /telephony/{billingAccount}/line/{serviceName}/calls/{id}` — Get a live call
- `POST /telephony/{billingAccount}/line/{serviceName}/calls/{id}/eavesdrop` — Eavesdrop on a call
- `POST /telephony/{billingAccount}/line/{serviceName}/calls/{id}/hangup` — Hang up a call
- `POST /telephony/{billingAccount}/line/{serviceName}/calls/{id}/hold` — Toggle hold on a call
- `POST /telephony/{billingAccount}/line/{serviceName}/calls/{id}/intercept` — Intercept an unanswered call
- `POST /telephony/{billingAccount}/line/{serviceName}/calls/{id}/transfer` — Transfer an answered call
- `POST /telephony/{billingAccount}/line/{serviceName}/calls/{id}/whisper` — Whisper on a call
- `POST /telephony/{billingAccount}/line/{serviceName}/click2Call` — Start a call from the line
- `GET /telephony/{billingAccount}/line/{serviceName}/click2CallUser` — List click2call users
- `GET /telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}` — Get a click2call user
- `POST /telephony/{billingAccount}/line/{serviceName}/click2CallUser` — Create a click2call user
- `DELETE /telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}` — Delete a click2call user
- `POST /telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/changePassword` — Change the user password
- `POST /telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/click2Call` — Start a call from the line
- `GET /telephony/{billingAccount}/line/{serviceName}/records` — List call recordings
- `GET /telephony/{billingAccount}/line/{serviceName}/records/{id}` — Get a call recording
- `DELETE /telephony/{billingAccount}/line/{serviceName}/records/{id}` — Delete a call recording
- `GET /telephony/{billingAccount}/line/{serviceName}/statistics` — Get line statistics
- `GET /telephony/{billingAccount}/line/{serviceName}/trafficExtracts` — List traffic extracts
- `GET /telephony/{billingAccount}/line/{serviceName}/trafficExtracts/{id}` — Get a traffic extract
- `POST /telephony/{billingAccount}/line/{serviceName}/trafficExtracts` — Start a traffic extract
- `DELETE /telephony/{billingAccount}/line/{serviceName}/trafficExtracts/{id}` — Delete a traffic extract
- `GET /telephony/{billingAccount}/scheduler` — List schedulers
- `GET /telephony/{billingAccount}/scheduler/{serviceName}` — Get a scheduler
- `PUT /telephony/{billingAccount}/scheduler/{serviceName}` — Update a scheduler
- `GET /telephony/{billingAccount}/scheduler/{serviceName}/events` — List scheduler events
- `GET /telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}` — Get a scheduler event
- `POST /telephony/{billingAccount}/scheduler/{serviceName}/events` — Create a scheduler event
- `DELETE /telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}` — Delete a scheduler event
- `PUT /telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}` — Update a scheduler event
- `POST /telephony/{billingAccount}/scheduler/{serviceName}/importIcsCalendar` — Import an ICS calendar
- `GET /telephony/{billingAccount}/screen` — List call filtering services
- `GET /telephony/{billingAccount}/screen/{serviceName}` — Get call filtering settings
- `PUT /telephony/{billingAccount}/screen/{serviceName}` — Update call filtering settings
- `GET /telephony/{billingAccount}/screen/{serviceName}/screenLists` — List filtering rules
- `GET /telephony/{billingAccount}/screen/{serviceName}/screenLists/{id}` — Get a filtering rule
- `POST /telephony/{billingAccount}/screen/{serviceName}/screenLists` — Create a filtering rule
- `DELETE /telephony/{billingAccount}/screen/{serviceName}/screenLists/{id}` — Delete a filtering rule
- `GET /telephony/{billingAccount}/timeCondition` — List time condition services
- `GET /telephony/{billingAccount}/timeCondition/{serviceName}` — Get a time condition service
- `GET /telephony/{billingAccount}/timeCondition/{serviceName}/condition` — List time conditions
- `GET /telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}` — Get a time condition
- `POST /telephony/{billingAccount}/timeCondition/{serviceName}/condition` — Create a time condition
- `DELETE /telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}` — Delete a time condition
- `PUT /telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}` — Update a time condition
- `GET /telephony/{billingAccount}/timeCondition/{serviceName}/options` — Get time condition options
- `PUT /telephony/{billingAccount}/timeCondition/{serviceName}/options` — Update time condition options

## List speed dial numbers

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-abbreviatednumber

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

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/abbreviatedNumber" \
  -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}/abbreviatedNumber")

# 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}/abbreviatedNumber");

print_r($result);
?>
```

## Get a speed dial number

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-abbreviatednumber-abbreviatednumber

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `abbreviatedNumber` | path | integer | yes | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | read-only | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber |  | The destination of the abbreviated number |
| `name` | string |  |  |
| `surname` | string |  |  |

```json
{
  "abbreviatedNumber": 0,
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}" \
  -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}/abbreviatedNumber/{abbreviatedNumber}")

# 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}/abbreviatedNumber/{abbreviatedNumber}");

print_r($result);
?>
```

## Create a speed dial number

`POST /1.0/telephony/{billingAccount}/abbreviatedNumber`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-abbreviatednumber

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

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | yes | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber | yes | The destination of the abbreviated number |
| `name` | string | yes |  |
| `surname` | string | yes |  |

```json
{
  "abbreviatedNumber": 0,
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | read-only | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber |  | The destination of the abbreviated number |
| `name` | string |  |  |
| `surname` | string |  |  |

```json
{
  "abbreviatedNumber": 0,
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/abbreviatedNumber" \
  -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}/abbreviatedNumber",
	abbreviatedNumber = None, # The abbreviated number which must start with "7" and must have a length of 3 or 4 digits (type: long)
	destinationNumber = None, # The destination of the abbreviated number (type: phoneNumber)
	name = None, #  (type: string)
	surname = 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

$result = $ovh->post("/telephony/{billingAccount}/abbreviatedNumber", array(
	abbreviatedNumber => null, // The abbreviated number which must start with "7" and must have a length of 3 or 4 digits (type: long)
	destinationNumber => null, // The destination of the abbreviated number (type: phoneNumber)
	name => null, //  (type: string)
	surname => null, //  (type: string)
));

print_r($result);
?>
```

## Delete a speed dial number

`DELETE /1.0/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-abbreviatednumber-abbreviatednumber

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `abbreviatedNumber` | path | integer | yes | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}" \
  -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}/abbreviatedNumber/{abbreviatedNumber}")

# 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}/abbreviatedNumber/{abbreviatedNumber}");

print_r($result);
?>
```

## Update a speed dial number

`PUT /1.0/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-abbreviatednumber-abbreviatednumber

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `abbreviatedNumber` | path | integer | yes | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Request body (required)

Type: `telephony.AbbreviatedNumberGroup`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | read-only | The abbreviated number which must start with "7" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber |  | The destination of the abbreviated number |
| `name` | string |  |  |
| `surname` | string |  |  |

```json
{
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}" \
  -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.AbbreviatedNumberGroup
result = client.put("/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}",
	destinationNumber = None, # The destination of the abbreviated number (type: phoneNumber)
	name = None, #  (type: string)
	surname = 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.AbbreviatedNumberGroup
$result = $ovh->put("/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}", array(
	destinationNumber => null, // The destination of the abbreviated number (type: phoneNumber)
	name => null, //  (type: string)
	surname => null, //  (type: string)
));

print_r($result);
?>
```

## List speed dial numbers

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-abbreviatednumber

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/abbreviatedNumber/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}/line/{serviceName}/abbreviatedNumber" \
  -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}/line/{serviceName}/abbreviatedNumber")

# 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}/line/{serviceName}/abbreviatedNumber");

print_r($result);
?>
```

## Get a speed dial number

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-abbreviatednumber-abbreviatednumber

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `abbreviatedNumber` | path | integer | yes | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | read-only | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber |  | The destination of the abbreviated number |
| `name` | string |  |  |
| `surname` | string |  |  |

```json
{
  "abbreviatedNumber": 0,
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}" \
  -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}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}")

# 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}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}");

print_r($result);
?>
```

## Create a speed dial number

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-abbreviatednumber

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/abbreviatedNumber/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 |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | yes | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber | yes | The destination of the abbreviated number |
| `name` | string | yes |  |
| `surname` | string | yes |  |

```json
{
  "abbreviatedNumber": 0,
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | read-only | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber |  | The destination of the abbreviated number |
| `name` | string |  |  |
| `surname` | string |  |  |

```json
{
  "abbreviatedNumber": 0,
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber" \
  -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}/line/{serviceName}/abbreviatedNumber",
	abbreviatedNumber = None, # The abbreviated number which must start with "2" and must have a length of 3 or 4 digits (type: long)
	destinationNumber = None, # The destination of the abbreviated number (type: phoneNumber)
	name = None, #  (type: string)
	surname = 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

$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber", array(
	abbreviatedNumber => null, // The abbreviated number which must start with "2" and must have a length of 3 or 4 digits (type: long)
	destinationNumber => null, // The destination of the abbreviated number (type: phoneNumber)
	name => null, //  (type: string)
	surname => null, //  (type: string)
));

print_r($result);
?>
```

## Delete a speed dial number

`DELETE /1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-line-servicename-abbreviatednumber-abbreviatednumber

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/abbreviatedNumber/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `abbreviatedNumber` | path | integer | yes | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `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}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}" \
  -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}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}")

# 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}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}");

print_r($result);
?>
```

## Update a speed dial number

`PUT /1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-line-servicename-abbreviatednumber-abbreviatednumber

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `abbreviatedNumber` | path | integer | yes | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |

### Request body (required)

Type: `telephony.AbbreviatedNumber`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `abbreviatedNumber` | integer | read-only | The abbreviated number which must start with "2" and must have a length of 3 or 4 digits |
| `destinationNumber` | phoneNumber |  | The destination of the abbreviated number |
| `name` | string |  |  |
| `surname` | string |  |  |

```json
{
  "destinationNumber": "string",
  "name": "string",
  "surname": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}" \
  -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.AbbreviatedNumber
result = client.put("/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}",
	destinationNumber = None, # The destination of the abbreviated number (type: phoneNumber)
	name = None, #  (type: string)
	surname = 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.AbbreviatedNumber
$result = $ovh->put("/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}", array(
	destinationNumber => null, // The destination of the abbreviated number (type: phoneNumber)
	name => null, //  (type: string)
	surname => null, //  (type: string)
));

print_r($result);
?>
```

## List automatic calls

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/automaticCall`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-automaticcall

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/automaticCall/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 | string[] | successful operation |

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/automaticCall" \
  -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}/line/{serviceName}/automaticCall")

# 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}/line/{serviceName}/automaticCall");

print_r($result);
?>
```

## Get an automatic call

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/automaticCall/{identifier}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-automaticcall-identifier

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

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `answerDatetime` | string (date-time) | read-only | answer date |
| `application` | string | read-only | Application and dialplan running for call |
| `applicationResult` | string | read-only | end status of application |
| `billingNumber` | phoneNumber | read-only | billingNumber (service used) |
| `callCreatedDatetime` | string (date-time) | read-only | creation date of the call |
| `callDuration` | integer | read-only | call duration on seconds |
| `callee` | phoneNumber | read-only | number called |
| `caller` | phoneNumber | read-only | number where the call come from |
| `dtmf` | string | read-only | DTMF received during the call separate by commas |
| `hangupCause` | telephony.CallsGeneratorHangupCauseEnum | read-only | hangup cause — one of `AccessInformationDiscarded`, `AllottedTimeout`, `AttendedTransfer`, `BlindTransfer`, `CallAwardedbeing`, `ChannelTypeNotImplemented`, `ChannelUnacceptable`, `CodeSip403BearerCapabilityNotAuthorized`, `CodeSip403IncomingCallsBarred`, `CodeSip403OutgoingCallsBarred`, `CodeSip404NoRouteToDestination`, `CodeSip404NoRouteToSpecifiedTransitNetwork`, … |
| `hangupDatetime` | string (date-time) | read-only | hangup date |
| `identifier` | string | read-only | Generated call identifier |
| `transferFrom` | string | read-only | original call uuid if it's a transfer |
| `uuid` | string | read-only | unique call id |

```json
{
  "answerDatetime": "2024-01-01T12:00:00Z",
  "application": "string",
  "applicationResult": "string",
  "billingNumber": "string",
  "callCreatedDatetime": "2024-01-01T12:00:00Z",
  "callDuration": 0,
  "callee": "string",
  "caller": "string",
  "dtmf": "string",
  "hangupCause": "AccessInformationDiscarded",
  "hangupDatetime": "2024-01-01T12:00:00Z",
  "identifier": "string",
  "transferFrom": "string",
  "uuid": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/automaticCall/{identifier}" \
  -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}/line/{serviceName}/automaticCall/{identifier}")

# 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}/line/{serviceName}/automaticCall/{identifier}");

print_r($result);
?>
```

## Make an automatic call

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/automaticCall`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-automaticcall

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/automaticCall/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 |
| --- | --- | --- | --- |
| `bridgeNumberDialplan` | phoneNumber |  | Number to call if transfer in dialplan selected |
| `calledNumber` | phoneNumber | yes | Number to call |
| `callingNumber` | phoneNumber |  | Optional, number where the call come from |
| `dialplan` | telephony.CallsGeneratorDialplanEnum | yes | Dialplan used for the call — one of `ReadText`, `RequestAppointmentConfirmation`, `RequestAppointmentConfirmationWithTransfer` |
| `isAnonymous` | boolean | yes | For anonymous call |
| `playbackAudioFileDialplan` | string |  | Name of the audioFile (if needed) with extention. This audio file must have been upload previously |
| `timeout` | integer |  | Timeout (in seconds). Default is 20 seconds |
| `ttsTextDialplan` | string |  | Text to read if TTS on dialplan selected |

```json
{
  "bridgeNumberDialplan": "string",
  "calledNumber": "string",
  "callingNumber": "string",
  "dialplan": "ReadText",
  "isAnonymous": true,
  "playbackAudioFileDialplan": "string",
  "timeout": 0,
  "ttsTextDialplan": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/automaticCall" \
  -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}/line/{serviceName}/automaticCall",
	bridgeNumberDialplan = None, # Number to call if transfer in dialplan selected (type: phoneNumber, nullable)
	calledNumber = None, # Number to call (type: phoneNumber)
	callingNumber = None, # Optional, number where the call come from (type: phoneNumber, nullable)
	dialplan = None, # Dialplan used for the call (type: telephony.CallsGeneratorDialplanEnum)
	isAnonymous = None, # For anonymous call (type: boolean)
	playbackAudioFileDialplan = None, # Name of the audioFile (if needed) with extention. This audio file must have been upload previously (type: string, nullable)
	timeout = None, # Timeout (in seconds). Default is 20 seconds (type: long, nullable)
	ttsTextDialplan = None, # Text to read if TTS on dialplan selected (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

$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/automaticCall", array(
	bridgeNumberDialplan => null, // Number to call if transfer in dialplan selected (type: phoneNumber, nullable)
	calledNumber => null, // Number to call (type: phoneNumber)
	callingNumber => null, // Optional, number where the call come from (type: phoneNumber, nullable)
	dialplan => null, // Dialplan used for the call (type: telephony.CallsGeneratorDialplanEnum)
	isAnonymous => null, // For anonymous call (type: boolean)
	playbackAudioFileDialplan => null, // Name of the audioFile (if needed) with extention. This audio file must have been upload previously (type: string, nullable)
	timeout => null, // Timeout (in seconds). Default is 20 seconds (type: long, nullable)
	ttsTextDialplan => null, // Text to read if TTS on dialplan selected (type: string, nullable)
));

print_r($result);
?>
```

## List live calls

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/calls`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-calls

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls");

print_r($result);
?>
```

## Get a live call

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/calls/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-calls-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls/{id}");

print_r($result);
?>
```

## Eavesdrop on a call

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/calls/{id}/eavesdrop`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-calls-id-eavesdrop

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/eavesdrop`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls/{id}/hangup`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-calls-id-hangup

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/hangup`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls/{id}/hangup");

print_r($result);
?>
```

## Toggle hold on a call

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/calls/{id}/hold`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-calls-id-hold

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/hold`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls/{id}/hold");

print_r($result);
?>
```

## Intercept an unanswered call

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/calls/{id}/intercept`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-calls-id-intercept

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/intercept`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls/{id}/transfer`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-calls-id-transfer

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/transfer`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/calls/{id}/whisper`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-calls-id-whisper

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-23, removed on 2022-06-23.  
**IAM actions:** `voip:apiovh:line/calls/whisper`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}/line/{serviceName}/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}/line/{serviceName}/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}/line/{serviceName}/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);
?>
```

## Start a call from the line

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/click2Call`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-click2call

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/click2Call/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 |
| --- | --- | --- | --- |
| `calledNumber` | string | yes |  |
| `callingNumber` | string |  |  |
| `intercom` | boolean |  | Activate the calling number in intercom mode automatically (pick up and speaker automatic activation). |

```json
{
  "calledNumber": "string",
  "callingNumber": "string",
  "intercom": true
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/click2Call" \
  -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: boolean
result = client.post("/telephony/{billingAccount}/line/{serviceName}/click2Call",
	calledNumber = None, #  (type: string)
	callingNumber = None, #  (type: string, nullable)
	intercom = None, # Activate the calling number in intercom mode automatically (pick up and speaker automatic activation). (type: boolean, 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: boolean
$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/click2Call", array(
	calledNumber => null, //  (type: string)
	callingNumber => null, //  (type: string, nullable)
	intercom => null, // Activate the calling number in intercom mode automatically (pick up and speaker automatic activation). (type: boolean, nullable)
));

print_r($result);
?>
```

## List click2call users

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-click2calluser

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/click2CallUser/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}/line/{serviceName}/click2CallUser" \
  -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}/line/{serviceName}/click2CallUser")

# 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}/line/{serviceName}/click2CallUser");

print_r($result);
?>
```

## Get a click2call user

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-click2calluser-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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.Click2CallUser | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDateTime` | string (date-time) | read-only | Date when user was created |
| `id` | integer | read-only | Contact identifier |
| `login` | string | read-only | login of the click 2 call user |

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{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}/line/{serviceName}/click2CallUser/{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}/line/{serviceName}/click2CallUser/{id}");

print_r($result);
?>
```

## Create a click2call user

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-click2calluser

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/click2CallUser/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 |
| --- | --- | --- | --- |
| `login` | string | yes | Name of the contact |
| `password` | string (password) | yes | The user password |

```json
{
  "login": "string",
  "password": "string"
}
```

### Responses

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

```json
0
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser" \
  -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}/line/{serviceName}/click2CallUser",
	login = None, # Name of the contact (type: string)
	password = None, # The user password (type: password)
)

# 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}/line/{serviceName}/click2CallUser", array(
	login => null, // Name of the contact (type: string)
	password => null, // The user password (type: password)
));

print_r($result);
?>
```

## Delete a click2call user

`DELETE /1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-line-servicename-click2calluser-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/click2CallUser/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{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}/line/{serviceName}/click2CallUser/{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}/line/{serviceName}/click2CallUser/{id}");

print_r($result);
?>
```

## Change the user password

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-click2calluser-id-changepassword

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/click2CallUser/changePassword`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 |
| --- | --- | --- | --- |
| `password` | string (password) | yes | The password |

```json
{
  "password": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/changePassword" \
  -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: password
result = client.post("/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/changePassword",
	password = None, # The password (type: password)
)

# 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: password
$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/changePassword", array(
	password => null, // The password (type: password)
));

print_r($result);
?>
```

## Start a call from the line

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/click2Call`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-click2calluser-id-click2call

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/click2CallUser/click2Call/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 |
| --- | --- | --- | --- |
| `calledNumber` | string | yes |  |
| `callingNumber` | string |  |  |

```json
{
  "calledNumber": "string",
  "callingNumber": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/click2Call" \
  -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}/line/{serviceName}/click2CallUser/{id}/click2Call",
	calledNumber = None, #  (type: string)
	callingNumber = None, #  (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

$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/click2Call", array(
	calledNumber => null, //  (type: string)
	callingNumber => null, //  (type: string, nullable)
));

print_r($result);
?>
```

## List call recordings

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/records`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-records

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/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}/line/{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}/line/{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}/line/{serviceName}/records");

print_r($result);
?>
```

## Get a call recording

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/records/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-records-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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.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}/line/{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}/line/{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}/line/{serviceName}/records/{id}");

print_r($result);
?>
```

## Delete a call recording

`DELETE /1.0/telephony/{billingAccount}/line/{serviceName}/records/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-line-servicename-records-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/records/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{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}/line/{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}/line/{serviceName}/records/{id}");

print_r($result);
?>
```

## Get line statistics

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/statistics`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-statistics

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-03-17, removed on 2022-06-17.  
**IAM actions:** `voip:apiovh:line/statistics/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |
| `timeframe` | query | telephony.StatisticsTimeframeEnum | yes | Available timeframes for statistics — one of `daily`, `hourly`, `monthly`, `weekly`, `yearly` |
| `type` | query | telephony.LineStatisticsTypeEnum | yes | Types of statistics available for a line. — one of `maxDelay`, `maxJitter`, `rtpMos`, `sumRtpLost` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | complexType.UnitAndValues_telephony.TimestampAndValue | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `unit` | string |  |  |
| `values` | telephony.TimestampAndValue[] |  |  |
| `values[].timestamp` | integer |  |  |
| `values[].value` | number |  |  |

```json
{
  "unit": "string",
  "values": [
    {
      "timestamp": 0,
      "value": 0
    }
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/statistics" \
  -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}/line/{serviceName}/statistics")

# 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}/line/{serviceName}/statistics");

print_r($result);
?>
```

## List traffic extracts

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-trafficextracts

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/trafficExtracts/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}/line/{serviceName}/trafficExtracts" \
  -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}/line/{serviceName}/trafficExtracts")

# 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}/line/{serviceName}/trafficExtracts");

print_r($result);
?>
```

## Get a traffic extract

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-line-servicename-trafficextracts-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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.trafficExtract | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dateEnd` | string (date-time) | read-only | The start date of the traffic extract |
| `dateStart` | string (date-time) | read-only | The start date of the traffic extract |
| `fileSize` | integer | read-only | The PCAP file size of the traffic extract |
| `fileUrl` | string | read-only | The PCAP URL of the traffic extract |
| `id` | integer | read-only | The id of the traffic extract |
| `status` | telephony.TaskStatusEnum | read-only | The status of the extract — one of `doing`, `done`, `error`, `pause`, `todo` |

```json
{
  "dateEnd": "2024-01-01T12:00:00Z",
  "dateStart": "2024-01-01T12:00:00Z",
  "fileSize": 0,
  "fileUrl": "string",
  "id": 0,
  "status": "doing"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts/{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}/line/{serviceName}/trafficExtracts/{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}/line/{serviceName}/trafficExtracts/{id}");

print_r($result);
?>
```

## Start a traffic extract

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-line-servicename-trafficextracts

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/trafficExtracts/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 |
| --- | --- | --- | --- |
| `dateEnd` | string (date-time) | yes | The end date of the traffic extract |
| `dateStart` | string (date-time) | yes | The start date of the traffic extract |

```json
{
  "dateEnd": "2024-01-01T12:00:00Z",
  "dateStart": "2024-01-01T12:00:00Z"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dateEnd` | string (date-time) | read-only | The start date of the traffic extract |
| `dateStart` | string (date-time) | read-only | The start date of the traffic extract |
| `fileSize` | integer | read-only | The PCAP file size of the traffic extract |
| `fileUrl` | string | read-only | The PCAP URL of the traffic extract |
| `id` | integer | read-only | The id of the traffic extract |
| `status` | telephony.TaskStatusEnum | read-only | The status of the extract — one of `doing`, `done`, `error`, `pause`, `todo` |

```json
{
  "dateEnd": "2024-01-01T12:00:00Z",
  "dateStart": "2024-01-01T12:00:00Z",
  "fileSize": 0,
  "fileUrl": "string",
  "id": 0,
  "status": "doing"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts" \
  -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}/line/{serviceName}/trafficExtracts",
	dateEnd = None, # The end date of the traffic extract (type: datetime)
	dateStart = None, # The start date of the traffic extract (type: datetime)
)

# 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}/line/{serviceName}/trafficExtracts", array(
	dateEnd => null, // The end date of the traffic extract (type: datetime)
	dateStart => null, // The start date of the traffic extract (type: datetime)
));

print_r($result);
?>
```

## Delete a traffic extract

`DELETE /1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-line-servicename-trafficextracts-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/trafficExtracts/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/trafficExtracts/{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}/line/{serviceName}/trafficExtracts/{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}/line/{serviceName}/trafficExtracts/{id}");

print_r($result);
?>
```

## List schedulers

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-scheduler

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:scheduler/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}/scheduler" \
  -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}/scheduler")

# 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}/scheduler");

print_r($result);
?>
```

## Get a scheduler

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-scheduler-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:scheduler/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.Scheduler | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceName` | string | read-only |  |
| `timeZone` | telephony.timeZone |  | Time zones available for scheduled events time definitions — one of `Europe/Berlin`, `Europe/Brussels`, `Europe/London`, `Europe/Madrid`, `Europe/Paris`, `Europe/Zurich` |

```json
{
  "serviceName": "string",
  "timeZone": "Europe/Berlin"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{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}/scheduler/{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}/scheduler/{serviceName}");

print_r($result);
?>
```

## Update a scheduler

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-scheduler-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:scheduler/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.Scheduler`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceName` | string | read-only |  |
| `timeZone` | telephony.timeZone |  | Time zones available for scheduled events time definitions — one of `Europe/Berlin`, `Europe/Brussels`, `Europe/London`, `Europe/Madrid`, `Europe/Paris`, `Europe/Zurich` |

```json
{
  "timeZone": "Europe/Berlin"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{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.Scheduler
result = client.put("/telephony/{billingAccount}/scheduler/{serviceName}",
	timeZone = None, #  (type: )
)

# 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.Scheduler
$result = $ovh->put("/telephony/{billingAccount}/scheduler/{serviceName}", array(
	timeZone => null, //  (type: )
));

print_r($result);
?>
```

## List scheduler events

`GET /1.0/telephony/{billingAccount}/scheduler/{serviceName}/events`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-scheduler-servicename-events

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `categories` | query | telephony.SchedulerCategoryEnum |  | Filter the value of categories property (=) — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `dateEnd.from` | query | string (date-time) |  | Filter the value of dateEnd property (>=) |
| `dateEnd.to` | query | string (date-time) |  | Filter the value of dateEnd property (<=) |
| `dateStart.from` | query | string (date-time) |  | Filter the value of dateStart property (>=) |
| `dateStart.to` | query | string (date-time) |  | Filter the value of dateStart property (<=) |
| `serviceName` | path | string | yes |  |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{serviceName}/events" \
  -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}/scheduler/{serviceName}/events")

# 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}/scheduler/{serviceName}/events");

print_r($result);
?>
```

## Get a scheduler event

`GET /1.0/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-scheduler-servicename-events-uid

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |
| `uid` | path | string | yes | The unique ICS event identifier |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `categories` | telephony.SchedulerCategoryEnum |  | The category of the event — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `dateEnd` | string (date-time) |  | The ending date of the event |
| `dateStart` | string (date-time) |  | The beginning date of the event |
| `description` | string |  |  |
| `title` | string |  |  |
| `uid` | string | read-only | The unique ICS event identifier |

```json
{
  "categories": "holidays",
  "dateEnd": "2024-01-01T12:00:00Z",
  "dateStart": "2024-01-01T12:00:00Z",
  "description": "string",
  "title": "string",
  "uid": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}" \
  -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}/scheduler/{serviceName}/events/{uid}")

# 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}/scheduler/{serviceName}/events/{uid}");

print_r($result);
?>
```

## Create a scheduler event

`POST /1.0/telephony/{billingAccount}/scheduler/{serviceName}/events`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-scheduler-servicename-events

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:scheduler/events/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 |
| --- | --- | --- | --- |
| `category` | telephony.SchedulerCategoryEnum | yes | The category of the event — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `dateEnd` | string (date-time) | yes | The ending date of the event |
| `dateStart` | string (date-time) | yes | The beginning date of the event |
| `description` | string |  | The descritpion of the event |
| `title` | string | yes | The title of the event |
| `uid` | string |  | The unique ICS event identifier |

```json
{
  "category": "holidays",
  "dateEnd": "2024-01-01T12:00:00Z",
  "dateStart": "2024-01-01T12:00:00Z",
  "description": "string",
  "title": "string",
  "uid": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{serviceName}/events" \
  -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}/scheduler/{serviceName}/events",
	category = None, # The category of the event (type: telephony.SchedulerCategoryEnum)
	dateEnd = None, # The ending date of the event (type: datetime)
	dateStart = None, # The beginning date of the event (type: datetime)
	description = None, # The descritpion of the event (type: string, nullable)
	title = None, # The title of the event (type: string)
	uid = None, # The unique ICS event identifier (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

$result = $ovh->post("/telephony/{billingAccount}/scheduler/{serviceName}/events", array(
	category => null, // The category of the event (type: telephony.SchedulerCategoryEnum)
	dateEnd => null, // The ending date of the event (type: datetime)
	dateStart => null, // The beginning date of the event (type: datetime)
	description => null, // The descritpion of the event (type: string, nullable)
	title => null, // The title of the event (type: string)
	uid => null, // The unique ICS event identifier (type: string, nullable)
));

print_r($result);
?>
```

## Delete a scheduler event

`DELETE /1.0/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-scheduler-servicename-events-uid

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:scheduler/events/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |
| `uid` | path | string | yes | The unique ICS event identifier |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}" \
  -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}/scheduler/{serviceName}/events/{uid}")

# 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}/scheduler/{serviceName}/events/{uid}");

print_r($result);
?>
```

## Update a scheduler event

`PUT /1.0/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-scheduler-servicename-events-uid

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `serviceName` | path | string | yes |  |
| `uid` | path | string | yes | The unique ICS event identifier |

### Request body (required)

Type: `telephony.SchedulerEvent`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `categories` | telephony.SchedulerCategoryEnum |  | The category of the event — one of `holidays`, `scheduler1`, `scheduler2`, `scheduler3` |
| `dateEnd` | string (date-time) |  | The ending date of the event |
| `dateStart` | string (date-time) |  | The beginning date of the event |
| `description` | string |  |  |
| `title` | string |  |  |
| `uid` | string | read-only | The unique ICS event identifier |

```json
{
  "categories": "holidays",
  "dateEnd": "2024-01-01T12:00:00Z",
  "dateStart": "2024-01-01T12:00:00Z",
  "description": "string",
  "title": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}" \
  -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.SchedulerEvent
result = client.put("/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}",
	categories = None, # The category of the event (type: telephony.SchedulerCategoryEnum)
	dateEnd = None, # The ending date of the event (type: string)
	dateStart = None, # The beginning date of the event (type: string)
	description = None, #  (type: string, nullable)
	title = 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.SchedulerEvent
$result = $ovh->put("/telephony/{billingAccount}/scheduler/{serviceName}/events/{uid}", array(
	categories => null, // The category of the event (type: telephony.SchedulerCategoryEnum)
	dateEnd => null, // The ending date of the event (type: string)
	dateStart => null, // The beginning date of the event (type: string)
	description => null, //  (type: string, nullable)
	title => null, //  (type: string)
));

print_r($result);
?>
```

## Import an ICS calendar

`POST /1.0/telephony/{billingAccount}/scheduler/{serviceName}/importIcsCalendar`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-scheduler-servicename-importicscalendar

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:scheduler/importIcsCalendar`

### 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 |
| --- | --- | --- | --- |
| `url` | string | yes | The URL of your ICS formated calendar |

```json
{
  "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}/scheduler/{serviceName}/importIcsCalendar" \
  -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}/scheduler/{serviceName}/importIcsCalendar",
	url = None, # The URL of your ICS formated calendar (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}/scheduler/{serviceName}/importIcsCalendar", array(
	url => null, // The URL of your ICS formated calendar (type: string)
));

print_r($result);
?>
```

## List call filtering services

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-screen

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:screen/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}/screen" \
  -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}/screen")

# 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}/screen");

print_r($result);
?>
```

## Get call filtering settings

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-screen-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:screen/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.Screen | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `incomingScreenList` | telephony.ScreenListChoosingEnum |  | Type of screen list — one of `blacklist`, `disabled`, `whitelist` |
| `outgoingScreenList` | telephony.ScreenListChoosingEnum |  | Type of screen list — one of `blacklist`, `disabled`, `whitelist` |
| `serviceName` | string | read-only |  |

```json
{
  "incomingScreenList": "blacklist",
  "outgoingScreenList": "blacklist",
  "serviceName": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/screen/{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}/screen/{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}/screen/{serviceName}");

print_r($result);
?>
```

## Update call filtering settings

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-screen-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:screen/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.Screen`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `incomingScreenList` | telephony.ScreenListChoosingEnum |  | Type of screen list — one of `blacklist`, `disabled`, `whitelist` |
| `outgoingScreenList` | telephony.ScreenListChoosingEnum |  | Type of screen list — one of `blacklist`, `disabled`, `whitelist` |
| `serviceName` | string | read-only |  |

```json
{
  "incomingScreenList": "blacklist",
  "outgoingScreenList": "blacklist"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/screen/{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.Screen
result = client.put("/telephony/{billingAccount}/screen/{serviceName}",
	incomingScreenList = None, #  (type: )
	outgoingScreenList = None, #  (type: )
)

# 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.Screen
$result = $ovh->put("/telephony/{billingAccount}/screen/{serviceName}", array(
	incomingScreenList => null, //  (type: )
	outgoingScreenList => null, //  (type: )
));

print_r($result);
?>
```

## List filtering rules

`GET /1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-screen-servicename-screenlists

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:screen/screenLists/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}/screen/{serviceName}/screenLists" \
  -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}/screen/{serviceName}/screenLists")

# 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}/screen/{serviceName}/screenLists");

print_r($result);
?>
```

## Get a filtering rule

`GET /1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-screen-servicename-screenlists-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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.ScreenList | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callNumber` | string | read-only |  |
| `id` | integer | read-only |  |
| `nature` | telephony.ScreenListNatureEnum | read-only | Nature of screen list — one of `fax`, `international`, `services`, `special`, `voicemail` |
| `status` | string | read-only |  |
| `type` | telephony.ScreenListTypeEnum | read-only | Type of screen list — one of `incomingBlackList`, `incomingWhiteList`, `outgoingBlackList`, `outgoingWhiteList` |

```json
{
  "callNumber": "string",
  "id": 0,
  "nature": "fax",
  "status": "string",
  "type": "incomingBlackList"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists/{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}/screen/{serviceName}/screenLists/{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}/screen/{serviceName}/screenLists/{id}");

print_r($result);
?>
```

## Create a filtering rule

`POST /1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-screen-servicename-screenlists

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:screen/screenLists/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 |
| --- | --- | --- | --- |
| `callNumber` | string |  | The callNumber of the generic screen list |
| `nature` | telephony.ScreenListNatureEnum | yes | The nature of the generic screen list — one of `fax`, `international`, `services`, `special`, `voicemail` |
| `type` | telephony.ScreenListTypeEnum | yes | The type of the generic screen list — one of `incomingBlackList`, `incomingWhiteList`, `outgoingBlackList`, `outgoingWhiteList` |

```json
{
  "callNumber": "string",
  "nature": "fax",
  "type": "incomingBlackList"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists" \
  -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.ScreenListTypeEnum
result = client.post("/telephony/{billingAccount}/screen/{serviceName}/screenLists",
	callNumber = None, # The callNumber of the generic screen list (type: string, nullable)
	nature = None, # The nature of the generic screen list (type: telephony.ScreenListNatureEnum)
	type = None, # The type of the generic screen list (type: telephony.ScreenListTypeEnum)
)

# 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.ScreenListTypeEnum
$result = $ovh->post("/telephony/{billingAccount}/screen/{serviceName}/screenLists", array(
	callNumber => null, // The callNumber of the generic screen list (type: string, nullable)
	nature => null, // The nature of the generic screen list (type: telephony.ScreenListNatureEnum)
	type => null, // The type of the generic screen list (type: telephony.ScreenListTypeEnum)
));

print_r($result);
?>
```

## Delete a filtering rule

`DELETE /1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-screen-servicename-screenlists-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:screen/screenLists/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/screen/{serviceName}/screenLists/{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}/screen/{serviceName}/screenLists/{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}/screen/{serviceName}/screenLists/{id}");

print_r($result);
?>
```

## List time condition services

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-timecondition

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/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}/timeCondition" \
  -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}/timeCondition")

# 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}/timeCondition");

print_r($result);
?>
```

## Get a time condition service

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-timecondition-servicename

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/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.GenericScreen | successful operation |

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

```json
{
  "serviceName": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{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}/timeCondition/{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}/timeCondition/{serviceName}");

print_r($result);
?>
```

## List time conditions

`GET /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-timecondition-servicename-condition

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/condition/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}/timeCondition/{serviceName}/condition" \
  -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}/timeCondition/{serviceName}/condition")

# 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}/timeCondition/{serviceName}/condition");

print_r($result);
?>
```

## Get a time condition

`GET /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-timecondition-servicename-condition-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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.TimeCondition | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `day` | telephony.TimeConditionsDayEnum |  | Day of the time condition — one of `friday`, `holiday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |
| `hourBegin` | string |  |  |
| `hourEnd` | string |  |  |
| `id` | integer | read-only |  |
| `policy` | telephony.TimeConditionsPolicyEnum |  | Policy of the time condition — one of `available`, `slot1`, `slot2`, `slot3` |
| `status` | string |  |  |

```json
{
  "day": "friday",
  "hourBegin": "string",
  "hourEnd": "string",
  "id": 0,
  "policy": "available",
  "status": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{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}/timeCondition/{serviceName}/condition/{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}/timeCondition/{serviceName}/condition/{id}");

print_r($result);
?>
```

## Create a time condition

`POST /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#post-telephony-billingaccount-timecondition-servicename-condition

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/condition/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 |
| --- | --- | --- | --- |
| `day` | telephony.TimeConditionsDayEnum | yes | The day of the time condition — one of `friday`, `holiday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |
| `hourBegin` | string | yes | The hour where the time condition begins (format : hhmm) |
| `hourEnd` | string | yes | The hour where the time condition ends (format : hhmm) |
| `policy` | telephony.TimeConditionsPolicyEnum | yes | The policy — one of `available`, `slot1`, `slot2`, `slot3` |

```json
{
  "day": "friday",
  "hourBegin": "string",
  "hourEnd": "string",
  "policy": "available"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `day` | telephony.TimeConditionsDayEnum |  | Day of the time condition — one of `friday`, `holiday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |
| `hourBegin` | string |  |  |
| `hourEnd` | string |  |  |
| `id` | integer | read-only |  |
| `policy` | telephony.TimeConditionsPolicyEnum |  | Policy of the time condition — one of `available`, `slot1`, `slot2`, `slot3` |
| `status` | string |  |  |

```json
{
  "day": "friday",
  "hourBegin": "string",
  "hourEnd": "string",
  "id": 0,
  "policy": "available",
  "status": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition" \
  -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}/timeCondition/{serviceName}/condition",
	day = None, # The day of the time condition (type: telephony.TimeConditionsDayEnum)
	hourBegin = None, # The hour where the time condition begins (format : hhmm) (type: string)
	hourEnd = None, # The hour where the time condition ends (format : hhmm) (type: string)
	policy = None, # The policy (type: telephony.TimeConditionsPolicyEnum)
)

# 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}/timeCondition/{serviceName}/condition", array(
	day => null, // The day of the time condition (type: telephony.TimeConditionsDayEnum)
	hourBegin => null, // The hour where the time condition begins (format : hhmm) (type: string)
	hourEnd => null, // The hour where the time condition ends (format : hhmm) (type: string)
	policy => null, // The policy (type: telephony.TimeConditionsPolicyEnum)
));

print_r($result);
?>
```

## Delete a time condition

`DELETE /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#delete-telephony-billingaccount-timecondition-servicename-condition-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/condition/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{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}/timeCondition/{serviceName}/condition/{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}/timeCondition/{serviceName}/condition/{id}");

print_r($result);
?>
```

## Update a time condition

`PUT /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-timecondition-servicename-condition-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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: `telephony.TimeCondition`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `day` | telephony.TimeConditionsDayEnum |  | Day of the time condition — one of `friday`, `holiday`, `monday`, `saturday`, `sunday`, `thursday`, `tuesday`, `wednesday` |
| `hourBegin` | string |  |  |
| `hourEnd` | string |  |  |
| `id` | integer | read-only |  |
| `policy` | telephony.TimeConditionsPolicyEnum |  | Policy of the time condition — one of `available`, `slot1`, `slot2`, `slot3` |
| `status` | string |  |  |

```json
{
  "day": "friday",
  "hourBegin": "string",
  "hourEnd": "string",
  "policy": "available",
  "status": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{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.TimeCondition
result = client.put("/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}",
	day = None, #  (type: )
	hourBegin = None, #  (type: string)
	hourEnd = None, #  (type: string)
	policy = None, #  (type: )
	status = 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.TimeCondition
$result = $ovh->put("/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}", array(
	day => null, //  (type: )
	hourBegin => null, //  (type: string)
	hourEnd => null, //  (type: string)
	policy => null, //  (type: )
	status => null, //  (type: string)
));

print_r($result);
?>
```

## Get time condition options

`GET /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/options`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#get-telephony-billingaccount-timecondition-servicename-options

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/options/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.TimeConditionOptions | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `slot1Number` | string |  | Number associated to the first slot action |
| `slot1Type` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the first slot is used — one of `number`, `voicemail` |
| `slot2Number` | string |  | Number associated to the second slot action |
| `slot2Type` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the second slot is used — one of `number`, `voicemail` |
| `slot3Number` | string |  | Number associated to the third slot action |
| `slot3Type` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the third slot is used — one of `number`, `voicemail` |
| `status` | telephony.TimeConditionsGlobalStatusEnum |  | Status of time conditions — one of `deleted`, `disabled`, `enabled` |
| `timeout` | telephony.TimeConditionsTimeoutEnum |  | Timeout value of the time condition — one of `5`, `10`, `15`, `20`, `25`, `30`, `35`, `40`, `45`, `50`, `55`, `60`, … |
| `unavailableNumber` | string |  | Number associated to the unavailable slot action |
| `unavailableType` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the unavailable slot is used — one of `number`, `voicemail` |

```json
{
  "slot1Number": "string",
  "slot1Type": "number",
  "slot2Number": "string",
  "slot2Type": "number",
  "slot3Number": "string",
  "slot3Type": "number",
  "status": "deleted",
  "timeout": 5,
  "unavailableNumber": "string",
  "unavailableType": "number"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{serviceName}/options" \
  -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}/timeCondition/{serviceName}/options")

# 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}/timeCondition/{serviceName}/options");

print_r($result);
?>
```

## Update time condition options

`PUT /1.0/telephony/{billingAccount}/timeCondition/{serviceName}/options`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/call-handling/#put-telephony-billingaccount-timecondition-servicename-options

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:timeCondition/options/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.TimeConditionOptions`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `slot1Number` | string |  | Number associated to the first slot action |
| `slot1Type` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the first slot is used — one of `number`, `voicemail` |
| `slot2Number` | string |  | Number associated to the second slot action |
| `slot2Type` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the second slot is used — one of `number`, `voicemail` |
| `slot3Number` | string |  | Number associated to the third slot action |
| `slot3Type` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the third slot is used — one of `number`, `voicemail` |
| `status` | telephony.TimeConditionsGlobalStatusEnum |  | Status of time conditions — one of `deleted`, `disabled`, `enabled` |
| `timeout` | telephony.TimeConditionsTimeoutEnum |  | Timeout value of the time condition — one of `5`, `10`, `15`, `20`, `25`, `30`, `35`, `40`, `45`, `50`, `55`, `60`, … |
| `unavailableNumber` | string |  | Number associated to the unavailable slot action |
| `unavailableType` | telephony.TimeConditionsSlotTypeEnum |  | Action type executed when the unavailable slot is used — one of `number`, `voicemail` |

```json
{
  "slot1Number": "string",
  "slot1Type": "number",
  "slot2Number": "string",
  "slot2Type": "number",
  "slot3Number": "string",
  "slot3Type": "number",
  "status": "deleted",
  "timeout": 5,
  "unavailableNumber": "string",
  "unavailableType": "number"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/timeCondition/{serviceName}/options" \
  -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.TimeConditionOptions
result = client.put("/telephony/{billingAccount}/timeCondition/{serviceName}/options",
	slot1Number = None, # Number associated to the first slot action (type: string)
	slot1Type = None, # Action type executed when the first slot is used (type: telephony.TimeConditionsSlotTypeEnum)
	slot2Number = None, # Number associated to the second slot action (type: string)
	slot2Type = None, # Action type executed when the second slot is used (type: telephony.TimeConditionsSlotTypeEnum)
	slot3Number = None, # Number associated to the third slot action (type: string)
	slot3Type = None, # Action type executed when the third slot is used (type: telephony.TimeConditionsSlotTypeEnum)
	status = None, # Status of time conditions (type: telephony.TimeConditionsGlobalStatusEnum)
	timeout = None, # Timeout value of the time condition (type: telephony.TimeConditionsTimeoutEnum, nullable)
	unavailableNumber = None, # Number associated to the unavailable slot action (type: string)
	unavailableType = None, # Action type executed when the unavailable slot is used (type: telephony.TimeConditionsSlotTypeEnum)
)

# 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.TimeConditionOptions
$result = $ovh->put("/telephony/{billingAccount}/timeCondition/{serviceName}/options", array(
	slot1Number => null, // Number associated to the first slot action (type: string)
	slot1Type => null, // Action type executed when the first slot is used (type: telephony.TimeConditionsSlotTypeEnum)
	slot2Number => null, // Number associated to the second slot action (type: string)
	slot2Type => null, // Action type executed when the second slot is used (type: telephony.TimeConditionsSlotTypeEnum)
	slot3Number => null, // Number associated to the third slot action (type: string)
	slot3Type => null, // Action type executed when the third slot is used (type: telephony.TimeConditionsSlotTypeEnum)
	status => null, // Status of time conditions (type: telephony.TimeConditionsGlobalStatusEnum)
	timeout => null, // Timeout value of the time condition (type: telephony.TimeConditionsTimeoutEnum, nullable)
	unavailableNumber => null, // Number associated to the unavailable slot action (type: string)
	unavailableType => null, // Action type executed when the unavailable slot is used (type: telephony.TimeConditionsSlotTypeEnum)
));

print_r($result);
?>
```
