# Web Cloud › Telephony › SIP Lines › Line Settings 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

> 30 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/line-settings/

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

## Operations

- `GET /telephony/lines` — List lines
- `GET /telephony/lines/{serviceName}` — Get a line or trunk
- `POST /telephony/lines/{serviceName}/changeContact` — Change service contacts
- `GET /telephony/lines/{serviceName}/serviceInfos` — Get service information
- `PUT /telephony/lines/{serviceName}/serviceInfos` — Update service information
- `GET /telephony/{billingAccount}/line` — List lines
- `GET /telephony/{billingAccount}/line/{serviceName}` — Get a line
- `PUT /telephony/{billingAccount}/line/{serviceName}` — Update a line
- `GET /telephony/{billingAccount}/line/{serviceName}/antihack` — List numbers blocked by antihack
- `POST /telephony/{billingAccount}/line/{serviceName}/antihack` — Clean antihack restrictions
- `GET /telephony/{billingAccount}/line/{serviceName}/availableSipDomains` — List available SIP domains
- `POST /telephony/{billingAccount}/line/{serviceName}/block` — Block the line
- `GET /telephony/{billingAccount}/line/{serviceName}/canChangePassword` — Check if the SIP password can change
- `POST /telephony/{billingAccount}/line/{serviceName}/cancelConvertToNumber` — Cancel a scheduled conversion to number
- `POST /telephony/{billingAccount}/line/{serviceName}/changePassword` — Change the SIP password
- `POST /telephony/{billingAccount}/line/{serviceName}/convertToNumber` — Schedule a conversion to number
- `GET /telephony/{billingAccount}/line/{serviceName}/ips` — List last registered IPs
- `GET /telephony/{billingAccount}/line/{serviceName}/lastRegistrations` — List last registrations
- `GET /telephony/{billingAccount}/line/{serviceName}/maximumAvailableSimultaneousLines` — Get the maximum simultaneous lines
- `GET /telephony/{billingAccount}/line/{serviceName}/offer` — Get the line offer
- `GET /telephony/{billingAccount}/line/{serviceName}/options` — Get the line options
- `PUT /telephony/{billingAccount}/line/{serviceName}/options` — Update the line options
- `GET /telephony/{billingAccount}/line/{serviceName}/options/availableCodecs` — List available codecs
- `GET /telephony/{billingAccount}/line/{serviceName}/options/defaultCodecs` — Get the default codecs
- `POST /telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines` — Remove extra simultaneous lines
- `GET /telephony/{billingAccount}/line/{serviceName}/simultaneousChannelsDetails` — Get simultaneous channels details
- `GET /telephony/{billingAccount}/line/{serviceName}/tones` — Get the tones
- `PUT /telephony/{billingAccount}/line/{serviceName}/tones` — Update the tones
- `POST /telephony/{billingAccount}/line/{serviceName}/tones/toneUpload` — Upload a tone
- `POST /telephony/{billingAccount}/line/{serviceName}/unblock` — Unblock the line

## List lines

`GET /1.0/telephony/lines`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#get-telephony-lines

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## Get a line or trunk

`GET /1.0/telephony/lines/{serviceName}`

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

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Your line number |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `serviceName` | string | read-only |  |

```json
{
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "serviceName": "string"
}
```

### Example

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

print_r($result);
?>
```

## Change service contacts

`POST /1.0/telephony/lines/{serviceName}/changeContact`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#post-telephony-lines-servicename-changecontact

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:lines/changeContact`

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Your line number |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | string |  | The contact to set as admin contact |
| `contactBilling` | string |  | The contact to set as billing contact |
| `contactTech` | string |  | The contact to set as tech contact |

```json
{
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string"
}
```

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/lines/{serviceName}/changeContact" \
  -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: coreTypes.AccountId:string
result = client.post("/telephony/lines/{serviceName}/changeContact",
	contactAdmin = None, # The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling = None, # The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech = None, # The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
)

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

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

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

// Request body type: coreTypes.AccountId:string
$result = $ovh->post("/telephony/lines/{serviceName}/changeContact", array(
	contactAdmin => null, // The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling => null, // The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech => null, // The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/telephony/lines/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#get-telephony-lines-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Your line number |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

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

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

print_r($result);
?>
```

## Update service information

`PUT /1.0/telephony/lines/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#put-telephony-lines-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Your line number |

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/lines/{serviceName}/serviceInfos" \
  -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: services.Service
result = client.put("/telephony/lines/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, 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: services.Service
$result = $ovh->put("/telephony/lines/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## List lines

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

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

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

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

print_r($result);
?>
```

## Get a line

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canChangePassword` | boolean | read-only | Ability to manage SIP password on this service |
| `description` | string |  |  |
| `deviceSlot` | integer | read-only | The position of the line when attached to a device (0 if the line is not attached to a device) |
| `getPublicOffer` | telephony.LineOffer | read-only | The line offers |
| `getPublicOffer.description` | string |  | The offer description |
| `getPublicOffer.name` | string |  | The offer name |
| `getPublicOffer.price` | order.Price |  | Offer price per month |
| `getPublicOffer.price.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `getPublicOffer.price.text` | string |  |  |
| `getPublicOffer.price.value` | number |  |  |
| `infrastructure` | string | read-only | The infrastructure where is configured the line |
| `isAttachedToOtherLinesPhone` | boolean | read-only | Is this line attached to a phone that belongs to another line? |
| `notifications` | telephony.LineNotificationsOptions |  | Send notifications about Line's diagnosticReports |
| `notifications.logs` | telephony.LineNotificationsLogsOptions |  | Error logging notifications options |
| `notifications.logs.email` | string |  | Email address where to send notifications |
| `notifications.logs.frequency` | telephony.LineNotificationsLogsFrequencyEnum |  | Frequency at which the notifications will be send — one of `Never`, `Once a day`, `Twice a day` |
| `notifications.logs.sendIfNull` | boolean |  | Send a blank notification if there is no diagnosticReports entries for the period |
| `offers` | string[] | read-only | The line offers (Deprecated, prefer "name" in getPublicOffer) |
| `serviceName` | string | read-only |  |
| `serviceType` | telephony.TypeServiceEnum | read-only | All existing types — one of `alias`, `line` |
| `simultaneousLines` | integer | read-only |  |

```json
{
  "canChangePassword": true,
  "description": "string",
  "deviceSlot": 0,
  "getPublicOffer": {
    "description": "string",
    "name": "string",
    "price": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    }
  },
  "infrastructure": "string",
  "isAttachedToOtherLinesPhone": true,
  "notifications": {
    "logs": {
      "email": "string",
      "frequency": "Never",
      "sendIfNull": true
    }
  },
  "offers": [
    "string"
  ],
  "serviceName": "string",
  "serviceType": "alias",
  "simultaneousLines": 0
}
```

### Example

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

print_r($result);
?>
```

## Update a line

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canChangePassword` | boolean | read-only | Ability to manage SIP password on this service |
| `description` | string |  |  |
| `deviceSlot` | integer | read-only | The position of the line when attached to a device (0 if the line is not attached to a device) |
| `getPublicOffer` | telephony.LineOffer | read-only | The line offers |
| `getPublicOffer.description` | string |  | The offer description |
| `getPublicOffer.name` | string |  | The offer name |
| `getPublicOffer.price` | order.Price |  | Offer price per month |
| `getPublicOffer.price.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `getPublicOffer.price.text` | string |  |  |
| `getPublicOffer.price.value` | number |  |  |
| `infrastructure` | string | read-only | The infrastructure where is configured the line |
| `isAttachedToOtherLinesPhone` | boolean | read-only | Is this line attached to a phone that belongs to another line? |
| `notifications` | telephony.LineNotificationsOptions |  | Send notifications about Line's diagnosticReports |
| `notifications.logs` | telephony.LineNotificationsLogsOptions |  | Error logging notifications options |
| `notifications.logs.email` | string |  | Email address where to send notifications |
| `notifications.logs.frequency` | telephony.LineNotificationsLogsFrequencyEnum |  | Frequency at which the notifications will be send — one of `Never`, `Once a day`, `Twice a day` |
| `notifications.logs.sendIfNull` | boolean |  | Send a blank notification if there is no diagnosticReports entries for the period |
| `offers` | string[] | read-only | The line offers (Deprecated, prefer "name" in getPublicOffer) |
| `serviceName` | string | read-only |  |
| `serviceType` | telephony.TypeServiceEnum | read-only | All existing types — one of `alias`, `line` |
| `simultaneousLines` | integer | read-only |  |

```json
{
  "description": "string",
  "notifications": {
    "logs": {
      "email": "string",
      "frequency": "Never",
      "sendIfNull": true
    }
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{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.Line
result = client.put("/telephony/{billingAccount}/line/{serviceName}",
	description = None, #  (type: string)
	notifications = None, # Send notifications about Line's diagnosticReports (type: telephony.LineNotificationsOptions, nullable)
)

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

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

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

// Request body type: telephony.Line
$result = $ovh->put("/telephony/{billingAccount}/line/{serviceName}", array(
	description => null, //  (type: string)
	notifications => null, // Send notifications about Line's diagnosticReports (type: telephony.LineNotificationsOptions, nullable)
));

print_r($result);
?>
```

## List numbers blocked by antihack

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

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

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

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

print_r($result);
?>
```

## Clean antihack restrictions

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

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

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/antihack/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 |
| --- | --- | --- | --- |
| `action` | telephony.AntihackActionEnum | yes | Type of action — one of `AUTHORIZE_ALL`, `AUTHORIZE_ONE_NUMBER`, `BLOCK_ALL`, `BLOCK_ONE_NUMBER` |
| `restricted` | string |  | Number or short number restricted |

```json
{
  "action": "AUTHORIZE_ALL",
  "restricted": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/antihack" \
  -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}/antihack",
	action = None, # Type of action (type: telephony.AntihackActionEnum)
	restricted = None, # Number or short number restricted (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}/antihack", array(
	action => null, // Type of action (type: telephony.AntihackActionEnum)
	restricted => null, // Number or short number restricted (type: string, nullable)
));

print_r($result);
?>
```

## List available SIP domains

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

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

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

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

print_r($result);
?>
```

## Block the line

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

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

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

### 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 |
| --- | --- | --- | --- |
| `mode` | telephony.LineBlockingMode |  | The block mode : outgoing, incoming, both (default: both) — one of `both`, `incoming`, `outgoing` |

```json
{
  "mode": "both"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/block" \
  -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.LineBlockingMode
result = client.post("/telephony/{billingAccount}/line/{serviceName}/block",
	mode = None, # The block mode : outgoing, incoming, both (default: both) (type: telephony.LineBlockingMode, nullable)
)

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

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

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

// Request body type: telephony.LineBlockingMode
$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/block", array(
	mode => null, // The block mode : outgoing, incoming, both (default: both) (type: telephony.LineBlockingMode, nullable)
));

print_r($result);
?>
```

## Check if the SIP password can change

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

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

**Status:** Deprecated, will be removed  
**Deprecated** since 2018-03-01, removed on 2018-04-01; use `/telephony/{billingAccount}/line/{serviceName}/` instead.  
**IAM actions:** `voip:apiovh:line/canChangePassword/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 | boolean | successful operation |

```json
true
```

### Example

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

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

print_r($result);
?>
```

## Cancel a scheduled conversion to number

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

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

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

### Parameters

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

### Responses

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

### Example

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

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

print_r($result);
?>
```

## Change the SIP password

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

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

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

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

print_r($result);
?>
```

## Schedule a conversion to number

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

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

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

### 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.OfferTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | telephony.OfferTaskActionEnum | read-only | Actual action that will be executed — one of `convertToAlias`, `convertToSip`, `migrateToNewVoicemail`, `removeSimltaneousLines`, `switchServer`, `termination`, `updateFirmware`, `upgrade` |
| `executionDate` | string (date-time) |  | Planned execution date |
| `status` | telephony.TaskStatusEnum | read-only | Current status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |
| `type` | telephony.OfferTaskTypeEnum | read-only | Type of operation that will be executed — one of `line`, `offer`, `option`, `phone` |

```json
{
  "action": "convertToAlias",
  "executionDate": "2024-01-01T12:00:00Z",
  "status": "doing",
  "taskId": 0,
  "type": "line"
}
```

### Example

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

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

print_r($result);
?>
```

## List last registered IPs

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `datetime` | string (date-time) |  |  |
| `ip` | ip |  | IP address (e.g., 192.0.2.0) |

```json
[
  {
    "datetime": "2024-01-01T12:00:00Z",
    "ip": "192.0.2.0"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## List last registrations

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `datetime` | string (date-time) |  | SIP registration's date |
| `domain` | string |  | SIP registration's domain |
| `ip` | ip |  | SIP registration's IP |
| `localIp` | ip |  | SIP registration's local device IP |
| `localPort` | integer |  | SIP registration's local device port |
| `port` | integer |  | SIP registration's port |
| `userAgent` | string |  | SIP registration's User-Agent |

```json
[
  {
    "datetime": "2024-01-01T12:00:00Z",
    "domain": "string",
    "ip": "192.0.2.0",
    "localIp": "192.0.2.0",
    "localPort": 0,
    "port": 0,
    "userAgent": "string"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get the maximum simultaneous lines

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

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

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

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

print_r($result);
?>
```

## Get the line offer

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | The offer description |
| `name` | string |  | The offer name |
| `price` | order.Price |  | Offer price per month |
| `price.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `price.text` | string |  |  |
| `price.value` | number |  |  |

```json
{
  "description": "string",
  "name": "string",
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  }
}
```

### Example

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

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

print_r($result);
?>
```

## Get the line options

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `absentSubscriber` | boolean |  |  |
| `anonymousCallRejection` | boolean |  | Reject anonymous calls |
| `callRestrictionIncoming` | boolean |  | Whether or not the line has restriction on incoming calls |
| `callRestrictionOutgoing` | boolean |  | Whether or not the line has restriction on outgoing calls |
| `callWaiting` | boolean |  | If the line receives a new call and the line is already in communication, this new call is dispatched once the current call is completed |
| `codecs` | string |  | Codecs preferences |
| `defaultVoicemail` | phoneNumber |  | The default voicemail of the line. It can be the voicemail of any line of your account. |
| `displayNumber` | phoneNumber |  | Phone number |
| `doNotDisturb` | boolean |  |  |
| `domain` | string |  | The domain to configure in your SIP client. |
| `forwardBackup` | boolean |  | Enable calls forward when the line is unavailable |
| `forwardBackupNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the forward when the line is unavailable — one of `fax`, `number`, `voicemail` |
| `forwardBackupNumber` | phoneNumber |  | Destination of the forward when the line is unavailable |
| `forwardBusy` | boolean |  | Enable calls forward when the line is busy |
| `forwardBusyNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the forward when the line is busy — one of `fax`, `number`, `voicemail` |
| `forwardBusyNumber` | phoneNumber |  | Destination of the forward when the line is busy |
| `forwardNoReply` | boolean |  | Enable calls forward on no-reply |
| `forwardNoReplyDelay` | integer |  | Delay before forward on no-reply |
| `forwardNoReplyNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the forward on no-reply — one of `fax`, `number`, `voicemail` |
| `forwardNoReplyNumber` | phoneNumber |  | Destination of the forward on no-reply |
| `forwardUnconditional` | boolean |  | Enable unconditional calls forward |
| `forwardUnconditionalNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the unconditional forward — one of `fax`, `number`, `voicemail` |
| `forwardUnconditionalNumber` | phoneNumber |  | Destination of the unconditional forward |
| `identificationRestriction` | boolean |  | Do not display your number |
| `intercom` | telephony.LineOptionIntercomEnum |  | Intercom mode: takes automatically the call with the loudspeaker — one of `no`, `prefixed`, `yes` |
| `ipRestrictions` | ipBlock[] |  | The ip restrictions of your line |
| `language` | telephony.LineOptionLanguageEnum |  | Language of the line — one of `Dutch`, `English (UK)`, `French`, `French (BE)`, `German`, `Italian`, `Spanish` |
| `lockOutCall` | boolean |  | Disallow outgoing calls |
| `lockOutCallPassword` | string |  | Disallow outgoing calls password |
| `proxy` | string | read-only | The outbound proxy to configure in your SIP client. |
| `recordOutgoingCallsBeta` | boolean |  | Enable or disable record of outgoing calls |
| `toneOnCallWaitingSoundId` | integer |  | Sound ID of on-call-waiting tone |
| `toneOnHoldSoundId` | integer |  | Sound ID of on-hold tone |
| `toneRingbackSoundId` | integer |  | Sound ID of ringback tone |
| `voicemailExternalNumber` | phoneNumber | read-only | Voicemail number to dial from any other line |
| `voicemailInternalNumber` | string | read-only | Voicemail short number to dial from the line |

```json
{
  "absentSubscriber": true,
  "anonymousCallRejection": true,
  "callRestrictionIncoming": true,
  "callRestrictionOutgoing": true,
  "callWaiting": true,
  "codecs": "string",
  "defaultVoicemail": "string",
  "displayNumber": "string",
  "doNotDisturb": true,
  "domain": "string",
  "forwardBackup": true,
  "forwardBackupNature": "fax",
  "forwardBackupNumber": "string",
  "forwardBusy": true,
  "forwardBusyNature": "fax",
  "forwardBusyNumber": "string",
  "forwardNoReply": true,
  "forwardNoReplyDelay": 0,
  "forwardNoReplyNature": "fax",
  "forwardNoReplyNumber": "string",
  "forwardUnconditional": true,
  "forwardUnconditionalNature": "fax",
  "forwardUnconditionalNumber": "string",
  "identificationRestriction": true,
  "intercom": "no",
  "ipRestrictions": [
    "192.0.2.0/24"
  ],
  "language": "Dutch",
  "lockOutCall": true,
  "lockOutCallPassword": "string",
  "proxy": "string",
  "recordOutgoingCallsBeta": true,
  "toneOnCallWaitingSoundId": 0,
  "toneOnHoldSoundId": 0,
  "toneRingbackSoundId": 0,
  "voicemailExternalNumber": "string",
  "voicemailInternalNumber": "string"
}
```

### Example

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

print_r($result);
?>
```

## Update the line options

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `absentSubscriber` | boolean |  |  |
| `anonymousCallRejection` | boolean |  | Reject anonymous calls |
| `callRestrictionIncoming` | boolean |  | Whether or not the line has restriction on incoming calls |
| `callRestrictionOutgoing` | boolean |  | Whether or not the line has restriction on outgoing calls |
| `callWaiting` | boolean |  | If the line receives a new call and the line is already in communication, this new call is dispatched once the current call is completed |
| `codecs` | string |  | Codecs preferences |
| `defaultVoicemail` | phoneNumber |  | The default voicemail of the line. It can be the voicemail of any line of your account. |
| `displayNumber` | phoneNumber |  | Phone number |
| `doNotDisturb` | boolean |  |  |
| `domain` | string |  | The domain to configure in your SIP client. |
| `forwardBackup` | boolean |  | Enable calls forward when the line is unavailable |
| `forwardBackupNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the forward when the line is unavailable — one of `fax`, `number`, `voicemail` |
| `forwardBackupNumber` | phoneNumber |  | Destination of the forward when the line is unavailable |
| `forwardBusy` | boolean |  | Enable calls forward when the line is busy |
| `forwardBusyNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the forward when the line is busy — one of `fax`, `number`, `voicemail` |
| `forwardBusyNumber` | phoneNumber |  | Destination of the forward when the line is busy |
| `forwardNoReply` | boolean |  | Enable calls forward on no-reply |
| `forwardNoReplyDelay` | integer |  | Delay before forward on no-reply |
| `forwardNoReplyNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the forward on no-reply — one of `fax`, `number`, `voicemail` |
| `forwardNoReplyNumber` | phoneNumber |  | Destination of the forward on no-reply |
| `forwardUnconditional` | boolean |  | Enable unconditional calls forward |
| `forwardUnconditionalNature` | telephony.LineOptionForwardNatureTypeEnum |  | Nature of the unconditional forward — one of `fax`, `number`, `voicemail` |
| `forwardUnconditionalNumber` | phoneNumber |  | Destination of the unconditional forward |
| `identificationRestriction` | boolean |  | Do not display your number |
| `intercom` | telephony.LineOptionIntercomEnum |  | Intercom mode: takes automatically the call with the loudspeaker — one of `no`, `prefixed`, `yes` |
| `ipRestrictions` | ipBlock[] |  | The ip restrictions of your line |
| `language` | telephony.LineOptionLanguageEnum |  | Language of the line — one of `Dutch`, `English (UK)`, `French`, `French (BE)`, `German`, `Italian`, `Spanish` |
| `lockOutCall` | boolean |  | Disallow outgoing calls |
| `lockOutCallPassword` | string |  | Disallow outgoing calls password |
| `proxy` | string | read-only | The outbound proxy to configure in your SIP client. |
| `recordOutgoingCallsBeta` | boolean |  | Enable or disable record of outgoing calls |
| `toneOnCallWaitingSoundId` | integer |  | Sound ID of on-call-waiting tone |
| `toneOnHoldSoundId` | integer |  | Sound ID of on-hold tone |
| `toneRingbackSoundId` | integer |  | Sound ID of ringback tone |
| `voicemailExternalNumber` | phoneNumber | read-only | Voicemail number to dial from any other line |
| `voicemailInternalNumber` | string | read-only | Voicemail short number to dial from the line |

```json
{
  "absentSubscriber": true,
  "anonymousCallRejection": true,
  "callRestrictionIncoming": true,
  "callRestrictionOutgoing": true,
  "callWaiting": true,
  "codecs": "string",
  "defaultVoicemail": "string",
  "displayNumber": "string",
  "doNotDisturb": true,
  "domain": "string",
  "forwardBackup": true,
  "forwardBackupNature": "fax",
  "forwardBackupNumber": "string",
  "forwardBusy": true,
  "forwardBusyNature": "fax",
  "forwardBusyNumber": "string",
  "forwardNoReply": true,
  "forwardNoReplyDelay": 0,
  "forwardNoReplyNature": "fax",
  "forwardNoReplyNumber": "string",
  "forwardUnconditional": true,
  "forwardUnconditionalNature": "fax",
  "forwardUnconditionalNumber": "string",
  "identificationRestriction": true,
  "intercom": "no",
  "ipRestrictions": [
    "192.0.2.0/24"
  ],
  "language": "Dutch",
  "lockOutCall": true,
  "lockOutCallPassword": "string",
  "recordOutgoingCallsBeta": true,
  "toneOnCallWaitingSoundId": 0,
  "toneOnHoldSoundId": 0,
  "toneRingbackSoundId": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{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.LineOptions
result = client.put("/telephony/{billingAccount}/line/{serviceName}/options",
	absentSubscriber = None, #  (type: boolean)
	anonymousCallRejection = None, # Reject anonymous calls (type: boolean)
	callRestrictionIncoming = None, # Whether or not the line has restriction on incoming calls (type: boolean)
	callRestrictionOutgoing = None, # Whether or not the line has restriction on outgoing calls (type: boolean)
	callWaiting = None, # If the line receives a new call and the line is already in communication, this new call is dispatched once the current call is completed (type: boolean)
	codecs = None, # Codecs preferences (type: string)
	defaultVoicemail = None, # The default voicemail of the line. It can be the voicemail of any line of your account. (type: phoneNumber)
	displayNumber = None, #  (type: )
	doNotDisturb = None, #  (type: boolean)
	domain = None, # The domain to configure in your SIP client. (type: string)
	forwardBackup = None, # Enable calls forward when the line is unavailable (type: boolean)
	forwardBackupNature = None, # Nature of the forward when the line is unavailable (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardBackupNumber = None, # Destination of the forward when the line is unavailable (type: phoneNumber)
	forwardBusy = None, # Enable calls forward when the line is busy (type: boolean)
	forwardBusyNature = None, # Nature of the forward when the line is busy (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardBusyNumber = None, # Destination of the forward when the line is busy (type: phoneNumber)
	forwardNoReply = None, # Enable calls forward on no-reply (type: boolean)
	forwardNoReplyDelay = None, # Delay before forward on no-reply (type: integer)
	forwardNoReplyNature = None, # Nature of the forward on no-reply (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardNoReplyNumber = None, # Destination of the forward on no-reply (type: phoneNumber)
	forwardUnconditional = None, # Enable unconditional calls forward (type: boolean)
	forwardUnconditionalNature = None, # Nature of the unconditional forward (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardUnconditionalNumber = None, # Destination of the unconditional forward (type: phoneNumber)
	identificationRestriction = None, # Do not display your number (type: boolean)
	intercom = None, # Intercom mode: takes automatically the call with the loudspeaker (type: telephony.LineOptionIntercomEnum)
	ipRestrictions = None, # The ip restrictions of your line (type: array)
	language = None, # Language of the line (type: telephony.LineOptionLanguageEnum)
	lockOutCall = None, # Disallow outgoing calls (type: boolean)
	lockOutCallPassword = None, # Disallow outgoing calls password (type: string, nullable)
	recordOutgoingCallsBeta = None, # Enable or disable record of outgoing calls (type: boolean)
	toneOnCallWaitingSoundId = None, # Sound ID of on-call-waiting tone (type: integer, nullable)
	toneOnHoldSoundId = None, # Sound ID of on-hold tone (type: integer, nullable)
	toneRingbackSoundId = None, # Sound ID of ringback tone (type: integer, nullable)
)

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

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

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

// Request body type: telephony.LineOptions
$result = $ovh->put("/telephony/{billingAccount}/line/{serviceName}/options", array(
	absentSubscriber => null, //  (type: boolean)
	anonymousCallRejection => null, // Reject anonymous calls (type: boolean)
	callRestrictionIncoming => null, // Whether or not the line has restriction on incoming calls (type: boolean)
	callRestrictionOutgoing => null, // Whether or not the line has restriction on outgoing calls (type: boolean)
	callWaiting => null, // If the line receives a new call and the line is already in communication, this new call is dispatched once the current call is completed (type: boolean)
	codecs => null, // Codecs preferences (type: string)
	defaultVoicemail => null, // The default voicemail of the line. It can be the voicemail of any line of your account. (type: phoneNumber)
	displayNumber => null, //  (type: )
	doNotDisturb => null, //  (type: boolean)
	domain => null, // The domain to configure in your SIP client. (type: string)
	forwardBackup => null, // Enable calls forward when the line is unavailable (type: boolean)
	forwardBackupNature => null, // Nature of the forward when the line is unavailable (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardBackupNumber => null, // Destination of the forward when the line is unavailable (type: phoneNumber)
	forwardBusy => null, // Enable calls forward when the line is busy (type: boolean)
	forwardBusyNature => null, // Nature of the forward when the line is busy (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardBusyNumber => null, // Destination of the forward when the line is busy (type: phoneNumber)
	forwardNoReply => null, // Enable calls forward on no-reply (type: boolean)
	forwardNoReplyDelay => null, // Delay before forward on no-reply (type: integer)
	forwardNoReplyNature => null, // Nature of the forward on no-reply (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardNoReplyNumber => null, // Destination of the forward on no-reply (type: phoneNumber)
	forwardUnconditional => null, // Enable unconditional calls forward (type: boolean)
	forwardUnconditionalNature => null, // Nature of the unconditional forward (type: telephony.LineOptionForwardNatureTypeEnum)
	forwardUnconditionalNumber => null, // Destination of the unconditional forward (type: phoneNumber)
	identificationRestriction => null, // Do not display your number (type: boolean)
	intercom => null, // Intercom mode: takes automatically the call with the loudspeaker (type: telephony.LineOptionIntercomEnum)
	ipRestrictions => null, // The ip restrictions of your line (type: array)
	language => null, // Language of the line (type: telephony.LineOptionLanguageEnum)
	lockOutCall => null, // Disallow outgoing calls (type: boolean)
	lockOutCallPassword => null, // Disallow outgoing calls password (type: string, nullable)
	recordOutgoingCallsBeta => null, // Enable or disable record of outgoing calls (type: boolean)
	toneOnCallWaitingSoundId => null, // Sound ID of on-call-waiting tone (type: integer, nullable)
	toneOnHoldSoundId => null, // Sound ID of on-hold tone (type: integer, nullable)
	toneRingbackSoundId => null, // Sound ID of ringback tone (type: integer, nullable)
));

print_r($result);
?>
```

## List available codecs

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/options/availableCodecs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#get-telephony-billingaccount-line-servicename-options-availablecodecs

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

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

print_r($result);
?>
```

## Get the default codecs

`GET /1.0/telephony/{billingAccount}/line/{serviceName}/options/defaultCodecs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#get-telephony-billingaccount-line-servicename-options-defaultcodecs

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

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

print_r($result);
?>
```

## Remove extra simultaneous lines

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

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

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

### 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 |
| --- | --- | --- | --- |
| `quantityRemove` | integer | yes | The quantity of extra simultaneous lines to remove |

```json
{
  "quantityRemove": 0
}
```

### Responses

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

### Example

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

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

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

# Request body type: long
result = client.post("/telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines",
	quantityRemove = None, # The quantity of extra simultaneous lines to remove (type: long)
)

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

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

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

// Request body type: long
$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines", array(
	quantityRemove => null, // The quantity of extra simultaneous lines to remove (type: long)
));

print_r($result);
?>
```

## Get simultaneous channels details

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `basic` | integer |  | Basic quantity of simultaneous channels included in the line. |
| `current` | integer |  | Current quantity of simultaneous channels. |
| `extra` | integer |  | Extra quantity of simultaneous channels added to the line. |
| `maximum` | integer |  | Maximum quantity of simultaneous channels the line can have. |
| `toBeDeleted` | integer |  | Quantity of simultaneous channels going to be deleted at the end of the billing cycle. |

```json
{
  "basic": 0,
  "current": 0,
  "extra": 0,
  "maximum": 0,
  "toBeDeleted": 0
}
```

### Example

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

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

print_r($result);
?>
```

## Get the tones

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callWaiting` | telephony.TonesEnum |  | Tone played when caller is waiting in queue — one of `Custom sound`, `None` |
| `endCall` | telephony.TonesEnum |  | Tone played when callee is ending call — one of `Custom sound`, `None` |
| `onHold` | telephony.TonesOnHoldEnum |  | Tone played when caller is put on hold — one of `Custom sound`, `None`, `Predefined 1`, `Predefined 2` |
| `ringback` | telephony.TonesEnum |  | Ringback tone — one of `Custom sound`, `None` |

```json
{
  "callWaiting": "Custom sound",
  "endCall": "Custom sound",
  "onHold": "Custom sound",
  "ringback": "Custom sound"
}
```

### Example

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

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

print_r($result);
?>
```

## Update the tones

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

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

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `callWaiting` | telephony.TonesEnum |  | Tone played when caller is waiting in queue — one of `Custom sound`, `None` |
| `endCall` | telephony.TonesEnum |  | Tone played when callee is ending call — one of `Custom sound`, `None` |
| `onHold` | telephony.TonesOnHoldEnum |  | Tone played when caller is put on hold — one of `Custom sound`, `None`, `Predefined 1`, `Predefined 2` |
| `ringback` | telephony.TonesEnum |  | Ringback tone — one of `Custom sound`, `None` |

```json
{
  "callWaiting": "Custom sound",
  "endCall": "Custom sound",
  "onHold": "Custom sound",
  "ringback": "Custom sound"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/tones" \
  -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.Tones
result = client.put("/telephony/{billingAccount}/line/{serviceName}/tones",
	callWaiting = None, # Tone played when caller is waiting in queue (type: telephony.TonesEnum)
	endCall = None, # Tone played when callee is ending call (type: telephony.TonesEnum)
	onHold = None, # Tone played when caller is put on hold (type: telephony.TonesOnHoldEnum)
	ringback = None, # Ringback tone (type: telephony.TonesEnum)
)

# 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.Tones
$result = $ovh->put("/telephony/{billingAccount}/line/{serviceName}/tones", array(
	callWaiting => null, // Tone played when caller is waiting in queue (type: telephony.TonesEnum)
	endCall => null, // Tone played when callee is ending call (type: telephony.TonesEnum)
	onHold => null, // Tone played when caller is put on hold (type: telephony.TonesOnHoldEnum)
	ringback => null, // Ringback tone (type: telephony.TonesEnum)
));

print_r($result);
?>
```

## Upload a tone

`POST /1.0/telephony/{billingAccount}/line/{serviceName}/tones/toneUpload`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/sip-lines/line-settings/#post-telephony-billingaccount-line-servicename-tones-toneupload

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:line/tones/toneUpload`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `documentId` | string |  | ID of the /me/document file you want to import |
| `type` | telephony.TonesTypeEnum | yes | Tones type — one of `callWaiting`, `endCall`, `onHold`, `ringback` |
| `url` | string |  | URL of the file you want to import (instead of /me/document ID) |

```json
{
  "documentId": "string",
  "type": "callWaiting",
  "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}/line/{serviceName}/tones/toneUpload" \
  -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}/line/{serviceName}/tones/toneUpload",
	documentId = None, # ID of the /me/document file you want to import (type: string, nullable)
	type = None, #  (type: telephony.TonesTypeEnum)
	url = None, # URL of the file you want to import (instead of /me/document ID) (type: string, nullable)
)

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

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

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

// Request body type: string
$result = $ovh->post("/telephony/{billingAccount}/line/{serviceName}/tones/toneUpload", array(
	documentId => null, // ID of the /me/document file you want to import (type: string, nullable)
	type => null, //  (type: telephony.TonesTypeEnum)
	url => null, // URL of the file you want to import (instead of /me/document ID) (type: string, nullable)
));

print_r($result);
?>
```

## Unblock the line

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

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

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

### Parameters

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

### Responses

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

### Example

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

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

print_r($result);
?>
```
