News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Obtaining caller ID in script
Tags: caller id
Dec 6, 2023 at 4:21pm   •   2 replies  •  0 likes
Brian Graves

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 Answers
answered on Dec 7, 2023 at 10:30am  

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.


 0
answered on Dec 7, 2023 at 10:37am  

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);


 1



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us