﻿
# Unlimited Subdomains

In the usual Cloud Softphone setup, the SIP domain is part of the app provisioning downloaded from the [Cloud Softphone web portal](https://providers.cloudsoftphone.com/). That provisioning is common to all users of the same Cloud ID, so every account uses the same SIP domain.

Unlimited Subdomains is for apps whose users register on different SIP domains. The SIP domain of an account is the Account XML [`host`](../frameworks/account/account.md#host) property. It is used in SIP URIs as `username@host`. It is also the SIP server the app connects to when [`proxy`](../frameworks/account/account.md#proxy) is not set.

## Before you begin

With Unlimited Subdomains, the portal provisioning does not supply one shared `host`. You must provide a `host` for every account by using one of the methods below. An account without a `host` cannot register.

If your app currently provisions one shared SIP domain, contact Acrobits support before removing it from the app configuration. See [Contact us](#contact-us).

## External provisioning

The preferred method is [external provisioning](../frameworks/provisioning/external_provisioning.md). The external provisioning service receives the [input parameters](../frameworks/provisioning/input_params.md) supplied during provisioning and returns [Account XML](../frameworks/account/account.md), which is merged with the defaults from the Cloud Softphone portal. Return `host` together with the SIP credentials:

```xml
<account>
    <username>johndoe</username>
    <password>secretPhrase</password>
    <host>sip.example.com</host>
</account>
```

Nodes returned in the `<account>` XML override values from the base provisioning, so each user gets the SIP domain selected by your web service. The same node can be updated later by re-provisioning.

Configure the web service in the Cloud Softphone web portal. See [External Provisioning](../frameworks/provisioning/external_provisioning.md) for details about the request, response, and `InitialProvisioning*` and `extProv*` parameters.

## CSC link and QR code

A [CSC link](../frameworks/provisioning/cloud-account-management/csc-links.md), also called a provisioning link, can carry the SIP domain as an extra query parameter named `host`. The same extra can be added in the portal [QR code generator](https://providers.cloudsoftphone.com/ui/tools/qrgenerator).

Sign in to the [Cloud Softphone web portal](https://providers.cloudsoftphone.com/) and open **Tools → QR codes generator**.

1. Enter the **Cloud ID**. Append `*` to provision the editable version.
2. Enter the **Username**. Type it as the user would, including `@`.
3. Enter the **Password**, or leave it empty so the user types it in the app.
4. Under **Custom fields**, set the name to `host` and the value to the SIP domain, then click **Add field**.
5. Leave **Size** at **Auto (recommended)** and click **Generate**.

The result shows the QR code and the CSC text stored in it. The generator URL-encodes the values. For username `user@example.com`, password `password123`, Cloud ID `MYCLOUDID`, and host `sip.example.com`, the code contains:

```text
csc:user%40example.com:password123@MYCLOUDID?host=sip.example.com
```

The `host` value is available as the `global[host]` placeholder. Acrobits must configure the app to copy it to the account `host`. See [Contact us](#contact-us).

To build the CSC link yourself, follow the [CSC Link specification](../frameworks/provisioning/cloud-account-management/csc-links.md). The host part of that link is the Cloud ID. The SIP domain is the `host` query parameter. See [QR Codes](../frameworks/provisioning/qr.md) for the generator fields.

## Domain field in the app

The initial screen collects only the [input parameters](../frameworks/provisioning/input_params.md): Cloud ID, username, and password. For white-label apps, the Cloud ID is already known.

Acrobits support can add a domain field to the account form. The end user enters the SIP domain, and the app stores it as `host`.

This is configured per app. See [Contact us](#contact-us).

## Contact us

You can configure external provisioning in the Cloud Softphone web portal. Changes to the shared `host`, support for the CSC or QR-code `host` extra, and a domain field in the account form require an app-configuration change by Acrobits.

Contact us through the [Cloud Softphone web portal](https://providers.cloudsoftphone.com/). Include the Cloud ID and the method you want to use.

