0
votes

We have a very basic test project using Twilio API. Everything is working except this simple scenario:

var call = CallResource.Create(
    url: new Uri("https://handler.twilio.com/twiml/EHXXXXXXXXX"),
    to: to,
    from: from

I am attempting to connect an outbound call to a phone #, if someone answers then I can say hello. The user may have the "from" number connected to their cell phone. So, my understanding is call happens, from cell phone rings (to connect) and then To Number is called.

The URL parameter is Twiml (and required). There are only a few accepted verbs "play", "say", etc...

The result I am looking for is if call is answered, the user can speak directly to them.

1

1 Answers

1
votes

Twilio developer evangelist here.

When you make an outbound call like that, you make the call from Twilio to the to number, in this case using the from number of the person's phone that you've verified with Twilio. But the call leg is still between just Twilio and the to number.

You need to connect that call to the other number.

When the initial leg connects, that's when Twilio makes an HTTP request to the URL that you pass to CallResource.Create. You need to respond to that request with TwiML that <Dial>s onto the other number.

Let me know if that helps at all.