In this post, I'm going to share a small snippet on how you can easily forward incoming calls to multiple phone numbers using your Twilio number. There are multiple ways you can do this. For our situation, I am using Twilio TwiML Bin to make the code.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Dial> <Number>+1-416808XXXX</Number> <Number>+1-437702XXXX</Number> </Dial> </Response>
Here, when a call get's to your Twilio Number, Twilio invokes a function to dial provided numbers.
- Firstly, make sure that you've at least a Twilio number (You can get 1 from here)
- Open TwiML Bin, if it's not showing on your sidebar, click Explore Products -> Select TwiML Bins (https://console.twilio.com/develop/explore)
As you can see I used the name: Call Forwarder
Copy & paste the above code to your new TwiML Bin.
Copy the URL from the TwiML Bin page.
After that, click on Phone Numbers->Active Numbers and select Call Forwarder from the A CALL COMES IN field
Select HTTP GET from the drop down.
Voila. That's it!
Now, when you ring your Twilio Number you'll get incoming calls to other numbers.
Please share this post if you think it's going to help someone.