Knowledgebase › Connecting FreePBX to VoIP.ms — SIP trunk setup walkthrough

Connecting FreePBX to VoIP.ms — SIP trunk setup walkthrough

VoIP.ms is a popular low-cost SIP-trunk provider — pay-as-you-go or unlimited per-DID plans, lots of POP servers for geographic flexibility, and a deep configuration surface that can be overwhelming if you've never used it. This article walks the end-to-end setup for FreePBX®: creating a sub-account, choosing the nearest POP, registering, buying a DID, and routing it through FreePBX. Assumes you've finished Configuring a new FreePBX install.

1. Sign up and add funds

Create an account at voip.ms. The main account login is yours; you'll create sub-accounts underneath it for each device or PBX. Add at least $25 in funds before going further — VoIP.ms is prepaid only.

2. Create a sub-account for your FreePBX

In the VoIP.ms portal: Main Menu → Sub Accounts → Create Sub Account.

  • Username: VoIP.ms will prepend your main account number (e.g. 123456_freepbx). The full username is what you use in FreePBX, not just the suffix.
  • Password: long random — use a password manager.
  • Authentication Type: User/Password Authentication
  • Device Type: Asterisk, FreePBX, FusionPBX... (pre-tuned defaults for SIP behavior)
  • Protocol: SIP
  • Transport: UDP (TLS is also fine if you have a cert)
  • Internal Extension: leave blank
  • Allowed Codecs: G.711u (ulaw) for US; check G.722 if you want HD audio

Note these three things for later:

  • Full username (e.g. 123456_freepbx)
  • Password
  • The POP / SIP server hostname you'll configure (next step)

3. Pick a POP server

VoIP.ms has dozens of POP (point of presence) servers worldwide. Pick the one closest to your VPS for lowest latency. LYLIX is in Northern Virginia (US East), so the right pick is:

newyork1.voip.ms

You can verify latency:

ssh root@<your-VPS-IP>
ping -c 5 newyork1.voip.ms
ping -c 5 atlanta1.voip.ms
ping -c 5 dallas1.voip.ms
# Pick the lowest. newyork1 should win from a US East VPS.

Configure the sub-account in the VoIP.ms portal to use this POP: Sub Account → edit → Server, pick from the dropdown.

4. Buy a DID

VoIP.ms portal: DID Numbers → Order DID(s). Pick a region/area code, search, buy. Then under DID Numbers → Manage DID(s), click your new DID and set:

  • Routing: SIP/IAX → your sub-account name (123456_freepbx)
  • POP: same POP your sub-account uses (newyork1.voip.ms)

Save. Inbound calls to this DID will now route to your FreePBX server via the registered sub-account.

5. Add the trunk in FreePBX

In FreePBX: Connectivity → Trunks → Add Trunk → Add SIP (chan_pjsip) Trunk.

General tab:

  • Trunk Name: voipms
  • Outbound CallerID: "Your Company" <15551234567> using your VoIP.ms DID

pjsip Settings → General tab:

  • Username: 123456_freepbx (your full sub-account username)
  • Secret: the sub-account password
  • Authentication: Outbound
  • Registration: Send
  • SIP Server: newyork1.voip.ms (your chosen POP)
  • SIP Server Port: 5060

pjsip Settings → Advanced tab:

  • From Domain: newyork1.voip.ms
  • From User: 123456_freepbx
  • DTMF Mode: RFC 4733

Submit, Apply Config.

6. Verify registration

Reports → Asterisk Info → PJSIP Endpoints should show voipms as Available within a few seconds.

Also in the VoIP.ms portal: Sub Accounts → your sub-account shows a "Last registration" timestamp — should be within the last minute.

Common reasons it fails:

  • Username missing the account-number prefix. Use the full 123456_freepbx, not just freepbx.
  • Wrong POP — sub-account is set to one POP, FreePBX is configured for another. Match exactly.
  • Sub-account marked as static IP in VoIP.ms portal but your IP changed (rare on LYLIX). Re-enter the VPS IP in the sub-account.

7. Add an outbound route

Connectivity → Outbound Routes → Add Outbound Route:

  • Route Name: voipms-us
  • Trunk Sequence: voipms

Dial Patterns tab:

prependprefixmatch pattern
1   NXXNXXXXXX
    1NXXNXXXXXX

For Canada, VoIP.ms uses the same NANP format (US/Canada are one dial plan). For international, add specific patterns starting with 011 + country code, or use E.164 with the + prefix.

8. Add an inbound route

Connectivity → Inbound Routes → Add Inbound Route:

  • DID Number: 15551234567 (VoIP.ms sends 11-digit E.164 without the +)
  • Set Destination: extension, IVR, or ring group

Submit, Apply Config.

9. Test outbound and inbound

  • Outbound: from your softphone, dial your mobile. Watch Reports → Asterisk Logfiles live to see the SIP exchange.
  • Inbound: call your VoIP.ms DID from your mobile.

VoIP.ms-specific response patterns:

  • 403 Forbidden on outbound — usually credit depleted, or you're dialing a destination not enabled on your account (international has to be turned on explicitly).
  • 404 Not Found — bad number format. VoIP.ms wants 1NXXNXXXXXX for US/Canada; if you send NXXNXXXXXX without the 1, you get 404.
  • One-way audio — almost always a NAT or RTP-port-range issue. VoIP.ms uses 10000-65535 by default; FreePBX uses 10000-20000. Match them or set the wider range on FreePBX.

VoIP.ms-specific knobs worth knowing

  • Caller ID Filtering (VoIP.ms portal → DID → "Caller ID Filtering"): blacklist robocall ranges per-DID at the carrier level — cheaper than burning CPU on your FreePBX with call screening.
  • SMS forwarding — VoIP.ms can forward SMS to email or HTTP. Useful for two-factor auth on services that text codes.
  • E911 — set this per DID under DID Numbers → E911. Required by US law for any DID capable of making emergency calls.
  • Per-DID failover — set a backup destination (another DID, voicemail, etc.) for when your FreePBX is unreachable. Free, takes 30 seconds.

Hardening

  • Strong sub-account password — VoIP.ms is username/password auth, so a leaked password is full outbound calling on your dime. Rotate occasionally; use a password manager.
  • Restrict allowed destinations in the sub-account settings to just the regions you actually call (US/Canada by default; explicitly enable international per country if needed).
  • Set per-day / per-month call cost limits in your VoIP.ms account preferences. Hard ceiling on fraud exposure.
  • Firewall — restrict SIP/RTP from VoIP.ms's POP IPs only. VoIP.ms publishes the IP ranges per-POP in their wiki; trust those in FreePBX's firewall.

If you're stuck

VoIP.ms has good Live Chat support on their portal, available 24/7 — fastest path for carrier-side questions. For FreePBX-side issues (the trunk doesn't register, dial patterns don't match), open a LYLIX ticket.

FreePBX® and Asterisk® are registered trademarks of Sangoma Technologies Corporation; LYLIX hosts them but is not affiliated with Sangoma. VoIP.ms is a trademark of 8439573 Canada Inc.

Also Read

« « Back

Powered by WHMCompleteSolution