0

I would like to make an outgoing phone call from my twilio number(A) to another phone number(B). When the call is picked up, I would like to livestream audio from a public url. How do I do this?

I've been looking at the <stream> verb in TwiML, but my understanding is that it only streams audio from an active phonecall. I'd like to stream audio into the phonecall.

Any leads would be appreciated.

philnash
  • 70,667
  • 10
  • 60
  • 88

2 Answers2

0

Twilio developer evangelist here.

You are right that the <Stream> verb only streams audio from the phone call to your server.

Currently there is no simple way to stream audio back into a call using a TwiML verb.

If you knew your way around a PBX and how to stream audio over SIP, then you could connect a call using <Sip> and stream the audio that way.

Also, if you were making the call from a mobile application or browser, you could get access to the audio stream and send audio that way too.

philnash
  • 70,667
  • 10
  • 60
  • 88
0

If you are making an outgoing call, you can simply use the Play verb.

For example:

<Response>
    <Dial>415-123-4567</Dial>
    <Play>https://api.twilio.com/cowbell.mp3</Play>
</Response>
Ahmed
  • 1