This can be done with Twilio Studio. (https://www.twilio.com/docs/studio/user-guide)
Log into your Twilio account and navigate to the Studio Dashboard (https://www.twilio.com/console/studio/dashboard), then tap the + icon to create a new flow. Name your flow for example "Forward Call", then continue to the Studio's canvas.
First, add a "Gather Input On Call" widget and connect it to the "Incoming Call" trigger. For the "TEXT TO SAY" field you can input something like "Hello... please enter the number you'd like to call...". Click on the red "Save" button at the bottom.
Next, add a "Connect Call To" widget and connect it to the dangling "User Pressed Keys" dot from the "Gather Input On Call" widget. There is a field under "Single Number" select box, type {{widgets.gather_1.Digits}}
if your "Gather Input On Call" widget is named gather_1
. Click on the red "Save" button at the bottom.
Click on the "Publish" button at the top to save the flow.
Once the flow is published, the last thing to do is to hook it up to your Twilio phone number. In the Twilio console, select "Manage Numbers" and choose the phone number that you would like to connect.
Scroll down to the section for Voice and Fax, then select "Studio Flow" from the first drop-down and your flow name ("Forward Call") from the second drop-down. Click save.
Here is a picture that might help:

Also this tutorial can help to understand the steps: (
https://www.twilio.com/docs/studio/tutorials/how-to-build-an-ivr).