Skip to main content
Question

Obtaining caller ID in script


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?

  • Community Manager
  • December 7, 2023

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.


  • New Participant
  • December 7, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings