Skip to main content

Dialplan Recipes

About

This page is a "Dial Plan Cookbook"

Limit Examples

Paging

Conferencing and Intercom

Configuring a dialplan to call multiple phones, have them auto-answer and be added to a conference. The conference is ended when the initiator hangs up.

FollowMe/Hunt

Multiple offsite phones

Forked dial example

Forked dial is when you want to attempt to ring 2 destinations at the same time. FreeSWITCH will attempt to call both bridge options simultaneously. The first bridge leg that replies with a 183 (session progress) message will win the call, and the other bridge leg is dropped. This only will work if you enable inbound-late-negotiation in the profile this recipe is executing under ( not in the bridged-to profile ).

an example is:

Forked dial example Expand source

 <extension name="dialoutpstn">
<condition field="destination_number" expression="^((00).*)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="ignore_early_media=true"/>
<action application="bridge" data="sofia/gateway/gatewayA/$1@1.2.3.4,sofia/gateway/gatewayB/$1@4.5.6.7"/>
</condition>
</extension>

Forked dial with differing timeouts for progress and attempt

It is also possible to have various legs of the bridge contain different timeouts. For instance, if you're attempting to bridge to an extension that has VoiceMail on it, or perhaps a cell phone which will fail over to voice mail within a short period of time. The bridge application may be called with the following options for data:

Forked dial with differing timeouts Expand source

<action application="bridge" data="[leg_progress_timeout=5,leg_timeout=10]sofia/gateway/gatewayA/$1@1.2.3.4,[leg_progress_timeout=8,leg_timeout=30]sofia/gateway/gatewayB/$1@4.5.6.7"/>

Simple call center using mod fifo

Simple Call Forwarding Controlled Via IVR

Simple Day/Nite Mode

See Also