- FreeSWITCH 1.8
- Anthony Minessale II Giovanni Maruzzelli
- 248字
- 2025-04-04 18:52:56
XML Dialplan
The XML Dialplan is at the heart of a FreeSWITCH installation. For many old hands of telecommunication, coming from a different background, it can be confusing, and almost intimidating. Truth is: is very simple and logical. You just need to look at it with fresh eyes.
Let's dispel myths:
- XML is not difficult at all, it reads exactly like a plain text configuration file
- It does not need any kind of special editor: Notepad, Vim, Emacs, Nano, anything, will do
- It is not esoteric: it is text logically structured
In this chapter we will not even talk about XML in itself, because there is no need to.
Instead, we'll delve into the dialplan structure: depending on its characteristics, an incoming call will land to a specific "context" in dialplan. Contexts are like completely separated "jail" (in the BSD or chroot meaning of the word), they are the "virtual machines", or the "sandboxes" of dialplan. You can go multitenant using multiple contexts.
Each context contains extensions, where conditions are checked, and based on the result of the check, actions are executed or not.
We'll look at the multiple flow controls in dialplan, the "continue" attribute of extensions, and the "break" attribute of conditions.
We'll review what call "legs" are, and their funny terminology of A-leg and B-legs.
Then we'll look at how to interpret the demo configuration dialplan, and how to write new extensions, and all the building blocs (applications, dialstrings, etc) for a basic FreeSWITCH dialplan.