VoiceXML 2.1 Development Guide Home  |  Frameset Home

  Answering Machine Detection  |  TOC  |  Post-Dialing  

More Than You Want To Know About ANI - DNIS

For those not 'in the know', the terms 'ANI' and 'DNIS' represent the callerID and the calledID of a telephone call. CallerID/ANI is affected by the entire path a call takes to reach its destination and requires perfect communication between the central office and tandem switches all along the routing path. There are many reasons that communication breaks down, from different regulatory environments in the home state of the caller, to choices the caller makes personally, to different (read "antiquated") switch hardware in some locales, to foreign country telephony standards, or to any number of subtle differences in even US standards. Telco programmers make the big bucks keeping track of current standards and figuring out how to translate from one to the other but it ain't easy. And if a particular state or locale forbids a telco from transmitting that information without the permission of the caller, you're out of luck.

One can think of it as being similar to the problem of making a telephone call to a random number selected from all the numbers in the world. What are the chances that the person who answers will speak English? While they're pretty good in some parts of the USA, they're not so good in some other parts. Worldwide, the chances become rather poor.

The short answer is that you simply can't trust Caller ID/ANI, no matter where it comes from. People use each other's phones. People have many phones.  Even if you receive an identifiable call you should verify the caller's actual ID before proceeding, since you don't want the guy who steals your cell phone to be able to access your bank account without hindrance.


ANI spoofing

Due to telco limitations, a DNIS value may not be spoofed. However, these restrictions do not apply to ANI, and we may designate a user defined ANI value by appending the following to our transfer destination variable:


      <transfer name="Mycall" dest="tel:+12223334444;ani=5556667777"
          bridge="true" connecttimeout="20s" maxtime="60s">




ANI & DNIS Session Variables


session.telephone.ani

This variable holds the value of the CallerID. This may be spoofed in an outbound call by using the following syntax:

          <transfer dest="tel:+1112223333;ani=8001112222"/>

Note: This syntax changes slightly with VXML 2.0 +. To catch the sip ANI address, you will use the w3c convention of:

session.connection.local.uri

However, most developers will need to access the tel: ANI value; for this, you will use the Voxeo-specific session variable of:

session.callerid



session.calledid

This variable holds the value of the called ID, and may not be spoofed.


session.connection.remote.uri

In the 2.0 environment, this will provide the calledID, (DNIS) of the caller. An example of what this value would look like is:

SESSION.CONNECTION.REMOTE.URI =sip:6782751234@xx.xx.x.x:xxxx

However, most developers will need to access the tel: DNIS value for this, you will use the Voxeo-specific session variable of:

session.calledid






  ANNOTATIONS: EXISTING POSTS
adrianasher
4/29/2006 7:48 AM (EDT)
At the bottom you have

SESSION.CONNECTION.LOCAL.URI

think you mean

SESSION.CONNECTION.REMOTE.URI

:-)
MattHenry
4/29/2006 10:56 AM (EDT)


You are correct sir; I'll have this fixed up in a jiffy.

~Matt
emeijer
6/28/2006 4:32 AM (EDT)
How do you process a blocked caller id ?


<if cond="session.callerid == 'blocked'">
MattHenry
6/28/2006 2:27 PM (EDT)


Hello Edwin,

Remember that callerid variable isn't going to be populated with 'blocked'; it is either going to have a value, or it isn't. As such, I would think you would simply want to check for an empty string in the event that you have a blocked callerID:

<if cond="session.callerid == ''">

If you want to get fancy, you can also base your conditional logic on the length of the string, ie:

<if cond="session.callerid.length <= 0">

Regards,

~Matthew Henry

login

  Answering Machine Detection  |  TOC  |  Post-Dialing  

© 2003-2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site