Rayo with mod_httapi does not handle invalid cache file ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Rayo with mod_httapi does not handle invalid cache file ?

Eric Ravelo
Hello all,

On FreeSWITCH 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 (Failed to open ssml) which then raises an Error in Adhearsion.

Is this a bug in the way FreeSWITCH handles he audio file cache (mod_httapi), or a bug in mod_rayo which cannot properly handle this situation, or a bug in Adhearsion ?

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>
2015-05-28 17:30:36.431962 [INFO] rayo_output_component.c:441 Done playing



And the Adhearsion log snippet:

[2015-05-28 17:30:36.489] ERROR Adhearsion::Call: 936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1: <Adhearsion::CallController::Output::PlaybackError> Output failed due to #<Adhearsion::Error: : #<Punchblock::Component::Output target_call_id="936b8201-399a-49eb-bb57-aa091cc5be34", target_mixer_name=nil, component_id="output-8", source_uri="xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8", domain="192.168.0.1", transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, request_id="c165ebaf-830c-4511-9b29-03263653a2a0", headers={}, voice=nil, interrupt_on=nil, start_offset=nil, start_paused=nil, repeat_interval=nil, repeat_times=nil, max_time=nil, renderer=nil, render_documents=[#<Punchblock::Component::Output::Document target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, url=nil, content_type="application/ssml+xml", value=<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>>]>>
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:23:in `rescue in output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:13:in `output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:318:in `stream_file'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:297:in `block in interruptible_play'

Thanks,
Eric

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Rayo with mod_httapi does not handle invalid cache file ?

Christopher Rienzo
That error message suggests the .wav file is corrupted since libsndfile didn't like it.  So, it bubbled up to Adhearsion as a general Output failure.  You could try mod_http_cache to see if it works better for you.


On Fri, May 29, 2015 at 12:56 PM, Eric Ravelo <[hidden email]> wrote:
Hello all,

On FreeSWITCH 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 (Failed to open ssml) which then raises an Error in Adhearsion.

Is this a bug in the way FreeSWITCH handles he audio file cache (mod_httapi), or a bug in mod_rayo which cannot properly handle this situation, or a bug in Adhearsion ?

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">
</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='[hidden email]' 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">
</speak>
2015-05-28 17:30:36.431962 [INFO] rayo_output_component.c:441 Done playing



And the Adhearsion log snippet:

[2015-05-28 17:30:36.489] ERROR Adhearsion::Call: [hidden email]: <Adhearsion::CallController::Output::PlaybackError> Output failed due to #<Adhearsion::Error: : #<Punchblock::Component::Output target_call_id="936b8201-399a-49eb-bb57-aa091cc5be34", target_mixer_name=nil, component_id="output-8", source_uri="xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8", domain="192.168.0.1", transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, request_id="c165ebaf-830c-4511-9b29-03263653a2a0", headers={}, voice=nil, interrupt_on=nil, start_offset=nil, start_paused=nil, repeat_interval=nil, repeat_times=nil, max_time=nil, renderer=nil, render_documents=[#<Punchblock::Component::Output::Document target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, url=nil, content_type="application/ssml+xml", value=<speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
</speak>>]>>
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:23:in `rescue in output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:13:in `output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:318:in `stream_file'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:297:in `block in interruptible_play'

Thanks,
Eric

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Rayo with mod_httapi does not handle invalid cache file ?

Eric Ravelo
Thanks for the answer Christopher,

I will definitely try mod_http_cache, but I am wondering why libsndfile finds the WAV file corrupted, since that file has been fetched and played correctly before. As I said, this problem occurs from time to time on different WAV files, perfectly valid in the first place.

On Friday, May 29, 2015 at 10:36:41 PM UTC+2, Christopher Rienzo wrote:
That error message suggests the .wav file is corrupted since libsndfile didn't like it.  So, it bubbled up to Adhearsion as a general Output failure.  You could try mod_http_cache to see if it works better for you.


On Fri, May 29, 2015 at 12:56 PM, Eric Ravelo <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="hsDuco4b5iwJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">era...@...> wrote:
Hello all,

On FreeSWITCH 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 (Failed to open ssml) which then raises an Error in Adhearsion.

Is this a bug in the way FreeSWITCH handles he audio file cache (mod_httapi), or a bug in mod_rayo which cannot properly handle this situation, or a bug in Adhearsion ?

Here is the FreeSWITCH log snippet:

2015-05-28 17:30:36.431962 [DEBUG] mod_ssml.c:812 Open: <speak xmlns="<a href="http://www.w3.org/2001/10/synthesis" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3.org%2F2001%2F10%2Fsynthesis\46sa\75D\46sntz\0751\46usg\75AFQjCNFqjm6NM14_EJaEnQY0QPVBzOEhHg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3.org%2F2001%2F10%2Fsynthesis\46sa\75D\46sntz\0751\46usg\75AFQjCNFqjm6NM14_EJaEnQY0QPVBzOEhHg';return true;">http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
  <audio src="<a href="http://foo.bar.com/audio/commande_incorrecte.wav" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;">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>: "<a href="http://foo.bar.com/audio/commande_incorrecte.wav" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;">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) <a href="http://usera@192.168.0.1/foo.bar.com-22542" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;">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 <a href="http://936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2F936b8201-399a-49eb-bb57-aa091cc5be34%40192.168.0.1%2Foutput-8\46sa\75D\46sntz\0751\46usg\75AFQjCNEUlgZGPRHwKQUsbm2x0gBZf60RVQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2F936b8201-399a-49eb-bb57-aa091cc5be34%40192.168.0.1%2Foutput-8\46sa\75D\46sntz\0751\46usg\75AFQjCNEUlgZGPRHwKQUsbm2x0gBZf60RVQ';return true;">936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8 => <a href="http://usera@192.168.0.1/foo.bar.com-22542" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;">usera@192.168.0.1/foo.bar.com-22542 <iq from='<a href="javascript:" target="_blank" gdf-obfuscated-mailto="hsDuco4b5iwJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1' to='<a href="http://usera@192.168.0.1/foo.bar.com-22542" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;">usera@192.168.0.1/foo.bar.com-22542' type='result' id='c165ebaf-830c-4511-9b29-03263653a2a0'><ref xmlns='urn:xmpp:rayo:1' uri='<a href="http://xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8'/" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fxmpp%3A936b8201-399a-49eb-bb57-aa091cc5be34%40192.168.0.1%2Foutput-8\47%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHyDnwrUTHRCIDupXK70kyZnjqQVQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fxmpp%3A936b8201-399a-49eb-bb57-aa091cc5be34%40192.168.0.1%2Foutput-8\47%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHyDnwrUTHRCIDupXK70kyZnjqQVQ';return true;">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 <a href="http://usera@192.168.0.1/foo.bar.com-22542" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fusera%40192.168.0.1%2Ffoo.bar.com-22542\46sa\75D\46sntz\0751\46usg\75AFQjCNHvhwD8JVsl3DRSo7szL3DLoRI_bw';return true;">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 <a href="http://foo.bar.com/audio/commande_incorrecte.wav" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;">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="<a href="http://www.w3.org/2001/10/synthesis" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3.org%2F2001%2F10%2Fsynthesis\46sa\75D\46sntz\0751\46usg\75AFQjCNFqjm6NM14_EJaEnQY0QPVBzOEhHg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3.org%2F2001%2F10%2Fsynthesis\46sa\75D\46sntz\0751\46usg\75AFQjCNFqjm6NM14_EJaEnQY0QPVBzOEhHg';return true;">http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
  <audio src="<a href="http://foo.bar.com/audio/commande_incorrecte.wav" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;">http://foo.bar.com/audio/commande_incorrecte.wav"/>
</speak>
2015-05-28 17:30:36.431962 [INFO] rayo_output_component.c:441 Done playing



And the Adhearsion log snippet:

[2015-05-28 17:30:36.489] ERROR Adhearsion::Call: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="hsDuco4b5iwJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1: <Adhearsion::CallController::Output::PlaybackError> Output failed due to #<Adhearsion::Error: : #<Punchblock::Component::Output target_call_id="936b8201-399a-49eb-bb57-aa091cc5be34", target_mixer_name=nil, component_id="output-8", source_uri="<a href="http://xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fxmpp%3A936b8201-399a-49eb-bb57-aa091cc5be34%40192.168.0.1%2Foutput-8\46sa\75D\46sntz\0751\46usg\75AFQjCNG0L1Rmny_AAoYSpiM3wjo5gxgxZA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fxmpp%3A936b8201-399a-49eb-bb57-aa091cc5be34%40192.168.0.1%2Foutput-8\46sa\75D\46sntz\0751\46usg\75AFQjCNG0L1Rmny_AAoYSpiM3wjo5gxgxZA';return true;">xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8", domain="192.168.0.1", transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, request_id="c165ebaf-830c-4511-9b29-03263653a2a0", headers={}, voice=nil, interrupt_on=nil, start_offset=nil, start_paused=nil, repeat_interval=nil, repeat_times=nil, max_time=nil, renderer=nil, render_documents=[#<Punchblock::Component::Output::Document target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, url=nil, content_type="application/ssml+xml", value=<speak xmlns="<a href="http://www.w3.org/2001/10/synthesis" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3.org%2F2001%2F10%2Fsynthesis\46sa\75D\46sntz\0751\46usg\75AFQjCNFqjm6NM14_EJaEnQY0QPVBzOEhHg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3.org%2F2001%2F10%2Fsynthesis\46sa\75D\46sntz\0751\46usg\75AFQjCNFqjm6NM14_EJaEnQY0QPVBzOEhHg';return true;">http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
  <audio src="<a href="http://foo.bar.com/audio/commande_incorrecte.wav" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ffoo.bar.com%2Faudio%2Fcommande_incorrecte.wav\46sa\75D\46sntz\0751\46usg\75AFQjCNGd2zxHNlabv6ajHt8a5KzL9H7o-g';return true;">http://foo.bar.com/audio/commande_incorrecte.wav"/>
</speak>>]>>
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:23:in `rescue in output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:13:in `output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:318:in `stream_file'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:297:in `block in interruptible_play'

Thanks,
Eric

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="hsDuco4b5iwJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Rayo with mod_httapi does not handle invalid cache file ?

Christopher Rienzo
Not sure- maybe it's an issue with mod_httapi.  I wrote mod_http_cache and can vouch for that module.  Just make sure to set the "enable-file-formats" param to true in http_cache.xml and disable mod_httapi.



On Mon, Jun 1, 2015 at 3:38 AM, Eric Ravelo <[hidden email]> wrote:
Thanks for the answer Christopher,

I will definitely try mod_http_cache, but I am wondering why libsndfile finds the WAV file corrupted, since that file has been fetched and played correctly before. As I said, this problem occurs from time to time on different WAV files, perfectly valid in the first place.

On Friday, May 29, 2015 at 10:36:41 PM UTC+2, Christopher Rienzo wrote:
That error message suggests the .wav file is corrupted since libsndfile didn't like it.  So, it bubbled up to Adhearsion as a general Output failure.  You could try mod_http_cache to see if it works better for you.


On Fri, May 29, 2015 at 12:56 PM, Eric Ravelo <[hidden email]> wrote:
Hello all,

On FreeSWITCH 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 (Failed to open ssml) which then raises an Error in Adhearsion.

Is this a bug in the way FreeSWITCH handles he audio file cache (mod_httapi), or a bug in mod_rayo which cannot properly handle this situation, or a bug in Adhearsion ?

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">
</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">
</speak>
2015-05-28 17:30:36.431962 [INFO] rayo_output_component.c:441 Done playing



And the Adhearsion log snippet:

[2015-05-28 17:30:36.489] ERROR Adhearsion::Call: 936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1: <Adhearsion::CallController::Output::PlaybackError> Output failed due to #<Adhearsion::Error: : #<Punchblock::Component::Output target_call_id="936b8201-399a-49eb-bb57-aa091cc5be34", target_mixer_name=nil, component_id="output-8", source_uri="xmpp:936b8201-399a-49eb-bb57-aa091cc5be34@192.168.0.1/output-8", domain="192.168.0.1", transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, request_id="c165ebaf-830c-4511-9b29-03263653a2a0", headers={}, voice=nil, interrupt_on=nil, start_offset=nil, start_paused=nil, repeat_interval=nil, repeat_times=nil, max_time=nil, renderer=nil, render_documents=[#<Punchblock::Component::Output::Document target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, timestamp=Thu, 28 May 2015 17:30:36 +0200, url=nil, content_type="application/ssml+xml", value=<speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
</speak>>]>>
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:23:in `rescue in output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output/player.rb:13:in `output'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:318:in `stream_file'
  /home/callengine/ahn_apps/call-engine/shared/bundle/ruby/2.1.0/gems/adhearsion-2.6.0/lib/adhearsion/call_controller/output.rb:297:in `block in interruptible_play'

Thanks,
Eric

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.