Howto:Simple IVR

From innovaphone-wiki

Jump to: navigation, search

This VoiceMail XML Script enables IVR structures of any size to be set up with any number of levels. A first greeting is possible, invalid or no entries lead to a predefined queue. At the end of the selection there is a connection to different or a common queue. The selection in the IVR is shown in the display of the called telephone. When using this VoiceMail XML Script in combination with an iQM, the selection on the client is also displayed with texts.


Applies To

This information applies to

  • innovaphone PBX V12 or higher
  • iQM Build 80270 or higher

More Information

Mostly IVR are used to automate the operator and reach the right group of user or individual user. innovaphone realizes this using the Waiting Queue Object (WQ), a very powerful object that is easy to set up and scales as desired.

Using WQs all scenarios can be covered, but IVR configurations quickly become very complex: you have to define the objects and also nest them.

In addition, a called user can not see which route the caller has chosen. This is often irrelevant or implicit; if I had to select “Sales–International” beforehand in order to come to the group “Sales USA”, the way is given and the route of the caller is clear if "Sales USA" is in the display of the called user.

Some customers use an IVR primarily to query information in advance. The called users (the group) are always the same, regardless of which route the caller chooses. This can be solved simply by having different queues pointing to the same group; however, there is no chronological order. And it gets very complicated very quickly.

Let's take a simple example of a customer who deals in insurance. A caller should be able to choose whether he is a private or a corporate customer, with private "Insurance" or "Health care", with "Insurance" select between "Insurance A" or "Insurance B". For "company" the selection follows "New customer" or "Existing customer", for "new customer" insurance "Liability" or "Building".

You can already see the description itself is complex, although there are only very short and not many menu items....

How many WQ are required? 1 WQ is required for the first query ("Private"/"Corporate"), 2 WQ in the 2nd level ("Insurance"/"Health care") and ("New Customer"/"Existing Customer"), 2 WQ in the 3nd level ("Insurance A"/"Insurance B") and ("Liability"/"Building") and in the 4th level 6 WQ ("Insurance A", "Insurance B", "Health care", "Liability", "Building", “ Existing customer ”). So a total of 11 WQ are required. But there is no chronological order because the calls from different WQ are pending in parallel on the same group. It is still possible introduce a single WQ and point all WQ on that after the pre-selection, but than again the route on the phone's display is not visible, because this shows the caller's number and as a source a call from the collective WQ.

The structure is that of a rhombus; ultimately everything points to one queue that refer to the same users. In order to respond correctly and in a time-saving manner, the user must immediately recognize which selection the caller made in the IVR.

Here is one way to simplify a little: You can connect an incoming call to this IVR VoiceMail XML Script which also manipulates the caller's number in order to show the called party the selections done. For the example above, a single central WQ and this VoiceMail XML Script is sufficient (just 2 objects in the PBX).

The possible selections and nesting is defined in a directory structure and is therefore also graphically visible.

No structures or announcements are stored in the amazingly short VoiceMail XML Script (approx. 60 lines) and no configuration inside the XML Script itself is required.

Problem Details

The VoiceMail XML Script plays back voice message texts and recognizes the IVR structure from the directories that are created. The script remembers the selection done and appends this to the caller's number. So that the called party recognizes that it is a selection in the IVR, "##" is introduced. This also has the function of preventing the selection from being dialled in case of a recall. The information is also stored in the Call List, Reporting etc.

In the following example the calling party has the number "000497031730090" and select "1 = Private customer" -> "1 = Insurance" -> "2 = Insurance B".

The user displays shows the calling number "000497031730090##112"


"Finance" in the example above is the name of the central WQ.

If an iQM is used the Agend see the IVR history displayed in plain text (in this example the calling number is 0456701943):


If an invalid selection is made as when reaching an end directory, a connection to the collective WQ is made, the invalid selection is passed on in the number so that the agent can inquire accordingly.


In the example, 1 was correctly selected for private and 1 for insurance, but then invalid when selecting the insurance, the "7".

How it works

The script reads the caller's number from the PBX and then the text file Target.txt, which contains the collective WQ number.

At the same time, a 15 second timer is started, which is then set again in each menu. If the timer expires, the call is forwarded to the collective WQ. If other value for this timeouts are desired, you can change them in lines 5 and 55.

The script now plays the welcome message. Except at this point, a selection can be made in all menus immediately and without completely listening to the message. The welcome file is in the VoiceMail XML Script directory and has the fixed name T100.$coder. If the greeting file is not available, the first selection menu is played immediately. All other announcements are in the "ROOT" directory.

The name of the first announcement (selection) is fixed T0.$coder. In our example this would be a announcement like "Select one for private or two for company". The name of all other announcements are the "reached" position in the directory tree. The announcement which e.g. is played if the caller select "1 = Private" is T1.$coder playing "select one for Insurance or two Health Care". If he select now "1= Insurance" the file played is T11.$coder etc.

Here again how this always works with our example (in rhombus the name of the file played):


As a directory tree for the IVR XML Script, in V12 shows as follows:


In the sIVR directory you can see the actual XML, the greeting T100.g711a and the text file with the number of the collective WQ.

The audio files are in the ROOT directory:


In a V13, the same structure is created with the Files App:


In the example you can see that there is a submenu "1" in the root directory with a further selection "1", but no "2". You can also see this in the flow chart, selection 2 leads immediately to the collective WQ.

The directories are usually empty, but if there is a "Transfer.txt" file, it is read and linked to the number it contains. So you can connect to different WQ even with certain branches. If e.g. If "2 = Health Care" is to be connected to a special WQ, then create a directory "2" and create a text file "Target.txt" with the number of the special WQ as content.

If all the functions described so far are desired, but the number should not be manipulated, it is sufficient to delete the penultimate line in the VoiceMail XML Script:

<pbx-prepcallinfo cgpn="$Teiln"/>


The installation is done like any other VoiceMail XML Script.

If you do not have all codec formats at hand (or want less file in the ROOT directory) you have to predefine the codec in the URL: e.g. …./sIVR.xml?$_Pbxcoder=g711a if only G711a announcements are desired.

The easiest way is to create a directory on the PC and to create all files and directories there as described. When everything is ready, you can drag and drop the structure onto a folder in the Fiel app. The file app masters copying directories, with a V12 you can do this with the corresponding Weddav utility.

Known Problems

In a few end devices, it may happen that the last announcement remains during the call of the WQ. To prevent this, it is sufficient to enter timeout = 0 for the WQ Alert.


Related Articles


Personal tools