# FreePBX SIP Trunk Setup for India: Step by Step (2026)

> Connect FreePBX 17 (PJSIP) to an Indian SIP trunk: trunk fields, E.164 dial patterns for Indian numbers, inbound routes, NAT settings, codecs, and a troubleshooting table.

Source: https://edesy.in/blog/freepbx-sip-trunk-setup-india-2026

**To connect FreePBX 17 to an Indian SIP trunk, add a PJSIP trunk with your trunk host on port 5070,
outbound authentication and registration set to Send, enable only ulaw and alaw, then add an outbound route
that prepends 91 to 10-digit numbers. Set External Address and Local Networks if FreePBX is behind NAT.**

> **Get the trunk details first:** [Create a termination trunk](https://voice-app.edesy.in/?utm_source=edesy.in&utm_medium=blog&utm_campaign=freepbx-sip-trunk-setup-india-2026) — the trunk page shows the host, username and password you'll paste below.

This guide uses an Edesy termination trunk, but the FreePBX side works the same for most SIP providers. The
full reference, with screenshots, lives in the [FreePBX setup guide](https://edesy.in/sip-trunking/freepbx).

## Before you start

You need:

- FreePBX 17 with PJSIP (the default).
- An Edesy account with KYC done and a number bought (mobile, landline, toll-free or 92-series).
- A termination trunk in **credentials** (registration) mode.
- Firewall access to allow UDP 5070 for SIP and your RTP range for audio.
- Your site's public IP, if FreePBX is on a local server behind a router.

## Step 1: Collect your trunk details

Open **Trunks** in the Edesy portal and click your trunk.

| Setting | Where on the trunk page | Example |
|---|---|---|
| SIP server (host) | Integration snippets | `tk-xxxxxxxx.trunk.edesy.in` |
| Port | Fixed | `5070` |
| Transport | Fixed | UDP (TCP also supported) |
| Username | Connectivity | `user-xxxxxxxx` |
| Password | Click Reveal, or Rotate | shown in the portal |
| Caller ID | Numbers | your Edesy number in E.164 |
| Edesy signalling IP | Shown on the trunk page | used for your firewall and the Match field |
| Max concurrent calls | Trunk detail | match this in FreePBX |

Reveal is rate-limited and audit-logged. If an older trunk won't reveal its password, click **Rotate** once.

## Step 2: Create the trunk in FreePBX

Go to **Connectivity > Trunks > Add Trunk > Add SIP (chan_pjsip) Trunk**.

**General tab:** Trunk Name `Edesy`, Outbound CallerID your Edesy number, Maximum Channels equal to the
trunk's max concurrent calls.

**pjsip Settings > General:**

| Field | Value |
|---|---|
| Username / Secret | from Step 1 |
| Authentication | Outbound |
| Registration | Send |
| SIP Server | your trunk host |
| SIP Server Port | 5070 |
| Context | from-pstn |
| Transport | 0.0.0.0-udp |

**pjsip Settings > Advanced:**

| Field | Value |
|---|---|
| Contact User / From User | your trunk username |
| From Domain | your trunk host |
| Client URI | `sip:<username>@<trunk host>:5070` |
| Server URI / AOR Contact | `sip:<trunk host>:5070` |
| Match (Permit) | the Edesy signalling IP |
| Qualify Frequency | 60 |
| DTMF Mode | RFC 4733 |

The Match (Permit) entry tells FreePBX to trust INVITEs from Edesy and send them into `from-pstn`. Without
it, inbound calls never reach your routes.

**pjsip Settings > Codecs:** tick **ulaw** and **alaw** only. Untick g722, g729 and opus.

Click **Submit**, then **Apply Config**.

## Step 3: Outbound route with Indian dial patterns

Go to **Connectivity > Outbound Routes > Add Outbound Route**. Name it `Edesy-Out` and put `Edesy` first in
the trunk sequence. If you still have a PRI, put it second as a fallback.

| Prepend | Match pattern | What it does |
|---|---|---|
| 91 | `XXXXXXXXXX` | 10-digit mobile or landline number, adds the country code |
| (none) | `91XXXXXXXXXX` | already has 91, passed through |

Numbers must leave FreePBX in E.164 without the plus sign. A 404 or "not routed" on every call almost always
means the 91 is missing. If your users dial a leading 0 for landlines, add a pattern that strips the 0 and
prepends 91.

## Step 4: Inbound route

Inbound has two halves:

1. **Edesy side:** your number's inbound routing must point at the trunk ("Your SIP trunk" is one of the
   inbound routing targets; support can also set it). With Registration set to Send, Edesy then delivers
   calls to wherever FreePBX is registered from.
2. **FreePBX side:** **Connectivity > Inbound Routes > Add Inbound Route.** Set DID Number to your number
   with country code (try `91XXXXXXXXXX`, with and without a leading plus, if it doesn't match), then pick
   a destination: an IVR, ring group, queue or extension.

## Step 5: NAT settings for an on-site server

Most on-site FreePBX boxes sit behind a router. In **Settings > Asterisk SIP Settings > chan_pjsip**:

- **External Address:** your public IP or dynamic DNS name.
- **Local Networks:** your LAN subnets, for example `192.168.0.0/24`.

On the router or firewall:

- Allow outbound UDP to the Edesy signalling IP on 5070, and the RTP range.
- Allow inbound UDP from the Edesy signalling IP for SIP and RTP.
- Forward the RTP range (Asterisk default 10000 to 20000 UDP) to FreePBX if it isn't the edge device.
- **Turn off SIP ALG** on the router. Port forwarding does not fix what SIP ALG breaks.

If calls connect but one side hears nothing, or every call drops at about 30 seconds, read
[fixing one-way audio, SIP ALG and NAT](https://edesy.in/blog/fix-one-way-audio-sip-alg-nat-2026).

## Step 6: Verify

1. **Registration:** Reports > Asterisk Info > Registrations shows the trunk as Registered, and the trunk's
   Connectivity badge in the Edesy portal flips to Registered.
2. **Outbound:** dial a mobile from an extension.
3. **Inbound:** call your Edesy number from a mobile.
4. **Isolate problems:** the trunk page has a **Call me** test that rings a number through the trunk
   without FreePBX. If that works and FreePBX doesn't, the issue is on the PBX side.

## Troubleshooting

| Symptom | Likely cause | Fix |
|---|---|---|
| Not registered | Wrong password, 5070 blocked, Server URI missing port | Reveal or rotate; open UDP 5070; add `:5070` |
| Outbound 401 / 403 | Auth not Outbound, or From User/Domain unset | Set as in Step 2 |
| Outbound 404 | Number not E.164 | Fix the 91 prepend |
| One-way or no audio | NAT, RTP blocked, codec mismatch | External Address, Local Networks, RTP range, ulaw/alaw only |
| Calls drop at ~30 s | SIP ALG rewriting ports | Disable SIP ALG on the router |
| Inbound never rings | Missing Match permit, DID format | Add Match; try DID with and without plus |

## Costs

Calls are Rs 0.50/min with a 60-second pulse, unanswered calls free, plus number rental. Everything is
deducted from a prepaid INR wallet topped up with Razorpay, with GST invoices. Prices exclude 18% GST.
Sizing the Maximum Channels value? See [how many SIP channels do I need](https://edesy.in/blog/how-many-sip-channels-do-i-need-2026).

Moving off a PRI line? Read [SIP trunk vs PRI line in India](https://edesy.in/blog/sip-trunk-vs-pri-line-india-2026). More on
the [SIP trunking page](https://edesy.in/sip-trunking) and in the [FreePBX 17 guide in the SIP docs](https://edesy.in/docs/sip-trunking/guides/freepbx-17-pjsip).

[Create your trunk](https://voice-app.edesy.in/?utm_source=edesy.in&utm_medium=blog&utm_campaign=freepbx-sip-trunk-setup-india-2026)
and have FreePBX registered in one sitting.

## Frequently Asked Questions

### Which FreePBX version does this guide cover?

FreePBX 17 with the PJSIP (chan_pjsip) driver, which is the default on FreePBX 17. The same fields exist on recent FreePBX 16 installs that use PJSIP, though screens may differ slightly.

### What dial pattern should I use for Indian numbers in FreePBX?

Send numbers in E.164 format without the plus sign. Add a pattern that prepends 91 to 10-digit numbers (match XXXXXXXXXX, prepend 91) and a second pattern that passes 91XXXXXXXXXX through unchanged.

### Why does my FreePBX trunk show unregistered?

The usual causes are a wrong password, port 5070 blocked by a firewall, or a Server URI missing the :5070 port. Reveal or rotate the password in the Edesy portal, set it again in FreePBX, and confirm outbound UDP 5070 is open.

### Which codecs should I enable?

Enable only ulaw and alaw (G.711) on the trunk and disable g722, g729 and opus. Matching codecs avoids transcoding failures and a common cause of one-way audio.

### How do inbound calls reach FreePBX?

With Registration set to Send, FreePBX keeps a live registration with the Edesy trunk, and calls to your Edesy number are delivered to it. Then add an Inbound Route in FreePBX for the DID and pick a destination such as an IVR, ring group or extension.

### What does an Edesy SIP trunk cost for FreePBX?

Rs 0.50/min with a 60-second pulse and unanswered calls free, plus number rental (mobile or 92-series Rs 499/mo, landline Rs 449/mo, toll-free Rs 999/mo, Rs 0 setup). Prices exclude 18% GST and are deducted from a prepaid INR wallet.
