Hi,
I would like to get the incoming phone number and use it in the same script widget.
I’m assuming this possible, and it is probably quite easy but I have not found any documentation for it.
What would be the process to gather that phone number?
Hi,
I would like to get the incoming phone number and use it in the same script widget.
I’m assuming this possible, and it is probably quite easy but I have not found any documentation for it.
What would be the process to gather that phone number?
Hi @mab
Try using a webhook and listen for “caller connected” event, it should give you the incoming phone number.
In addition to the webhook option Harsh mentioned, if you do want to keep your code in the Flow using the Script widget, you can see an example on this support article.
https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0058807
To capture the incoming phone number in a script widget, you would typically rely on the capabilities of the platform or service through which you’re receiving the phone call. The specifics can vary based on the telephony service or platform you’re using. Here are general steps you might consider:
Here’s a general example using JavaScript (assuming your telephony provider exposes data in this way):
javascriptCopy code
// Example JavaScript code in your script widget
// This assumes your telephony provider sends data through an event object
// Event handler for incoming calls
function handleIncomingCall(event) {
// Check if the event contains caller information
if (event.callerNumber) {
// Access the caller's phone number
var incomingPhoneNumber = event.callerNumber;
// Now you can use the incomingPhoneNumber in your script
console.log("Incoming Phone Number: " + incomingPhoneNumber);
}
}