0

In Twilio Flow, I want to say the user's number back to them

I see you are calling from {{trigger.call.From}}

Instead, it says it like a number, not digits 15,555,555,555

How do I get Flow to say individual digits?

Russ H
  • 21
  • 1
  • A similar question was just answered for someone else, see answer here. https://stackoverflow.com/questions/63158532/twilio-studio-how-to-play-back-gathered-digits-individually – Alan Jul 30 '20 at 12:39
  • You would set the `interpret-as="telephone"` – Alan Jul 30 '20 at 12:58

1 Answers1

0

Send the number out to a function as a parameter

function change(){
var orig = event.KEY;
var removePrefix = orig.substr(2);
var newNumber = removePrefix.replace(/(\d{3})(\d{3})(\d{4})/, "$1-$2-$3");
return newNumber;
} 

it will come back like this 777-555-9999

jack
  • 330
  • 3
  • 12