Search code examples
twiliowebhookstwilio-twiml

forward voice call *and* invoke webhook


Before asking this question I searched "forward voice call and invoke webhook" but did not find what I'm looking for.

I have successfully configured a Twilio phone number such that if an incoming call is SMS it goes to my webhook, but if it's voice it forwards to my mobile phone.

Now I'd like those voice calls to also call a webhook (different than the webhook above) in addition to forwarding the call to my mobile phone. I want this so I can capture the caller's number, and the called number, (To/From) and store those in my database.

Can anyone point me to an article on this?


Solution

  • Twilio developer evangelist here.

    If you want to receive the webhook too, then I recommend you don't use TwiMLBins at all. Just set up your URL that you want the webhook to send the data to to respond with the TwiML to forward the call too.