# Vonage

> Connect Vonage SIP trunking to Edesy as a bring-your-own carrier with an IP-authenticated gateway at sip.nexmo.com and inbound numbers forwarded to Edesy.

Source: https://edesy.in/docs/sip-trunking/byoc/vonage

To use Vonage with Edesy, register an IP-authenticated carrier whose gateway is `sip.nexmo.com` on port `5060` over UDP, with no registration. On the Vonage side, allow Edesy's signalling IP for outbound calls and set your Vonage numbers to forward inbound calls to the Edesy SIP address you get during onboarding.

## Values

| Setting | Value |
|---|---|
| Auth to Vonage | IP-based (`requires_register: false`) |
| Gateway | `sip.nexmo.com`, port `5060`, UDP |
| Inbound target on Vonage | `sip:<number>@<edesy-sip-address>:5070` |

## 1. Register the carrier on Edesy

```bash
curl -X POST https://voice-api.edesy.in/v1/trunk-portal/trunks \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Vonage",
    "requires_register": false,
    "host": "sip.nexmo.com",
    "port": 5060,
    "protocol": "udp",
    "numbers": ["+44XXXXXXXXXX"]
  }'
```

## 2. Configure Vonage

1. In the Vonage dashboard, add Edesy's signalling IP to the IP addresses allowed to send SIP to your account.
2. For each number, set inbound calls to forward to a SIP URI at the Edesy address from onboarding.

## 3. Test

- Outbound: `POST /v1/calls` with `from` set to one of your Vonage numbers.
- Inbound: dial the Vonage number.

## FAQ

### Outbound calls are rejected by Vonage.

Check that Edesy's IP is allowed on your Vonage account and that the caller ID is a Vonage number you own.

### Does Vonage need a tech prefix?

Not usually. Use `tech_prefix` only if your Vonage account requires one.

See [Bring Your Own Carrier](https://edesy.in/docs/sip-trunking/byoc) for how routing works.
