FreeSWITCH 1.2
上QQ阅读APP看书,第一时间看更新

FreeSWITCH XML Dialplan elements

The example FreeSWITCH XML Dialplan is a good place to start learning about XML Dialplan concepts. The configuration is contained in three main files and two directories, located at conf/dialplan/:

  • default.xml: This contains the primary FreeSWITCH Dialplan configuration
  • public.xml: This contains configurations for handling calls coming in to FreeSWITCH from another location
  • features.xml: This contains a special context for handling specific dialing features
  • default/: Files in this directory get included in the default context
  • public/: Files in this directory get included in the public context

The example XML configuration has many instructions for routing calls, all of which make use of the basic building blocks of a Dialplan: contexts, extensions, conditions, and actions. A context is a logical grouping of one or more extensions. An extension contains one or more conditions that must be met. Conditions contain actions that will be performed on the call, depending on whether the condition is met or not. Before further discussing these building blocks, let's revisit some of the concepts we first considered in Chapter 3, Test Driving the Example Configuration.