FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!
Showing posts with label IVR. Show all posts
Showing posts with label IVR. Show all posts

Thursday, October 28

An issue with the default IVR behaviour

When you dial into a phone system and are greeted by an IVR, if you choose an option on the IVR that you expect to be answered by a human you expect to hear the phone ringing as you wait for a human to pick it up.  However, due to the way the Local_Extension is defined in the default FreeSwitch dialplan, it will instead play music on hold to the caller and there is nothing you can do to override that setting without altering the FreeSwitch dialplan.

Typically when a human transfers a call you expect to get music on hold while they do that for you (sometimes people like to make an exception for calls transferred by the receptionist, but even then, music on hold would be appropriate), but when an IVR transfers a call you do not expect to be placed on hold as the IVR is a computer and should be giving you its full attention, not placing you on hold while it does something else - therefore you expect to hear a ringing sound if the IVR transfers you to a human.

Accordingly the following steps allow you to alter this behaviour and override the music on hold in order to provide a ringing sound to the caller when transferring a call from an IVR.


1. you need to go to the FusionPBX System-Variables screen and create a new variable in the Music on Hold section (with an order higher than the hold_music variable - you could use 500 for example).  The new variable will be transfer_ringback and you should set it to $${hold_music} and enable it.
2. you need to go to the FusionPBX Dialplan-Dial Plan Manager and click on the advanced button.  Then once the XML edit window is displayed scroll down in the XML until you find "Local_Extension".  Note that if you press CTRL-F a search window will appear and you can search on that - include the " characters when you search or you will get another entry that isn't relevant.  The entry you should find is .  A few lines below that you will find .  You can either remove this line or comment it out - to comment it add !-- after the < at the start of the line and add -- before the > at the end of the line.

The reason that you need to make these changes is that the default config provided in freeswitch (and FusionPBX) is a demonstration config and is intended to be customised by people when it is implemented in a live system.  The problem with having the transfer_ringback entry in this section is that it prevents you overriding the default setting, as every time a call is transferred to an extension the transfer_ringback is set to music on hold.  Therefore step 1 here sets a default setting in vars.xml and step 2 removes the line that sets the variable every time a transfer happens.  

Now any time you prefer a ringing sound when you do a transfer from an IVR you can use one of two options:


1. set transfer_ringback=${us-ring} in a dialplan entry immediately prior to the IVR
2. add an extra entry to each option in your IVR, before the transfer but with the same option number and have it execute the line below
 menu-exec-app:set transfer_ringback=${us-ring}

This will replace the music on hold with ringing sounds when you are transferring from an IVR.

Friday, September 17

Odd IVR behaviour

If you are using Freeswitch 1.0.6 or earlier in your Fusion PBX (type version at a freeswitch command prompt - eg. through the command editor in FusionPBX or at the fs_cli to find out your version) then you should be aware that IVRs don't work quite as you might expect.  If you put multiple actions per IVR choice (eg. set a variable and then execute a script if someone presses 1) then the multiple actions will execute in REVERSE order!

You have two alternatives:
1. write your actions in reverse order
2. upgrade to a later version of freeswitch

I reported this behaviour to the freeswitch team and they have fixed this for future updates today.  They actually didn't know it was possible to use their IVR capability this way - multiple actions per choice was a feature that they didn't realise that they had - so they had never realised it didn't work in a logical fashion.

If you choose option 1, just note that if you upgrade freeswitch in the future you will have to reverse the IVR actions then or it will then operate backward.

Thursday, September 16

Something you need to do

Due to enhancements in FusionPBX that are not yet supported by changes to the installation process, any menus that allow you to choose sound files to play (I came across this when trying to setup an IVR) will not be able to find the sound file unless you first define some variables.

Go to the System-Variables menu.  Look for the following variables in the Defaults section.  If they are not there you will need to add them.

default_language=en
default_dialect=us
default_voice=callie

Once you have added them your IVRs will be able to find the sound files to play.  (don't forget to apply the changes)