Skip to content

Fix headers, semantic line breaks, and other small edits. #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Created by Ryan Harris, last modified by Attila Gulyas on 2020.08.04

boolean Controls what happens to a calling (A) party when in a [bridge state](../FreeSWITCH-Explained/Introduction/Life-Cycle-of-a-Call.mdx#0-about), and the called (B) party hangs up. If `true` the [dialplan](../FreeSWITCH-Explained/Dialplan/index.mdx#0-about) will stop processing, and the A leg will be terminated when the B leg terminates. If `false` (default) the dialplan continues to be processed after the B leg terminates. This is checked after [park\_after\_bridge](../FreeSWITCH-Explained/Dialplan/Variables-Master-List_16352570.mdx#park_after_bridge) and [transfer\_after\_bridge](../FreeSWITCH-Explained/Dialplan/Variables-Master-List_16352570.mdx#transfer_after_bridge).
boolean Controls what happens to a calling (A) party when in a [bridge state](../FreeSWITCH-Explained/Introduction/Life-Cycle-of-a-Call.mdx#0-about), and the called (B) party hangs up. If `true` the [dialplan](../FreeSWITCH-Explained/Dialplan/index.mdx#about) will stop processing, and the A leg will be terminated when the B leg terminates. If `false` (default) the dialplan continues to be processed after the B leg terminates. This is checked after [park\_after\_bridge](../FreeSWITCH-Explained/Dialplan/Variables-Master-List_16352570.mdx#park_after_bridge) and [transfer\_after\_bridge](../FreeSWITCH-Explained/Dialplan/Variables-Master-List_16352570.mdx#transfer_after_bridge).

The default value is `false`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

**Note**: _There is also some useful information on the [Multi-tenant](../../Examples/Multi-tenant_13173521.mdx#about) page, which needs merging._

This is HOWTO to make one FreeSWITCH server act as a multi-tenant system for two or more companies, each with its own domain/users and independent [dialplans](../../Dialplan/index.mdx#0-about).
This is HOWTO to make one FreeSWITCH server act as a multi-tenant system for two or more companies, each with its own domain/users and independent [dialplans](../../Dialplan/index.mdx#about).

Basically, we want to have one FS server provide phone services to several separate companies, as if we are a VoIP provider. Let's start with two companies and give both companies the same two users (1000 for company-a and 1000 for company-b). These companies should be completely independent of each other, their identically-numbered extensions should not overlap or have anything to do with each other, and each company (and all of it's users/extensions) should have independent dialplans.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## About

A simple example for accessing the session object after hangup when invoking the JS from the XML [dialplan](../../../Dialplan/index.mdx#0-about). More specifically, we're capturing the duration of the call and are saving it in a mySQL database with [ODBC](../../../Databases/ODBC-DSN/Using-ODBC-in-the-core_6586653.mdx).
A simple example for accessing the session object after hangup when invoking the JS from the XML [dialplan](../../../Dialplan/index.mdx#about). More specifically, we're capturing the duration of the call and are saving it in a mySQL database with [ODBC](../../../Databases/ODBC-DSN/Using-ODBC-in-the-core_6586653.mdx).

## Dialplan

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For instance, you can call the is\_forward features before you bridge to your ph
**See also:**

* [Simple CF with IVR](../../Examples/Simple-Call-Forward-with-IVR_9634448.mdx)
* [Dialplan](../../Dialplan/index.mdx#0-about)
* [Dialplan](../../Dialplan/index.mdx#about)



Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ The internal sections of FreeSWITCH only use:

* uuid
* caller\_id\_name, caller\_id\_number, caller\_extension
* [dialplan](../../../Dialplan/index.mdx#0-about)
* [dialplan](../../../Dialplan/index.mdx#about)
* destination\_number

The **channel** flags hold extra state information above and beyond the basic 13 states that are held in the `state` variable. The interesting flags are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ See [Config\_1000.xml](../Default-Configuration_6587388#configuration) for a sim

The FreeSWITCH dialplan is a full-featured, XML-based call-routing mechanism. (There also exists support for Asterisk-like dialplans as well as really fancy real-time and/or back-end database-driven dialplans).

The best place to get started in learning about the FreeSWITCH dialplan is the [Dialplan](../../Dialplan/index.mdx#0-about) page here on the wiki. It discusses the basics of the FreeSWITCH dialplan. If you need an XML primer, check out the information on the [Basic\_XML](../../Dialplan/XML-Dialplan/index.mdx#about) page which will get you pointed in the right direction. There are two other important resources for you to learn more about the dialplan:
The best place to get started in learning about the FreeSWITCH dialplan is the [Dialplan](../../Dialplan/index.mdx#about) page here on the wiki. It discusses the basics of the FreeSWITCH dialplan. If you need an XML primer, check out the information on the [Basic\_XML](../../Dialplan/XML-Dialplan/index.mdx#about) page which will get you pointed in the right direction. There are two other important resources for you to learn more about the dialplan:

* the small-but-growing [Dialplan\_Recipes](../../Dialplan/Dialplan-Recipes_9634252.mdx#about) page
* the [default dialplan](../../Dialplan/Default-Dialplan-QRF_9634422.mdx#park) that comes with a standard FreeSWITCH installation.
Expand Down Expand Up @@ -695,7 +695,7 @@ This is the main configuration file, and the only one that has a fixed name. Whe
freeswitch.xml is divided into multiple sections, and each section is used by a different component in FreeSWITCH™. The sections are as follows:

* The "configuration" section has children for [switch.conf](../XML-Switch-Configuration_13173223.mdx) and [modules.conf](../../Modules/XML-Modules-Configuration_13173211.mdx) which are used by the core, as well as a child for each module in use.
* The [dialplan](../../Dialplan/index.mdx#0-about) section defines which action to invoke when a call arrvies to the switch.
* The [dialplan](../../Dialplan/index.mdx#about) section defines which action to invoke when a call arrvies to the switch.
* The [directory](../../Directory/XML-User-Directory/index.mdx#about) defines the users that can connect to the switch (user agents).
* The phrases section defines where freeswitch can find the sound files, and if it can use any TTS engines.

Expand Down Expand Up @@ -784,7 +784,7 @@ FreeSWITCH is a B2BUA (back-to-back user agent). This means that it actually par

## See Also

* [Dialplan](../../Dialplan/index.mdx#0-about)
* [Dialplan](../../Dialplan/index.mdx#about)
* [Dialplan XML](../../Dialplan/XML-Dialplan/index.mdx#about)
* [Dialplan Recipes](../../Dialplan/Dialplan-Recipes_9634252.mdx#about)
* [Dialplan Basics](https://wiki.freeswitch.org/wiki/Dialplan%5FBasics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,15 @@ This is where the different SIP profiles (or endpoints) are defined. (See [Sofia

Public Context for Security

You'll notice that all the SIP profiles in the [default configuration](./Default-Configuration_6587388.mdx#mod_vp8) use the `public` context for their [dialplan](../Dialplan/index.mdx#0-about), **including the `internal` profile**:
You'll notice that all the SIP profiles in the [default configuration](./Default-Configuration_6587388.mdx#mod_vp8) use the `public` context for their [dialplan](../Dialplan/index.mdx#about), **including the `internal` profile**:

**conf/sip\_profiles/\*.xml**

```xml
<param name="context" value="public"/>
```

If you look in the directory config files, `conf/directory/default/*.xml` (see Introduction in [Dialplan](../Dialplan/index.mdx#0-about)), you'll notice that the SIP profile's context is overridden there like so:
If you look in the directory config files, `conf/directory/default/*.xml` (see Introduction in [Dialplan](../Dialplan/index.mdx#about)), you'll notice that the SIP profile's context is overridden there like so:

**conf/directory/default/\*.xml**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Now I've got two UAs defined by my profiles, each of which can handle a call. Wh

So, the task becomes rather straightforward. Dialplans use pattern matching and other tricks to determine how to handle a call. My dialplan examines what I've dialed and then determines what profile to use with that call. If I dial a telephone number, the dialplan selects the UA that connects up to the PSTN. If I dial a SIP address outside the firewall, the dialplan selects that same UA because it uses the STUN server. But if I dial a SIP address that's inside the firewall, the dialplan selects the "local" UA.

To understand how to write dialplans, use pattern matching, etc., see [Dialplan](../../Dialplan/index.mdx#0-about)
To understand how to write dialplans, use pattern matching, etc., see [Dialplan](../../Dialplan/index.mdx#about)

#### The Relationship Between SIP Profiles and Domains

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ It is also possible to have various legs of the bridge contain different timeout

## See Also

* [Misc.\_Dialplan\_Tools\_bridge](index.mdx#0-about)
* [Misc.\_Dialplan\_Tools\_bridge](index.mdx#about)
* [Regular Expression](../Examples/Regular-Expression/index.mdx)


Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Note that you specify "inline:" at the beginning of the parameter and not at the

## See Also

* [Dialplan](./index.mdx#0-about)
* [Dialplan](./index.mdx#about)
* [Configuration](../Configuration/index.mdx#about)
* [mod\_dptools: Inline Dialplan](../Modules/mod-dptools/6586667.mdx#about)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6192,7 +6192,7 @@ Description needed

When set to true causes the system to move on in the dialplan if it hits a bad b-leg. Default is false because this behavior is probably not recommended.

You may find this variable useful when implementing [Dialplan\_FollowMe](../index.mdx#0-about)
You may find this variable useful when implementing [Dialplan\_FollowMe](../index.mdx#about)

**Usage:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ dtmf digit In the `group_confirm_key` variable, you define the DTMF that the cal

string

boolean Controls what happens to a calling (A) party when in a [bridge state](../Introduction/Life-Cycle-of-a-Call.mdx#0-about), and the called (B) party hangs up. If `true` the [dialplan](index.mdx#0-about) will stop processing, and the A leg will be terminated when the B leg terminates. If `false` (default) the dialplan continues to be processed after the B leg terminates. This is checked after [park\_after\_bridge](Variables-Master-List_16352570.mdx#park_after_bridge) and [transfer\_after\_bridge](Variables-Master-List_16352570.mdx#transfer_after_bridge).
boolean Controls what happens to a calling (A) party when in a [bridge state](../Introduction/Life-Cycle-of-a-Call.mdx#0-about), and the called (B) party hangs up. If `true` the [dialplan](index.mdx#about) will stop processing, and the A leg will be terminated when the B leg terminates. If `false` (default) the dialplan continues to be processed after the B leg terminates. This is checked after [park\_after\_bridge](Variables-Master-List_16352570.mdx#park_after_bridge) and [transfer\_after\_bridge](Variables-Master-List_16352570.mdx#transfer_after_bridge).

The default value is `false`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The XML dialplan is the default dialplan used by FreeSwitch. XML is easily edited by hand without requiring special tools, other than a text editor.

In general, [dialplans](../index.mdx#0-about) are used to route a call to an endpoint, which can be a traditional extension, voicemail, interactive voice response (IVR) menu or other compatible application. Dialplans are extremely flexible.
In general, [dialplans](../index.mdx#about) are used to route a call to an endpoint, which can be a traditional extension, voicemail, interactive voice response (IVR) menu or other compatible application. Dialplans are extremely flexible.

Dialplans can be separated into **context**s, allowing calls to follow different pathways for different kinds of calls. Calls can be handed-off to other contexts as well. For example you might configure two dialplans: one that handles calls originating from the public phone network ([PSTN](http://en.wikipedia.org/wiki/Public%5Fswitched%5Ftelephone%5Fnetwork)) and one that handles calls originating from internal extensions. The sample dialplans in the [FreeSWITCH default (or vanilla) configuration](../../Configuration/Default-Configuration_6587388.mdx#mod_vp8) are following the exact same principle: forcing an incoming external PSTN call through some additional scrutiny (via the **`public`** context in [conf/dialplan/public.xml](https://github.com/signalwire/freeswitch/blob/master/conf/vanilla/dialplan/public.xml) ) before being handed off to the internal dial plan (the **`default`** context in [conf/dialplan/default.xml](https://github.com/signalwire/freeswitch/blob/master/conf/vanilla/dialplan/default.xml) ).

Expand Down
43 changes: 21 additions & 22 deletions docs/FreeSWITCH-Explained/Dialplan/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@



## 0\. About
## About

The FreeSWITCH dialplan is a decision tree that provides routing services to bridge call legs together, execute dialplan applications, and invoke custom scripts that you write, among other things.
The FreeSWITCH dialplan is a decision tree that provides routing services to bridge call legs together, execute dialplan applications, invoke custom scripts that you write, and has other uses.

Much of your effort will be focused on configuring a dialplan to suit your application, whether it is the built–in [XML dialplan](./XML-Dialplan/index.mdx#about), a database lookup query sent to a web server via [mod\_xml\_curl](../Modules/mod_xml_curl_1049001.mdx) or via PostgreSQL using [freeswitch.dbh](../Databases/Lua-FreeSWITCH-Dbh_3965358.mdx#about) connection pooling.

**The FreeSWITCH dialplan is NOT a scripting language.**

## 1\. Introduction
## Introduction

**The FreeSWITCH dialplan is not a single entity**. You have the option to run different dialplan subsystems natively. These are not all translated into the same back–end as other systems may be employed. Instead each is a unique, independent method through which you can access information.
**The FreeSWITCH dialplan is not a single entity**. You have the option to run different dialplan subsystems natively.
These are not all translated into the same back–end as other systems may be employed.
Each is a unique, independent method through which you can access information.

Enter the **`show dialplan`** command on [fs\_cli](../Client-and-Developer-Interfaces/1048948.mdx) to see what other dialplans are loaded.

Expand All @@ -32,23 +34,26 @@ dialplan,signalwire,mod_signalwire

```

See [mod\_commands](../Modules/mod_commands_1966741.mdx)) for all the commands available on FreeSWITCH's [command line interface](../Client-and-Developer-Interfaces/1048948.mdx).
See [mod\_commands](../Modules/mod_commands_1966741.mdx) for all the commands available on FreeSWITCH's [command line interface](../Client-and-Developer-Interfaces/1048948.mdx).

Unlike some other switches, the dialplan is not designed to be a be-all and end-all configuration language that you put a bunch of logic into. The dialplan, quite simply, is designed to take a call request, decide where it should be handled, and then forward it to that application (or, in FreeSWITCH parlance, [modules](../Modules/index.mdx#about)).
Unlike some other switches, the dialplan is not designed to be a be-all and end-all configuration language that you put a bunch of logic into.
The dialplan, quite simply, is designed to take a call request, decide where it should be handled, and then forward it to that application (or, in FreeSWITCH parlance, [modules](../Modules/index.mdx#about)).

FreeSWITCH modules
### FreeSWITCH modules

[Modules](../Modules/index.mdx#about) are applications that extend FreeSWITCH with extra functionality. In the context, the most used commands / applications are in [mod\_dptools](../Modules/mod_dptools_1970333.mdx#c) (i.e., dialplan tools), but check out [the rest of the modules](../Modules/index.mdx#about) as well.
[Modules](../Modules/index.mdx#about) are applications that extend FreeSWITCH with extra functionality.
In the context, the most used commands and applications are in [mod\_dptools](../Modules/mod_dptools_1970333.mdx#c) (i.e., dialplan tools), but check out [the rest of the modules](../Modules/index.mdx#about) as well.

For example, routing a call to the [mod\_dptools:bridge](../Modules/mod-dptools/6586484.mdx#45-user) application will spawn a new channel and connect it to the incoming one.

The design allowing for multiple dialplan processing modules, as well as routing calls to applications which do all the hard work, gives you the flexibility to do what you need, the way that you need it to work. It does not force you to adapt your infrastructure around FreeSWITCH™, but lets FreeSWITCH™ more readily mesh with your existing infrastructure.
The design allowing for multiple dialplan processing modules, as well as routing calls to applications which do all the hard work, gives you the flexibility to do what you need, the way that you need it to work.
It does not force you to adapt your infrastructure around FreeSWITCH, but lets FreeSWITCH more readily mesh with your existing infrastructure.

IMPORTANT
### Contexts

**Contexts**

FreeSWITCH uses multiple **context**s to prevent internal extensions from being exposed to the world. The two contexts in the [vanilla FreeSWITCH configuration](../Configuration/Default-Configuration_6587388.mdx#mod_vp8) are called **`public`** and **`default`**, but these names are arbitrary and can be carefully changed. New contexts can also be added.
FreeSWITCH uses multiple **context**s to prevent internal extensions from being exposed to the world.
The two contexts in the [vanilla FreeSWITCH configuration](../Configuration/Default-Configuration_6587388.mdx#mod_vp8) are called **`public`** and **`default`**, but these names are arbitrary and can be carefully changed.
New contexts can also be added.

Everything in the **`public`** context is available to the world, while everything in the **`default`** context is only available to users who have registered with FreeSWITCH.

Expand All @@ -59,24 +64,18 @@ Contexts can be used in

Anywhere you can specify a dialplan to route calls (such as [mod\_sofia](../Modules/mod_sofia_1048707.mdx#about)'s configuration), you may specify multiple ones by separating them with commas.

## 2\. Modules

---
## Modules

* [Dialplan XML](./XML-Dialplan/index.mdx#about) \- XML Dialplan Module (the most common).
* [LDAP Directory](../Directory/LDAP-Directory_1048997.mdx#about) \- LDAP Directory Dialplan Module
* [mod\_dialplan\_asterisk](../Modules/mod_dialplan_asterisk_3966416.mdx#about) \- Asterisk compatible dialplan module.

## 3\. Tools

---
## Tools

* [blue.box](http://www.2600hz.org/)
* [FusionPBX](http://www.fusionpbx.com/)

## 4\. See Also

---
## See Also

* [Freeswitch IVR Originate](./Freeswitch-IVR-Originate_9634753.mdx#channel-variables)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The FreeSWITCH `$FS_ROOT/conf/directory/` contains accounts (i.e., XML files) for all users (i.e., SIP phone extensions) that may register to FS.

Note: This is not the same syntax which is used in the [Dialplan](../../Dialplan/index.mdx#0-about)
Note: This is not the same syntax which is used in the [Dialplan](../../Dialplan/index.mdx#about)

null

Expand Down
Loading