Question

Obtaining caller ID in script

  • 7 December 2023
  • 2 replies
  • 249 views

I'm using the RingCX Voice Script Designer. My script displays a URL popup window immediately when someone calls. This works fine. However, I want to obtain the caller ID (phone number) of the person calling so I can pass this as a parameter for my URL. Unfortunately, I'm not finding any documentation about how to access the caller phone number in RC script. It looks like the call detail is accessible by running Cloud reports and Realtime report but this seems like overkill just to get the phone number of the current caller. Does anyone know any easy way to get this in Javascript?


2 replies

Hi Brian,

Would this help?
https://support.ringcentral.com/article-v2/Using-the-Scripting-node-in-the-RingCX-IVR-Studio.html?brand=RingCentral&product=RingCX&language=en_US

You are looking for the ANI (Automatic Number Identification) which is the incoming caller number.

Found the answer here: https://support.ringcentral.com/ca/en/engagevoice/admin/voice-admin-use-javascript-tool.html

Here's the working code that I put in my script:

var phoneNumber = getData(model.call.ani);
alert("phoneNumber:" + phoneNumber);

Reply