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
43 stars 18 forks source link

Specify custom URL for Twilio #930

Closed ysbaddaden closed 1 year ago

ysbaddaden commented 1 year ago

Reverts the revert + adds a fix to the erlang broker that should hopefully be working (to be verified).

related to #879 closes #878 closes https://github.com/instedd/surveda/issues/2226

ysbaddaden commented 1 year ago

Hum, the Dockerfile seems broken :thinking:

ysbaddaden commented 1 year ago

With this patch and the one from #931 then the twilio simulator is :tada:

I must still check whether it properly fallsback to the base URL :sweat_smile:

ysbaddaden commented 1 year ago

@matiasgarciaisaia updated with the default URL that also appears as placeholders:


From Surveda: Capture d’écran de 2023-03-27 19-01-53@2x


From Verboice: Capture d’écran de 2023-03-27 19-02-16@2x

matiasgarciaisaia commented 1 year ago

:shipit:

ysbaddaden commented 1 year ago

@matiasgarciaisaia here comes the very last tweak (I promise): let's clean up the base url as we save it, if it's blank we save nil otherwise we strip the string and chomp any trailing /.

Since it's a #config_accessor, I couldn't override #base_url= so I reluctantly wrote a before_validation callback.

I'm keeping the checks for null, undefined and blank strings in the Broker because they don't hurt.