# Connect a Virtual Number to an Agent

> Assign a phone number to a voice agent, route inbound calls to it, use the number as outbound caller ID for calls and campaigns, test it, and forward calls from an existing number

Source: https://edesy.in/docs/voice-agent/phone-numbers/connect-virtual-number

Once you have a number, connecting it to an agent takes a minute. This page covers an Edesy Indian number bought in the app, a number from your own provider (Twilio, Plivo, Exotel, Vobiz, Telnyx) or SIP trunk, and an existing number you forward.

Don't have a number yet? See [Purchasing Numbers](https://edesy.in/docs/voice-agent/phone-numbers/purchasing) to buy a KYC-verified Indian number, or [BYOP Setup](https://edesy.in/docs/voice-agent/phone-numbers/byop) to connect your provider.

## Assign the number to an agent

**When you buy an Edesy number**, pick the agent under **Answer inbound calls with** in the Buy Number dialog. Nothing else is needed.

**For a number you already have in the workspace:**

1. Go to **Phone Numbers**
2. Open the number
3. Under **Route inbound calls to**, choose the agent
4. Save

If no agent is chosen, the number shows that inbound calls aren't answered by an agent.

## Inbound routing

Assigning a number to an agent configures inbound routing automatically: calls to the number are answered by that agent. You don't need to paste a webhook URL for numbers bought in the app.

For numbers on your own provider or SIP trunk, the provider side still has to send calls to Edesy:

- **Twilio, Plivo, Vobiz, Telnyx:** connecting the account and choosing the agent sets this up where the provider allows it. If the number shows an inbound setup warning, follow the help shown on the number.
- **Exotel:** enable the Voicebot applet in your Exotel flow. See [Exotel Setup](https://edesy.in/docs/voice-agent/phone-numbers/exotel-setup).
- **SIP trunk:** point the DID at Edesy on the carrier side, and whitelist Edesy's SIP IP for static-IP trunks. See [SIP Trunk](https://edesy.in/docs/voice-agent/telephony/sip-trunk).

Changing the agent later takes effect for the next call. A number answers with one agent at a time.

## Use the number as outbound caller ID

The same number can show as caller ID when the agent calls out, so customers can call back the number that called them.

| Where | What to set |
|---|---|
| **Agent** | In the agent's phone settings, choose the outbound number this agent dials from. Leave it on the workspace default to follow the workspace. |
| **Workspace** | Mark a number as the **Default caller ID**. Calls that don't name a number (API, SDK, workflows, retries) dial from it, unless the agent has its own outbound number. |
| **Campaign** | Choose the number when you set up the campaign. |

If you release the workspace's default caller ID, choose a new default; otherwise calls without a number dial from your oldest number.

**Outbound calling in India:** promotional and sales calls are covered by TRAI rules on commercial communication and DND. Check what your number provider allows before you run a campaign. See [Campaigns](https://edesy.in/docs/voice-agent/campaigns).

## Test with a call

1. Open the number on **Phone Numbers** and click **Place a test inbound call**
2. Dial the number shown from any phone
3. The dialog shows **Call received** as the call arrives, and your agent answers

The same panel has **Check connection** to check the number's provider connection, and a link to **Test call from Test Center**.

If the call doesn't arrive within a minute or two:

- Check that the number is assigned to an active agent
- For your own provider, confirm the provider's inbound setting points at Edesy
- For Exotel, confirm the Voicebot applet is enabled
- Check that your provider account (if you use one) has prepaid balance

## Forward calls from an existing number

You don't have to replace the number your customers already know. Porting a number into Edesy is not offered in the app, so keep the number where it is and forward its calls to the agent's number:

1. Get a number for the agent: buy an Edesy number or connect one from your provider, and assign it to the agent as above
2. On your existing number's phone system, carrier or mobile, set call forwarding to the agent's number

Common patterns:

| Pattern | Forwarding rule on your existing number |
|---|---|
| **Always** | Forward all calls |
| **After hours** | Forward all calls outside business hours, using your phone system's schedule, or turn forwarding on at closing time and off in the morning |
| **Overflow** | Forward when busy, not answered or unreachable |

On most Indian mobile networks you can set conditional forwarding with the standard GSM codes, for example `**67*<agent number>#` (when busy), `**61*<agent number>#` (when not answered), `**62*<agent number>#` (when unreachable) and `##002#` to cancel all forwarding. Your carrier may charge for forwarded calls.

To forward an Edesy Phone business number, see [Send Calls to an AI Agent](https://edesy.in/docs/business-phone/calling/send-calls-to-ai-agent).

## Related

- [Phone numbers for AI voice agents](https://edesy.in/ai-voice-agent/features/phone-numbers): the ways to get a number, compared
- [Virtual numbers in India](https://edesy.in/virtual-phone-number)
- [Telephony Providers Guide](https://edesy.in/docs/voice-agent/phone-numbers/providers-guide)
