Using DNIS to Direct Calls
Dialed Number Identification Service (or DNIS) is a standard that most telephone companies in the United States use to identify the number that was dialed. In this tutorial, we will learn how to use DNIS information to direct callers to sub-menus in VoiceXML applications.
This information is frequently used in call centers where callers are directed to a particular operator group based on the dialed number. Call centers that answer calls for many different customers might also use the number to display the name of the company that was dialed so that the customer support representative knows how to answer the phone. In IVR and VoiceXML applications, DNIS information can be used as an alias to direct callers to a specific sub-menu rather than having them drill down a menu hierarchy.
Accessing the DNIS number in VoiceXML
VoiceXML includes a number of built-in session variables. One of those is the DNIS number, which is accessible by specifying session.telephone.dnis as the expr attribute of the <value> element. To test this feature, I dragged the corresponding elements into Nuance V-Builder as seen the example below.
The resulting VoiceXML file is listed and numbered below. If you don't have Nuance V-Builder installed, you can create the VoiceXML dialog by copying the text below into a text editor and removing the line numbers.
1 <?xml version="1.0" encoding="Cp1252"?> 2 3 <!DOCTYPE vxml PUBLIC '-//Nuance/DTD VoiceXML 1.0//EN' 4 'http://voicexml.nuance.com/dtd/nuancevoicexml-1-2.dtd'> 5 6 <vxml version="1.0"> 7 <meta name="Generator" content="V-Builder 1.2.30" /> 8 <form id="form1"> 9 <block name="block1"> 10 You have dialed 11 <value expr="session.telephone.dnis" class="digits" />. 12 Goodbye. 13 <exit /> 14 <disconnect /> 15 </block> 16 </form> 17 </vxml>
Lines 9 through 15 in the example above will say the number that you dialed, exit the application, and disconnect.
Try it now on Voxeo: Call (408) 689-3992