Dialplan Basics

From FreeSWITCH Wiki
Revision as of 20:06, 22 October 2010 by Diego.viola (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Introduction

FreeSWITCH has a very flexible way of making your dialplan including XML, scripting in Lua, JavaScript, and from a DB, using mod_xml_curl and Asterisk compatibility using mod_dialplan_asterisk.

Getting Started

FreeSWITCH dialplan is divided in 4 things:

  • context
    • extension
      • condition
        • application

Context

dialplan context is a way to group your extensions in one place and restrict users from dialing it, or give users only a very specific numbers to dial like in a large company, not just any user can dial international or even long distance call, only internal or local calls.

Note

context can be assigned to a user in a directory, to a Sofia profile, a Sofia gateway or to any FreeSWITCH supported endpoint.

See also: modules

Context Example

 <!-- include this file into the dialplan -->
 <include>
 <!-- declaring our context -->
   <context name="public">

   </context>
 </include>

Extensions

dialplan extension is a group of instructions to route a call to a specific application or destination like international call, local call, Voice Mail or IVR.

Conditions

conditions are used to determine what destination is dialed.

FreeSWITCH use regular expression aka regex for determining the dialed extension.

Note

conditions are not used only for destinations, but for any Channel Variables including caller id name, caller id number, Sofia profile and any other variables.

Regular Expression Examples

^1234$ == destination 1234

Actions

dialplan actions is wrapped into conditions to run the needed applications including bridging calls, running IVRs, transferring to other extensions, playing music or anything.

See Also