0
votes

I have a question similar to this one: How can I display my Twilio number for inbound calls

However, I now have two separate Twilio numbers that both point to the same URL, so hard-coding the number as Caller ID is no longer an option. Is there a method I can use to get which Twilio number was called? I know that PhoneNumber gets the caller's number, so I need a way to distinguish which of my two numbers are calling.

1

1 Answers

0
votes

Twilio evangelist here.

When Twilio makes its HTTP request to your application letting you know that someone has called your Twilio number, we pass along a bunch of form-encoded parameters, including which Twilio phone number the person called. Your web platform should have a way to grab those parameters fro mthe incoming request. For example in PHP it looks like this:

$from = $_REQUEST['To'];

In .NET, there are a number of ways to do it, but here is one:

Request.Form["To"]

Hope that helps.