VoiceXML 2.1 Development Guide Home  |  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.callerid

This variable holds the value of the CallerID:

SESSION.CALLERID = 6782751234


session.connection.remote.uri

In the 2.1 environment; this will provide the callerID of the caller. An example of what this value would look like is:

SESSION.CONNECTION.REMOTE.URI = 6782751234


session.calledid

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

SESSION.CALLEDID  = 6782755678


session.connection.local.uri

This session variable can also be used to access the calledID value:

SESSION.CONNECTION.LOCAL.URI = 6782755678




CallerID for non-US developers

As the Voxeo datacenters outside of the US are locale-specific (meaning that calls will, by default, route to the regional locale of the datacenter), a country code must be specified in order for the call to reach the intended destination.

Developers who are using, or who intend to use the Voxeo hosted infrastructure in non-US locales sould be aware that we strictly abide by the E164 dial syntax. What this means is that any and all dial strings, and callerID spoofing should apply the explicit E164 syntax:

tel:+[country code][number]

As such, a developer who wishes to place an outbound call to a United Kingdom destination whose number is 02071112222 would specify the following dial string, where "44" maps to the country code for the UK:

tel:+4402071112222

It is not recommended that developers apply E164 formatting to SIP destinations, except in very specific circumstances. Production-grade developers who engage in load testing would be one example of a scenario where this might apply. In the event that you

Country Code Listings

Note that not all countries can be dialed from the UK datacenters due to carrier restrictions. Prior to any production-grade deployments, it is strongly advised that you contact sales@voxeo.com to verify availability beforehand.

There are a number of websites that list the various country codes that are in use. The more useful ones that are available at the time of this writing are listed below:






  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
jdyer
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.

soonthor
1/22/2009 4:43 PM (EST)
Hi,

Is there a way to get a phone number from call forwarding?

For example, I forwarded my phone (111-1111) to Voxeo number (222-2222). Then, I call 111-1111 number from my other phone (333-3333).

So, the call flow looks like this.

333-3333 -> 111-1111 -> 222-2222

session.callerid gives me 333-3333
session.calledid gives me 222-2222

Is there any variable that I can get the number 111-1111?
I tried session.connection.redirect but look like it is not implemented?

If it's not possible in VoiceXML platform, how about CCXML platform?

Thank you for your help.
VoxeoDustin
1/22/2009 5:00 PM (EST)
Hey,

This is entirely dependent on what information the carrier sends us when forwarding the incoming call. If they pass us the number of the originating call, this is the only information we have. The session.connection.redirect variable is only available if the incoming call is the result of a SIP redirect or SIP refer. If this is forwarded via a PSTN or mobile phone, that information is not available.

Let me know if we can be of further assistance.

Cheers,
Dustin
soonthor
1/22/2009 6:30 PM (EST)
Thank you Dustin. Please let me clarify on what I actually want to do.

Basically, I want to forward my Verizon's voicemail to Voxeo's number. Then, within a Voxeo application, I want to get my own phone number and the number that calls me.

I can get the number that calls me by using seesion.callerid.  But I couldn't figure it out how to get my own phone number.

I think the carrier does pass on those information. I see many companies that provide voicemail to email services. They seem to be able to retrieve those information. I wonder how they can get them.

Again, thank you for your help. I really appreciate it.
MattHenry
1/22/2009 6:43 PM (EST)


Hi there Soonthorn,

What you are saying makes sense, but I need to reiterate Dustins response, that being ifthe carrier in question doesn't forward this callerID information to us, we have no means of getting it from the carrier in a "roundabout" fashion: If you were to forward the voicemail services to a landline, and the resulting outbound call to this destination doesnt specify the callerID, then this information simply isnt made available by Verizon.

Regards,

~Matthew Henry
soonthor
1/22/2009 7:41 PM (EST)
Hi MattHenry,

Okay. So, if the carrier forwards the information, which variable contains it?  I can try it out.
jdyer
1/22/2009 8:39 PM (EST)
Hi,

  I am afraid that if you cellular provider is passing the originating number when they forward call then that is the will populated the shawdow variables.  However you can always spoof the outgoing transfer in VoiceXML via the ;ani= in the transfer step?  I hope that helps, please let us know if we can be of any further assistance as we are certainly here to help!

Regards,

John D.
Customer Engineer
Voxeo Support
moshe
12/24/2009 8:54 PM (EST)
Ok, folks, there's still an error here. The *caller ID* is the remote uri, not the local uri.

Therefore, in the docs above we see this mistake: "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"

This should read session.connectionid.remote.uri

voxeoJason
12/24/2009 9:20 PM (EST)
Hi,

Thanks for the catch!  I've gone ahead and forwarded this off to our documentation staff and we'll fix it up as soon as we can.


Cheers,

Jason
Voxeo Support

login
  Answering Machine Detection  |  TOC  |  Post-Dialing  

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