jambonz / freeswitch-modules

Freeswitch modules designed for use with jambonz
Other
23 stars 19 forks source link

bug: jb_transcribe_glue connection dropped from far end #94

Closed vdharashive closed 1 week ago

vdharashive commented 1 month ago

custom transcribe node application if hosted using nginx , niginx have idle session set for 60 sec. mod_jambonz_transcribe connection gets disconnected after 60 sec. either ping/pong or reconnect ion need to be implemented

this case happens when call is kept on mute or on hold

2024-07-28 06:26:56.455481 99.07% [DEBUG] jb_transcribe_glue.cpp:198 connection dropped from far end

vdharashive commented 1 month ago

https://jambonz.freshdesk.com/support/tickets/306 logs are attached in freshdesk

vdharashive commented 1 month ago

On disconnecting it need to reconnect , specially transcribe runs for long time and needs to maintain the connection on failure to start transcribe again

davehorton commented 1 month ago

hmm, for jambonz 3rd party code like the far end websocket server has to be regarded as untrusted. We cannot spin reconnecting to a faulty or malicious 3rd party server. So its not quite that simple

vdharashive commented 1 month ago

@davehorton ping/pong will solve the problem , since currenlty its dropping after 1 min

xquanluu commented 3 weeks ago

Hi @vdharashive From my test, the jb_transcribe will keep sending data even I muted in caller side.

Do you have any hint on when the transcribe should be paused.

From your custom speech ws application on ws.on('message') event, do you see in which case the jb_transcribe stop sending traffic to you?

xquanluu commented 3 weeks ago

As My PR above I cannot tested it as libwebsocket just send ping message if connection is idle for 30 seconds. but jb_transcribe keep sending data so connection will never be idle