VoiceXML 2.1 Development GuideHome  |  Frameset Home

  Answering Machine Detection  |  TOC  |  Post-Dialing  

More Than You Want To Know About CallerID - CalledID


The CallerID 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 CallerID, 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.


Spoofing CallerID

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


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




CallerID & CalledID 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 CallerID address, you will use the w3c convention of:

session.connection.local.uri

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

session.callerid



session.calledid

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


session.connection.remote.uri

In the 2.0 environment; this will provide the calledID 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
mtatum111
9/19/2008 10:40 PM (EDT)
It appears from the notes above that callerid (ANI) is obtained by session.connection.local.uri.

However, when I put this into my app to play the value
such as

<prompt>You are calling from phone <value expr="session.connection.local.ur" /value> </prompt>

I get the number that I just dialed (calledID -DNIS) in this case.


Can you explain further.

Thanks
mtatum111
9/19/2008 10:46 PM (EDT)
By the way when I put in
<prompt> <value expr="session.connection.remote.uri" /> is the number </prompt>

Then I get the ANI. 

However, if that is the case, then isn't the above wrong

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
voxeoJohn
9/19/2008 11:49 PM (EDT)
Hi,
  ANI and DNIS can be a little confusing, it may be best if you simply associate it as CalledID and CallerID.  There is a fantastic section on the differences below but I will certainly try to clear things up here for you.

http://docs.voxeo.com/voicexml/2.0/t_7.htm?search=ANI

Caller ID/ANI is the ten digit phone number of the telephone that initiated the call in the first place.

Called ID/DNIS is the telephone number being called.

If you wanted the entire SIP ANI CallerID you would use session.connection.local.uri if you just wanted the callerID you could use session.callerid.

The same holds true for DNIS or CalledID.

I have also included a small application that may clear this up for you a bit as well:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >

  <form>
    <block>
    <prompt>
    CalledID<say-as interpret-as="vxml:phone"><value expr="session.connection.local.uri"/></say-as><break/>
    CallerID<say-as interpret-as="vxml:phone"><value expr="session.connection.remote.uri"/> </say-as><break/>
    </prompt>
    </block>
  </form>
</vxml>

I certainly hope this clears things up for you, if not please feel free to let us know.  We are always more then happy to help our developers!!

Regards,

John D.
Customer Engineer
Voxeo Support
mtatum111
9/20/2008 2:37 PM (EDT)
Thanks so much for the information.  I just had them backwards!  I was thinking that callerid(ANI) is obtained from session.connection.local.uri

and calledID(DNIS) is obtained from session.connection.remote.uri.

Now,I just see that I had those transposed.  So, now the result should be

calledID(DNIS) = session.connection.local.uri
callerID(ANI) = session.connection.remote.uri.

Thanks for the clarification.


login
  Answering Machine Detection  |  TOC  |  Post-Dialing  

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