How to forward a Twilio IVR call using dial.number when the caller ID is anonymous
Does anyone know how to get dial.number to work when the incoming caller ID is anonymous? The following code works when the caller's number is in Event.From, but fails if Event.From is "anonymous". I have tried to workaround this by specifying my own number (callerId: Event.To) but that does not work either.
if (context.TELEPHONE_NUMBER?.length)
{
twiml.say(voice, 'Thank you, please wait a moment.');
const dial = twiml.dial();
dial.number({
sendDigits: "ww1"
}, context.TELEPHONE_NUMBER);
}