FreeSWITCH

I Want “Dial 1000 and Ring Extension 1001” — How Do I Write My First FreeSWITCH Dialplan?

MYLINEHUB Team • 2026-09-05 • 10 min

Build the smallest useful FreeSWITCH dialplan, match a destination, bridge to a registered user, reload safely, and verify the call from fs_cli.

I Want “Dial 1000 and Ring Extension 1001” — How Do I Write My First FreeSWITCH Dialplan?

FreeSWITCH learning series · Part 10 of 30

Build the smallest useful FreeSWITCH dialplan, match a destination, bridge to a registered user, reload safely, and verify the call from fs_cli.

What this question really means in a working FreeSWITCH system

Start with one exact destination and one bridge. Avoid regex, time conditions, databases and carrier trunks until the call works. Once the minimal route is proven, introduce one variable at a time. This gives a known-good baseline: if replacing 1001 with a gateway dial string breaks the call, the failure is now isolated to the trunk side instead of the entire dialplan.

Start with the mental model

Your first dialplan should prove one thing only: a known destination matches one condition and bridges to one known endpoint. Complexity should be earned after that baseline call works.

Test stageExpected resultIf it fails
XML reloadNo parse errorFix syntax first
Dial 1000Rule is evaluatedCheck context/destination
BridgeB-leg createdCheck user/contact/dial string
AnswerBoth legs connectedCheck signaling/hangup cause
AudioBoth directions heardCheck RTP/codec/NAT

Work through it from zero

Choose the source context

Use the same context assigned to the registered user you will test from.

Create one extension

Match ^1000$ or another exact test destination before introducing ranges.

Bridge to one user

Use a directory-aware user dial string when calling a registered user.

Reload and place the call

Run reloadxml, call the number, and watch the console.

Confirm two-way audio

A ringing phone is not yet a successful end-to-end test.

Then replace the B-leg

Once local calling works, bridge through a gateway and compare what changes.

Choose the sourcecontextCreate oneextensionBridge to one userReload and placethe callConfirm two-wayaudioThen replace theB-leg
A practical sequence for this FreeSWITCH task

What beginners usually confuse

  • Starting with a generic <code>.*</code> expression.
  • Testing against a carrier before local extension-to-extension calling works.
  • Adding transfer, recording and API calls before proving the basic bridge.

How to know you are actually finished

  • Keep the minimal rule as a diagnostic reference.
  • Comment business intent near non-obvious regex.
  • Use controlled reloads and validate before production changes.

How to use this in a real implementation

For this FreeSWITCH task, use a bounded test built around this objective: build the smallest useful freeswitch dialplan, match a destination, bridge to a registered user, reload safely,…. 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 source context 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 build the smallest useful freeswitch dialplan, match a destination, bridge to a registered user, reload safely,…. 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 source context 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 build the smallest useful freeswitch dialplan, match a destination, bridge to a registered user, reload safely,…, 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 build the smallest useful freeswitch dialplan, match a destination, bridge to a registered user, reload safely,…, 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 I Want Dial 1000 And Ring Extension 1001 How Do I Write My First FreeSWITCH Dialplan 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-05 • Updated: 2026-10-01
Quick feedback
Was this helpful? (Yes 0 • No 0)
Reaction

Comments (0)

Be the first to comment.