amigniter / mod_audio_stream

FreeSWITCH module to stream audio to websocket and receive response
MIT License
66 stars 31 forks source link

[mod_audio_stream] WSS Connection Error #51

Open surabhigarg1234 opened 1 month ago

surabhigarg1234 commented 1 month ago

Hi Team,

I have query related to mod_audio_stream (trying to use mod_audio_stream for TTS) where whenever I am trying to connect mod_audio_stream on “wss”, web socket connection is failing and getting below errors in CLI Logs:

$> uuid_audio_stream 26950b34-e172-472e-9bbc-64cafc7f2460 start wss://x.x.x.x/ stereo 16000 +OK Success

2024-08-08 07:36:49.752677 99.03% [DEBUG] mod_audio_stream.c:150 mod_audio_stream cmd: 26950b34-e172-472e-9bbc-64cafc7f2460 start wss://x.x.x.x/ mono 16000 2024-08-08 07:36:49.752677 99.03% [DEBUG] mod_audio_stream.c:81 calling stream_session_init. 2024-08-08 07:36:49.752677 99.03% [DEBUG] audio_streamer_glue.cpp:368 (26950b34-e172-472e-9bbc-64cafc7f2460) resampling from 8000 to 16000 2024-08-08 07:36:49.752677 99.03% [DEBUG] audio_streamer_glue.cpp:379 (26950b34-e172-472e-9bbc-64cafc7f2460) stream_data_init 2024-08-08 07:36:49.752677 99.03% [DEBUG] mod_audio_stream.c:87 adding bug. 2024-08-08 07:36:49.752677 99.03% [DEBUG] switch_core_media_bug.c:976 Attaching BUG to sofia/internal/1000@17.51.161.60 2024-08-08 07:36:49.752677 99.03% [DEBUG] mod_audio_stream.c:91 setting bug private data. 2024-08-08 07:36:49.752677 99.03% [DEBUG] mod_audio_stream.c:94 exiting start_capture. 2024-08-08 07:36:49.792678 99.03% [DEBUG] switch_core_io.c:448 Setting BUG Codec PCMU:0 2024-08-08 07:36:50.152676 99.03% [INFO] audio_streamer_glue.cpp:146 connection error 2024-08-08 07:36:50.152676 99.03% [INFO] mod_audio_stream.c:33 Got SWITCH_ABC_TYPE_CLOSE. 2024-08-08 07:36:50.152676 99.03% [DEBUG] audio_streamer_glue.cpp:718 (26950b34-e172-472e-9bbc-64cafc7f2460) stream_session_cleanup 2024-08-08 07:36:50.152676 99.03% [INFO] mod_audio_stream.c:33 Got SWITCH_ABC_TYPE_CLOSE. 2024-08-08 07:36:50.152676 99.03% [DEBUG] audio_streamer_glue.cpp:738 stream_session_cleanup: no bug - websocket connection already closed 2024-08-08 07:36:50.152676 99.03% [DEBUG] switch_core_media_bug.c:1326 Removing BUG from sofia/internal/1000@17.51.161.60 2024-08-08 07:36:50.152676 99.03% [DEBUG] audio_streamer_glue.cpp:238 disconnecting... 2024-08-08 07:36:50.152676 99.03% [INFO] audio_streamer_glue.cpp:385 26950b34-e172-472e-9bbc-64cafc7f2460 destroy_tech_pvt 2024-08-08 07:36:50.152676 99.03% [INFO] audio_streamer_glue.cpp:734 (26950b34-e172-472e-9bbc-64cafc7f2460) stream_session_cleanup: connection closed

Where as when I am trying to connect same “wss” endpoint with another application that seems connected properly.

So, If you could help us, if there is any particular configuration needs to be done for “wss” in mod_audio_stream then let me know.

surabhigarg1234 commented 3 weeks ago

Hi Team,

Any help here would be appreciated.