Rayo with mod_httapi does not handle invalid cache file

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Rayo with mod_httapi does not handle invalid cache file

eravelo
This post has NOT been accepted by the mailing list yet.
Hello all, With mod_httapi, sometimes an audio file fetched from an URL cannot be played, because for whatever reason, the file is said to "contain data in an unknown format". The problem is that mod_rayo raises an error and the call fails, rather than trying to re-fetch the file.
Is this a bug in the way FreeSWITCH handles he audio file cache (mod_httapi) ?
Version: 1.4.15
Here is the FreeSWITCH log snippet:
2015-05-28 17:30:36.431962 [DEBUG] mod_ssml.c:812 Open: <speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
  <audio src="http://foo.bar.com/audio/commande_incorrecte.wav"/>
</speak>
2015-05-28 17:30:36.431962 [DEBUG] mod_ssml.c:738 Skipping empty tts
2015-05-28 17:30:36.431962 [DEBUG] mod_ssml.c:597 Adding <audio>: "http://foo.bar.com/audio/commande_incorrecte.wav"
2015-05-28 17:30:36.431962 [DEBUG] mod_ssml.c:738 Skipping empty tts
2015-05-28 17:30:36.431962 [DEBUG] mod_rayo.c:778 Locate (jid) usera@192.168.0.1/foo.bar.com-22542: ref count = 2
2015-05-28 17:30:36.431962 [DEBUG] rayo_components.c:62 Deliver 936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8 => usera@192.168.0.1/foo.bar.com-22542 <iq from='936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1' to='usera@192.168.0.1/foo.bar.com-22542' type='result' id='c165ebaf-830c-4511-9b29-03263653a2a0'><ref xmlns='urn:xmpp:rayo:1' uri='xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8'/></iq>
2015-05-28 17:30:36.431962 [DEBUG] mod_rayo.c:785 Release usera@192.168.0.1/foo.bar.com-22542: ref count = 1
2015-05-28 17:30:36.431962 [ERR] mod_sndfile.c:202 Error Opening File [/var/lib/freeswitch/storage/http_file_cache/bc6d923a7979fcad6e67fc28a08280fa.wav] [File contains data in an unknown format.]
2015-05-28 17:30:36.431962 [ERR] mod_httapi.c:2965 Invalid cache file /var/lib/freeswitch/storage/http_file_cache/bc6d923a7979fcad6e67fc28a08280fa.wav opening url foo.bar.com/audio/commande_incorrecte.wav Discarding file.
2015-05-28 17:30:36.431962 [INFO] rayo_output_component.c:502 Failed to open ssml://<speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
  <audio src="http://foo.bar.com/audio/commande_incorrecte.wav"/>
</speak>