FreeSWITCH

How Do I Send a FreeSWITCH Call to a SIP Provider, Another PBX or Several Destinations?

MYLINEHUB Team • 2026-09-06 • 13 min

Compare user, Sofia and gateway dial strings, then build simultaneous, sequential and failover destinations without turning routing into duplicated dialplan blocks.

How Do I Send a FreeSWITCH Call to a SIP Provider, Another PBX or Several Destinations?

FreeSWITCH learning series · Part 12 of 30

Compare user, Sofia and gateway dial strings, then build simultaneous, sequential and failover destinations without turning routing into duplicated dialplan blocks.

What this question really means in a working FreeSWITCH system

FreeSWITCH dial strings express different destinations: a registered directory user, a raw Sofia URI, or a configured gateway. Parallel and sequential strategies then change failure semantics: ‘ring both’ is not the same problem as ‘try carrier A, then carrier B only on selected causes’. In production, decide which SIP failures should trigger failover and which should stop immediately; otherwise a rejected call can unexpectedly spill to another route.

Start with the mental model

FreeSWITCH dial strings describe where and how to create B-legs. <code>user/</code> resolves a directory user, <code>sofia/&lt;profile&gt;/</code> targets a SIP URI directly, and <code>sofia/gateway/&lt;name&gt;/</code> routes through a configured gateway.

Destination styleUse whenExample concept
user/1001Registered directory userOffice extension
sofia/internal/...Direct SIP URI via known profilePeer PBX / explicit endpoint
sofia/gateway/carrier/...Configured provider gatewayPSTN destination
Multiple legsRing/failover policyAgents, branches, carriers

Work through it from zero

Choose the endpoint type

Use directory-aware user dialing for registered users; direct Sofia URIs for explicit peers; gateways for carrier trunks.

Add per-leg variables carefully

Variables can set caller ID, timeouts and behaviour for one leg without changing the whole call.

Build simultaneous ringing

Comma-separated or grouped dial strings can create parallel legs; decide what happens when one answers.

Build sequential failover

Use ordered alternatives only when the business accepts the delay and failure semantics.

Capture hangup causes

Failover logic should distinguish busy, rejection, timeout and network failure rather than blindly trying everything.

Choose theendpoint typeAdd per-legvariablescarefullyBuild simultaneousringingBuild sequentialfailoverCapture hangupcauses
A practical sequence for this FreeSWITCH task

What beginners usually confuse

  • Mixing provider number normalization into every dial string.
  • Failing over on a deliberate 403 policy rejection.
  • Sending private caller ID or arbitrary headers to external destinations.

How to know you are actually finished

  • Keep destination normalization separate from route selection.
  • Define which hangup causes qualify for failover.
  • Measure post-dial delay introduced by sequential routes.

How to use this in a real implementation

For this FreeSWITCH task, use a bounded test built around this objective: compare user, sofia and gateway dial strings, then build simultaneous, sequential and failover destinations with…. Observe one state change at a time, save the evidence, and only then move to the next layer.

A concrete sequence for this specific question
  • Capture the exact runtime evidence related to Choose the endpoint type before changing the next layer.
  • Keep a known-good test number/endpoint and repeat the same call after each configuration change.
  • Record SIP response codes, context/destination decisions and media observations separately; they answer different questions.
  • If you cannot explain which file/module owns the behavior, stop and locate that ownership before editing more configuration.

Continue from here

After this article: use the next link that matches the unresolved part of compare user, sofia and gateway dial strings, then build simultaneous, sequential and failover destinations with…. Start the FreeSWITCH learning series · Use the SIP → dialplan → RTP troubleshooting ladder · Continue into real-time AI media streaming

Questions a careful reader usually asks next

Should I change several FreeSWITCH files at once?

Not while learning or troubleshooting. Prove choose the endpoint type first, then change one layer and repeat the same test so you know what caused the new behavior.

Is a successful CLI command enough proof?

No. For compare user, sofia and gateway dial strings, then build simultaneous, sequential and failover destinations with…, confirm the live SIP, dialplan or media behavior that the command was intended to affect. A parser or CLI success only proves the command was accepted, not that the call path now behaves correctly.

Where should business logic live?

For compare user, sofia and gateway dial strings, then build simultaneous, sequential and failover destinations with…, keep low-level signaling/media truth in FreeSWITCH, while customer, campaign and business state stays in the application layer unless the telephony engine genuinely needs it for call execution.

References and further reading

Protocol and configuration facts for How Do I Send A FreeSWITCH Call To A Sip Provider Another Pbx Or Several Destinations are grounded in the current FreeSWITCH Users Manual and, where Asterisk is compared, Asterisk's official documentation. Community tutorials are included only as credited learning aids.

Try it

Want to see API-driven CRM + Telecom workflows in action? Try the WhatsApp bot or explore the demos.

💬 Try WhatsApp Bot ▶️ Watch CRM YouTube Demos
Tip: Comment “Try the bot” on our YouTube videos to see automation in action.
M
MYLINEHUB Team
Published: 2026-09-06 • Updated: 2026-10-01
Quick feedback
Was this helpful? (Yes 0 • No 0)
Reaction

Comments (0)

Be the first to comment.