GSMCalls
FreePBX integration

GSM Gateway for FreePBX

To use a GSM gateway with FreePBX, you add it as a chan_pjsip SIP trunk, then point outbound and inbound routes at it. GSMCalls presents your mobile phones to FreePBX as a standard SIP trunk, so mobile lines appear alongside your other carriers without a hardware gateway in the rack.

At a glance

Why teams choose GSMCalls as their GSM gateway for FreePBX

  • Standard chan_pjsip trunk — no FreePBX modules to install
  • Registration or IP authentication
  • G.711 A-law or μ-law, plus G.722 where your phones support it
  • Outbound routes by dial pattern, inbound routes by DID
  • Mobile lines managed and monitored in the GSMCalls portal
  • Works with Smart Bridge, Wireless Connect and USB Connect

How a GSM gateway connects to FreePBX

FreePBX is a web interface on top of Asterisk, and it treats any external voice provider as a trunk. A GSM gateway is just another provider: FreePBX sends it outbound calls over SIP, and it delivers inbound mobile calls back to FreePBX. With GSMCalls, the gateway side lives in the cloud and your phones at the site carry the calls, so FreePBX only needs one PJSIP trunk.

This page summarises the setup. For screenshots and every field, follow the step-by-step FreePBX GSM gateway setup guide.

What to prepare in GSMCalls

Before touching FreePBX, create a SIP trunk in the GSMCalls portal and note:

  • The SIP host, port and transport (UDP, TCP or TLS)
  • Username and secret if you use registration, or your FreePBX public IP for an IP ACL
  • The codec order — G.711 A-law or μ-law first, G.722 if your phones use it
  • Which phones or routing group the trunk should use for outbound calls

Configuring the FreePBX PJSIP trunk

In FreePBX, go to Connectivity › Trunks › Add Trunk › Add SIP (chan_pjsip) Trunk. On the General tab give it a name and set the outbound caller ID and a maximum channel count that matches your phones. On the pjsip Settings tab enter the username, secret and SIP server from the portal, set Authentication to Outbound and Registration to Send — or None for IP-based trunks — and keep the context as from-pstn.

On the Codecs tab, enable only what you need and order them to match the portal: ulaw in North America, alaw in most other regions, with g722 added for wideband. Why the choice matters is covered in G.711 A-law vs μ-law.

Outbound and inbound routes

Outbound: under Connectivity › Outbound Routes, create a route with dial patterns for the numbers that should go out over mobile lines — for example a local mobile prefix — and place the GSMCalls trunk first in the trunk sequence. Add other trunks after it as fallbacks.

Inbound: under Connectivity › Inbound Routes, create a route whose DID number matches what GSMCalls sends for each line, and set the destination to a ring group, IVR or extension. A catch-all route with no DID works for a single line. The difference between DID and DOD is explained in SIP trunks, DID and DOD.

Testing and troubleshooting

Check the trunk status in FreePBX (Reports › Asterisk Info › Registries) and in the GSMCalls portal. Then call out and in, and compare the call in the FreePBX CDR with the GSMCalls CDR, which records the mobile disconnect cause. One-way audio usually means a NAT or firewall issue on the FreePBX side; registration failures usually mean a credential or ACL mismatch. Use mobile lines only for lawful, authorised traffic under your carrier’s terms.

Step by step

Set up your GSM gateway for FreePBX

  1. Step 1: Create the trunk in GSMCalls

    Add a SIP trunk in the portal, choose transport and codecs, and note the host and credentials.

  2. Step 2: Add a chan_pjsip trunk

    In FreePBX, add a SIP (chan_pjsip) trunk with the portal’s host, username and secret.

  3. Step 3: Set codecs

    Match the codec order to the portal: alaw or ulaw first, g722 for wideband.

  4. Step 4: Build routes

    Create an outbound route with dial patterns and an inbound route for each DID.

  5. Step 5: Apply and test

    Apply Config, confirm registration, and place test calls in both directions.

Compare

FreePBX trunk fields and where to find the values

FreePBX fieldWhere the value comes from
SIP Server / PortGSMCalls trunk page (host and port)
TransportUDP, TCP or TLS as set in the portal
Username / SecretTrunk credentials (registration trunks)
RegistrationSend for registration trunks, None for IP ACL
CodecsSame order as the portal trunk
Contextfrom-pstn (FreePBX default)
Pricing

Plans that grow with your gateway estate.

One flat monthly price per plan — not per device.

Professional

Most popular

For operators running several gateways.

$150/ month
  • Up to 20 phones
  • Multiple gateways
  • Multiple locations
  • Advanced CDR
  • Device profiles
  • Prepaid usage management
  • Alerts
  • API (coming soon)
  • Priority support
Start Professional
Prices in USD per month. Taxes, carrier airtime and SIM costs are not included. Features marked Coming Soon are not yet available.Compare all four plans
FAQ

GSM gateway for FreePBX questions

Still unsure? Talk to an engineer — we'll map your site to the right architecture.

Talk to an Engineer

Do I need a FreePBX module for a GSM gateway?

No. GSMCalls appears as a standard chan_pjsip SIP trunk, which FreePBX supports out of the box.

Should I use registration or IP authentication?

Registration is simplest when FreePBX sits behind NAT or has a dynamic IP. IP authentication suits servers with a fixed public IP.

Which codec should I use?

Use G.711 μ-law in North America and A-law in most other regions. Add G.722 if your desk phones support wideband.

Why do I have one-way audio?

Usually NAT: check the external and local network settings in FreePBX’s SIP Settings and that the RTP port range is open on the firewall.

GSMCalls is built for lawful, authorised deployments. You remain responsible for local telecommunications regulations and your carriers’ terms — see the acceptable use policy.

Build Your Mobile Gateway Infrastructure

Connect a few phones or manage hundreds of devices across multiple locations from one platform.