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!

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.

No comments:

Post a Comment