FreePBX 17 setup

FreePBX SIP Trunk for India

Connect a FreePBX 17 PBX to the Indian phone network with an Edesy SIP trunk. Standard PJSIP settings, outbound calls to any Indian number, inbound calls on your Edesy DID, and the NAT fixes that stop one-way audio.

The short answer

To connect FreePBX 17 to an Edesy SIP trunk, create a trunk at voice-app.edesy.in, then add a chan_pjsip trunk in FreePBX with the trunk's SIP host, port 5070, username and password, Registration set to Send, and only the ulaw and alaw codecs. Add an outbound route that prepends 91 and an inbound route for your DID.

Connection details at a glance

Copy the exact values for your trunk from its detail page in the portal.

SettingValue
SIP server (host)tk-<id>.trunk.edesy.in, one per trunk
Port5070
TransportUDP (TCP also supported)
AuthenticationSIP credentials (registration) or IP/CIDR allowlist
PasswordReveal or rotate in the portal
CodecsG.711 ulaw and alaw
DTMFRFC 4733
Number formatE.164 without the plus, for example 91XXXXXXXXXX
Concurrent callsMax concurrent calls set on the trunk
SIP TLS + SRTPAvailable on request
Call priceRs 0.50/min, 60-second pulse, unanswered calls free
NumbersRs 499/mo mobile, Rs 449/mo landline, Rs 999/mo toll-free

Set up FreePBX 17 with PJSIP, step by step

Outbound first, then inbound. Click Submit and Apply Config after each FreePBX change.

  1. Step 1 of 8: Create the trunk in Edesy

    In voice-app.edesy.in, create a termination trunk with SIP credentials as the auth mode. Note the SIP host, the username and the password (use Reveal, or Rotate once on an older trunk).

  2. Step 2 of 8: Add a chan_pjsip trunk

    In FreePBX go to Connectivity, Trunks, Add SIP (chan_pjsip) Trunk. Set the Outbound CallerID to your Edesy DID and Maximum Channels to your trunk's concurrent-call limit.

  3. Step 3 of 8: Fill in pjsip General

    Username and Secret from the portal, Authentication Outbound, Registration Send, SIP Server your tk host, SIP Server Port 5070, Context from-pstn, Transport 0.0.0.0-udp.

  4. Step 4 of 8: Fill in pjsip Advanced

    Set Contact User and From User to your username, From Domain to the tk host, Client URI and Server URI with :5070, Match (Permit) to the Edesy signalling IP shown in the guide, Qualify Frequency 60 and DTMF Mode RFC 4733.

  5. Step 5 of 8: Limit codecs

    On the Codecs tab enable ulaw and alaw only. Matching G.711 avoids transcoding failures.

  6. Step 6 of 8: Create the outbound route

    Add an outbound route that uses the Edesy trunk. Dial pattern: prepend 91 to 10-digit numbers, and pass 91XXXXXXXXXX through unchanged.

  7. Step 7 of 8: Create the inbound route

    Add an inbound route for your DID (try it with and without the leading plus) and send it to an IVR, ring group or extension. With Registration set to Send, Edesy delivers calls to your registered PBX.

  8. Step 8 of 8: Verify

    Check that the trunk shows Registered in FreePBX and in the portal, dial a mobile from an extension, and use the Call me button on the trunk page to test the Edesy side on its own.

NAT, SIP ALG and one-way audio

An on-premise FreePBX is almost always behind NAT. These settings fix most audio problems.

Set External Address

In Settings, Asterisk SIP Settings, chan_pjsip, set External Address to your site's public IP or dynamic-DNS host. A wrong or missing value is the usual cause of one-way or no audio.

List your Local Networks

Add your LAN subnets, for example 192.168.0.0/24, so Asterisk knows which addresses are inside the NAT.

Turn off SIP ALG

Many routers rewrite SIP packets with a feature called SIP ALG. It often breaks registration and audio, so disable it on the router or firewall in front of FreePBX.

Open SIP and RTP

Allow UDP 5070 to and from the Edesy signalling IP, and the RTP range (Asterisk default 10000 to 20000 UDP). Forward the RTP range to FreePBX if it is not the edge device.

Match codecs

Keep only ulaw and alaw on the trunk. A codec mismatch can connect the call with no audio, or fail it outright.

Permit Edesy for inbound

Set Match (Permit) to the Edesy signalling IP so FreePBX accepts inbound INVITEs and routes them into from-pstn.

Troubleshooting

The common symptoms and what to check first.

SymptomLikely cause and fix
Trunk not registeredWrong password (Reveal or Rotate again), port 5070 blocked by the firewall, or Server URI missing :5070
Outbound 401 or 403Authentication must be Outbound; check username and secret; set From User and From Domain
Outbound 404 or not routedNumber not in E.164; prepend 91 in the dial pattern
One-way or no audioSet External Address and Local Networks, disable SIP ALG, open the RTP range, use ulaw and alaw only
Inbound never ringsDID not bound to the trunk yet, Match (Permit) missing, or inbound route DID format

Frequently Asked Questions

Move your FreePBX from PRI to SIP

Create a trunk, paste the settings into FreePBX and place a test call. No contracts and no hardware.