O'Reilly logo

FreeSWITCH Cookbook by Raymond Chandler, Darren Schreiber, Michael S Collins, Anthony Minessale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ringing multiple endpoints sequentially (simple failover)

Sometimes it is necessary to ring additional endpoints, but only if the first endpoint fails to connect. The FreeSWITCH XML dialplan makes this very simple.

Getting ready

Open conf/dialplan/default.xml in a text editor or create or edit a new XML file in the conf/dialplan/default/ subdirectory.

How to do it...

Add a pipe-separated list of endpoints to your bridge (or originate) application. For example, to ring userA@local.pbx.com and userB@local.pbx.com sequentially, use an extension like this:

<extension name="ring_sequentially"> <condition field="destination_number" expression="^(2001)$"> <action application="bridge" data="{ignore_early_media=true}sofia/internal/userA@local.pbx.com|sofia/sip/userB@local.pbx.com"/> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required