XML Dialplan cookbook

We present here a few common scenarios that you may need to refer to from time-to-time because they are relatively common. The examples presented in this section are in the mold of the tradition "cookbook" full of "recipes" for the reader to try. Feel free to use and modify these recipes in your custom Dialplans.

Match by IP address and call a number

In the example as follows, the particular extension will be selected only if the IP address of the calling endpoint is 192.168.1.1. In the second condition, the dialed number is extracted in variable $1 and put in the data of the bridge application, in order to dial out to IP address 192.168.2.2

<extension name="Test1"> <condition field="network_addr" expression="^192\.168\.1\.1$"/> ...

Get FreeSWITCH 1.0.6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.