instedd / verboice

Open source toolkit for voice services; with special focus to the needs of medium- and low-income countries, scalable services, and interacting with vulnerable populations
http://verboice.instedd.org/
GNU General Public License v3.0
44 stars 18 forks source link

Audios can't be played by Twilio #880

Closed aeatencio closed 1 year ago

aeatencio commented 3 years ago

Reproduce the bug:

  1. Create a call flow.
  2. Include a Play step and upload an audio file.

Verboice call flow

  1. Make a call using a Twilio

Here is the bug:

The URL that Verboice gives to Twilio is wrong, so when Twilio tries to get the audio file Verboice returns 404.

Twilio call log

aeatencio commented 3 years ago

Here is where the URL is generated.

matiasgarciaisaia commented 1 year ago

The issue is that the generated URL needs to be responded by the broker instead of the web app (that's why the Wrong URL in the screenshot includes the /twilio part - because it's using the Broker's Callback URL setting), but the path should not be prefixed (ie, not include the /twilio part before the audio UUID) so the Broker's http module correctly handles it.

So we now have https://verboice-stg-broker.instedd.org/ pointing to the broker specifically, and are using that as the BROKER_HTTPD_BASE_URL, making audios work again.