Play a url(https/http) media channel

Hi everybody,

I want play a sound after my record finish. So after record.on(RecordingFinished) in this function I run channel.play({media:‘sound:https://www.memoclic.com/medias/sons-wav/2/729.wav’} but I don’t listen something. when do I use playback.on(‘PlaybackStarted’) I can see my playback is state playing but nothing.
Do you have a idea what happening?

thank you in advance for your help.

A note to all, please don’t preemptively tag frequent posters to this board when you’d like someone to respond to your inquiry. These are community forums, and not a paid Support forum. It’s rude.

2 Likes

I try the play a file sound from asterisk in the repo /var/lib/asterisk/sounds/fr/tt-monkeys and I can listen the sound in my device but when I use https://www.memoclic.com/medias/sons-wav/2/729.wav, I don’t listen nothing.
I don’t understand what happen, I saw that it is possible the use http, https in playback but it doesn’t work for me.
Do you have a idea why ?

Thanks

You probably might be able to play from a file uri , im not sure if you can using http uri. Have you looked into your logs? Your log output might appear to be looking for .gsm or wav tts format. Remove the .wav extension from the uri path and try the request . If it doesn’t work then http protocol uri cant work with it

What does your log say? When playing the file .?

@johnson3yo when i play https://www.memoclic.com/medias/sons-wav/2/729.wav without wav or with.
I’m the same log below:

[Sep 10 12:53:45] WARNING [2741]: res_http_media_cache.c : 237 execute_curl_instance : server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

[Sep 10 12:53:45] WARNING [2741]: res_http_media_cache.c : 283 bucket_file_run_curl : Failed to retrieve URL ‘https://www.memoclic.com/medias/sons-wav/2/729.wav’: server returned -1

[Sep 10 12:53:45] WARNING [2741]: res_http_media_cache.c : 237 execute_curl_instance : server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

[Sep 10 12:53:45] WARNING [2741]: res_http_media_cache.c : 283 bucket_file_run_curl : Failed to retrieve URL ‘https://www.memoclic.com/medias/sons-wav/2/729.wav’: server returned -1

[Sep 10 12:53:45] WARNING [2741]: res_http_media_cache.c : 237 execute_curl_instance : server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

[Sep 10 12:53:45] WARNING [2741]: res_http_media_cache.c : 283 bucket_file_run_curl : Failed to retrieve URL ‘https://www.memoclic.com/medias/sons-wav/2/729.wav’: server returned -1

[Sep 10 12:53:45] WARNING [2741]: file.c : 774 ast_openstream_full : File https://www.memoclic.com/medias/sons-wav/2/729.wav does not exist in any format

[Sep 10 12:53:45] WARNING [2741]: file.c : 1247 ast_streamfile : Unable to open https://www.memoclic.com/medias/sons-wav/2/729.wav (format (ulaw)): No such file or directory

[Sep 10 12:53:45] WARNING [2741]: res_stasis_playback.c : 277 playback_final_update : 8f45c0af-0202-4bc5-a004-98c24b70a5dd: Playback failed for sound:https://www.memoclic.com/medias/sons-wav/2/729.wav`

Your system doesn’t appear to trust Gandi to authenticate secure web sites using SSL certificates.

what should I do for my system to trust website with SSL certificates?

Install the root certificate as per the instructions for openSSL, after obtaining it in a way that you trust.