IVR Menu

From FusionPBX
Revision as of 02:08, 28 October 2010 by Swilkey (talk | contribs)
Jump to: navigation, search

This is often used as an Auto Attendant. For example a company may have a recording that says for "Sales press 1 Support press 2 for Billing press 3 otherwise stay hold and someone will answer your call." Can perform the Auto Attendant task well. However it is not limited to that alone. It is also a powerful tool for Interactive Voice Response and can be used to do the more advanced work that is often expected of IVRs.

Music on hold when you transfer a call from IVR

By default, if you transfer a call to an extension from an IVR the caller will hear music on hold while waiting for the call to be answered. If you would prefer a ring sound then you can do one of two options:

  • set transfer_ringback=${us-ring} in a dialplan entry immediately prior to the IVR
  • 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}

However, to make this work you need to do two other things first:

1. you need to go to the FusionPBX System-Variables page 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-Dialplan 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 <extension name="Local_Extension">. A few lines below that you will find <action application="set" data="transfer_ringback=$${hold_music}"/>. 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 the change above is able to allow you to override the default setting whenever you want to.

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

Playing a recording from an IVR choice

Use

menu-play-sound:sound_file_name.wav

Note that this will expect to find the recording in sounds/en/us/callie. If you want to play it from recordings you will need to use

menu-play-sound:../../../../recordings/sound_file_name.wav