I need to forward incoming calls to my Twilio number to a personal number. I need to do this by Java code because I have a few other Business logic executing when TwiMl App redirect the request and because of that, I can't use Twilio Studio.
I tried a few ways but didn't work and can't make the following method work. I think these are deprecated now,
Call call = Call.creator(
new PhoneNumber(TWILIO_NUMBER),
new PhoneNumber(FORWARD_TO),
new PhoneNumber(TWILIO_NUMBER)
).create();
And even following redirect()
method is also not there now.
Call.updater("call-sid")
.redirect(FORWARD_TO).update();
So what I need is when a call comes to my Twilio number then that call should be forwarded to my personal number. So how to do this? Can anybody help me? Thanks in advance.