# Random Caller ID (CLI) on Voice calls

This article provides details and instructions for placing calls with CLIs (calling line identifications, aka Caller I&#x44;**)** selected randomly among a pre-defined set of numbers.

In this case, Voice relies on a “Number Pool”. MessageBird’s Number Pool is a pre-defined set of numbers with a Pool Service (what defines the way a number is selected in a pool) and additional configuration.

Currently, MessageBird supports Random CLI service, which will pick a random number within the pool, with a configuration option to pick only numbers belonging to the same destination country. To place a call with a Random CLI, our Voice product will get the CLI from the Number service.

Let’s see how to set up a number pool and how to use it with both Voice API and SIP trunking calls.

## Set up a new Random CLI Number Pool

First, you need to create a new Random CLI Number Pool. You can create it using the dashboard interface or the [Numbers API](https://developers.messagebird.com/api/numbers/#number-pools).

For example:

| **Property** | **Value** |
| ------------ | --------- |
| Name         | my\_pool  |
| Service      | randomcli |
| ByCountry    | false     |

Then, you can add a couple of numbers. Both [Verified](/connectivity-platform/getting-started/verified-caller-ids.md) and Owned (purchased at MessageBird) numbers are allowed.

## Voice API calls

You are now ready to place a call with a random CLI using Voice API. In order to do it, you will use the attribute \`sourcePool\` instead of \`source\` in the [call object.](https://developers.messagebird.com/api/voice-calling/#calls)

**WARNING**: Do not set both \`sourcePool\` and \`source\` fields, otherwise the API will return a 400 error that, “Both source and sourcePool cannot be set at the same time”.

## SIP Trunking Calls

First, you must enable number pooling by activating the option “Randomise caller ID” in the SIP trunk settings. By default, this is not enabled. You can either create a new trunk or just edit an existing one.

Then, click **Save**.

<figure><img src="/files/DIjM2FbyxdtnNAsKuDo1" alt=""><figcaption></figcaption></figure>

**WARNING**: once Randomise caller ID is enabled, you must specify a number pool to use otherwise the call won’t be placed.

Now, you can place calls using that SIP trunk. You can define which pool to use passing its name with one of the following methods:

1. Using the custom SIP header \`X-MB-NPS\` in the INVITE
2. Using the Display portion of the From header in the INVITE.\
   For example, \`From: “my\_pool” \<sip:<12345@mytrunk.sip.messagebird.com>>\`
3. Setting a default number pool in the SIP trunk page.

MessageBird will try all the above methods from higher to lower priority to find what pool to use and pick a random number from it.

## Select random numbers from the same country as the call destination

You can place calls selecting a random number among only the ones from the same country in a pool.

In order to do this, enable the \`byCountry\` option in the pool’s configuration and place a call using the methods described above. NOTE: be sure to have numbers belonging to the countries you want to dial, otherwise, the call will fail.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/connectivity-platform/voice-calls/random-caller-id-cli-on-voice-calls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
