Extensions
The term extension can sometimes be misleading. In the traditional PBX environment, an extension is simply a phone connected to the phone system, typically with a three-digit or four-digit extension number. In FreeSWITCH an extension is actually a set of instructions that define what to do with a call. It can be as simple as dialing a three-digit or four-digit number, and having someone's desk phone ring. In fact, this is precisely what we did in Chapter 4, SIP and The User Directory, in the Adding a user section, when we added a new user and a corresponding extension to allow her phone to be dialed.
An extension definition begins with an <extension>
tag and ends with a closing </extension>
tag. All the conditions, actions, and anti-actions in between are part of the extension definition. Extensions have two optional attributes: name
and continue
. The name
attribute is used primarily to keep your Dialplan readable. You can imagine how difficult it would be to look at...