This Articles describes how to set up automatic DTMF sending for scenarios where  users regularly dial a number that is an IVR.

Created: April 2020

Permalink: https://wildix.atlassian.net/wiki/x/LBfOAQ

Introduction

There might be a scenario where your users regularly dial a number that is an IVR.  When doing so, the user likely needs to choose an option from the IVR.  

This custom application describes how to do this in an automated fashion. For instance, the end users could define a speed dial button that includes both the number and the tones that need to be sent to the remote party.  This can even include interdigit timing and tone durations.   

Example use case, a speed dial to a colleague from another company where you dial into their main number, then are prompted to enter the extension of the person you are calling.

Prerequisites

Dialplan

Please find attached Dialplan called “SendDTMFs”.  Download SendDTMFs Dialplan and import it into your system.

Speed dial key

Users can define speed dial keys in Collaboration, see Function keys, or administrators can create speed dial key for users, see WMS Start guide - User preferences.

In this example scenario, we will show how to setup the number to be dialed as well as how to specify some additional DTMF interactions to take place after the call is answered.

The provided Dialplan assumes the following format for the speed dial key:

numberPtones

So, for instance, if a user wants to dial the number 6141234567 and then send extension number 582 via DTMF if the call is answered, the speed dial key should be defined as “6141234567P582”. See screenshot below! 


Speed dial key (Advanced options)

In most cases, the example above is enough to allow the user to set up a speed dial key that would interact with the far end system after being answered. However, when dealing with sending tones (specially if more than one is to be sent), there are a couple of additional things that should be considered:

With the specified speed dial, the system will dial 6141234567, and if answered, tones 582 will be sent using .5 seconds as the inter digit time.  So as you can see, the value you specify after the second P is used as interdigit at 1 tenth of a second; 5 equals .5



With the specified speed dial above, the system will dial 6141234567, and if answered, tones 582 will be sent using .5 seconds as inter digit time and and 200ms as the tone duration.

Enabling the feature

Once a speed dial is configured as needed and the “SendDTMFs” Dialplan procedure has been imported into the system, all you need to do is create a Dialplan that will match the speed dial string and enable the feature before making the call: 



Shown entry (XXXXXX.P.)  in the previous picture was created in "users" Dialplan.

XXXXXX.P.  :This dial pattern will match any string that has at least 7 digits followed by a P and something else after the P. Meaning, this will match the minimum config for the speed dial (numberPtones).

  1. Set -> var -> ${EXTEN} - all needed values are stored in the dialed number (EXTEN variable), so we create a variable called var and set its value to variable EXTEN. Using the most complete mentioned example, 6141234567P582P5P200, var will store it too
  2. Set -> number -> ${SHIFT(var,P)} - the SHIFT function will use P as field separator. We get (and remove) the first item from “var” variable. So, number will be 6141234567 (everything before the first P). Then the “var” variable is equal to 582P5P200 (everything after the first P)
  3. Set -> tones -> ${SHIFT(var,P)} - with SHIFT function, using P as separator, we get (and remove) the first item from var variable again. Since var is 582P5P200 at this point, tones will be 582 (everything before the first P) and var will now be equal to 5P200 (everything after the first P)
  4. Set -> interdigit -> ${SHIFT(var,P)} - with SHIFT function, using P as separator again, we get (and remove) the first item from var variable. Since var is now 5P200, interdigit will be 5 (everything before the first P) and var will now be equal to 200 (everything after the first P). If interdigit was not specified, the default value will be used
  5. Set -> duration -> ${SHIFT(var,P)} - and lastly, with SHIFT function again, using P as separator, we get (and remove) the first item from the string (var). Since var is now JUST 200, SHIFT will return the entire string (200), and assign it to duration. If duration was not specified, the default value will be used
  6. Custom application => NoOp : This is just a 'comment' to display the variables values, only visible on callweaver console or logs.
  7. SET => DIAL_OPTIONS => U(SendDTMFs^${tones}^${interdigit}^${duration}) :With this line we are enabling “SendDTMFs” dial plan and passing all needed arguments
  8. Use the dial the trunk application to send the call out the trunk of your choice.  Note the ${number} in the set portion of the application.  This must be there so that the dialed number will be the "number" variable which is derived from the first portion of the speed dial string (in step 2 shown above).