I am trying to play a mp3 file that's hosted on Twilio Assets, while I have a Twilio.Device (from JS SDK, in browser) triggering a call.
response = VoiceResponse()
dial = Dial(
caller_id=from_,
status_callback=f"https://{CALL_SERVER_URL}/status",
status_callback_method="POST",
status_callback_event=["initiated", "ringing", "answered", "completed"],
)
dial.number(to)
response.append(start)
response.append(dial)
response.pause(length=10)
The call initially dials, but when I want to play the MP3 after dialing with the following TwiML:
https://fakeurl.com/greeting.mp3
The call immediately disconnects.
Is there any way to play an MP3 sound on an active call (started within a browser) without the ending?