Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

Set up Call Forwarding using the dialplan instead of a button on your phone. 

 

 Click here to expand Table of Contents


Introduction

I started this as a proof of concept and it worked well enough that I decided to add it as an example of using hash, play_and_get_digits, and Phrase Macros. The idea is that you can set call forwarding for a telephone by using the dialplan instead of the CF button on the phone itself.

NOTE: Hash information is cleared on a FreeSWITCH restart. For persistent storage, use mod_db instead.

Description

There are four CF "utility" extensions presented here:

  • 9090 - Set CF for my phone (from my phone)
  • 9091 - Set CF for any extension (from any phone)
  • 9092 - Cancel CF for my phone (from my phone)
  • 9093 - Cancel CF for any extension (from any phone)

With these four extensions a user can set, modify, or cancel call forwarding for his particular extension, whether he's at his own telephone or at a different phone. Since this is a PoC, there is neither security nor error checking. These are left as an exercise for the reader.

Note: I do like DJBinter's idea of using *72 and *73 with beeps and bong tones. Feel free to look at his example. (Check out the See Also items below.)

Configuration

There are several items that need to be changed or added to the configuration.

Changes to default.xml

The following extension needs to be added to the top of conf/dialplan/default.xml:

default.xml  Expand source

Utility Extensions

The following extensions can be added as a separate file in conf/dialplan/default/01_IVR-CF.xml:

Utility Extensions  Expand source

Using *72 and *73

Some may prefer the simplicity of *72 set and *73 cancel. Piece of cake! Just add these extensions to conf/dialplan/default/01_IVR-CF.xml:

Using *72 and *73  Expand source

Phrase Macros

Phrase Macros  Expand source

Don't Forget to "reloadxml"

Be sure to reloadxml or press F6 at the fs_cli before you try these out!

Usage

Go to a phone that you would like to call forward. Dial 9090 and then enter in a destination number. For a simple test, send the call to '9192' so that it does an info dump and then exits. If you call your source extension number it will "forward" to 9192, which does the info dump and hangs up.

To see what's actually happening, consider an example where I used extension 1007. After setting the call forward to 9192, go to the fs_cli and type this command:

You should see something like this:

f you have multiple extensions forwarded they should all appear. For example, if I forward 1001 to 3000 then my output looks like this:

To cancel call forwarding for your phone you have two choices:

  • From the forwarded phone, dial 9092
  • From any phone, dial 9093 and input the source extension number

One other feature: you can set call forwarding from any phone by dialing 9091. Try it out - I think you'll find that it is so easy that even an end user could figure it out.

See Also