2025-10-16T11:47:25.436+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TwilioVoiceController   : Generated WebSocket URL: wss://benedictory-provocative-lauralee.ngrok-free.dev/media-stream
2025-10-16T11:47:25.436+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TwilioVoiceController   : 🎙️ ElevenLabs mode: Agent will deliver welcome message from dashboard
2025-10-16T11:47:25.436+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TwilioVoiceController   : Returning TwiML for provider ELEVENLABS: <?xml version="1.0" encoding="UTF-8"?><Response>  <Connect>    <Stream url="wss://benedictory-provocative-lauralee.ngrok-free.dev/media-stream" />  </Connect></Response>
2025-10-16T11:47:25.437+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-2] m.m.a.RequestResponseBodyMethodProcessor : Using 'application/xml', given [*/*] and supported [application/xml]
2025-10-16T11:47:25.437+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-2] m.m.a.RequestResponseBodyMethodProcessor : Writing ["<?xml version="1.0" encoding="UTF-8"?><Response>  <Connect>    <Stream url="wss://benedictory-provoc (truncated)..."]
2025-10-16T11:47:25.437+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-2] o.j.s.OpenEntityManagerInViewInterceptor : Closing JPA EntityManager in OpenEntityManagerInViewInterceptor
2025-10-16T11:47:25.438+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.web.servlet.DispatcherServlet        : Completed 200 OK
2025-10-16T11:47:33.080+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.security.web.FilterChainProxy        : Securing GET /media-stream
2025-10-16T11:47:33.081+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-16T11:47:33.082+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.security.web.FilterChainProxy        : Secured GET /media-stream
2025-10-16T11:47:33.082+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.web.servlet.DispatcherServlet        : GET "/media-stream", parameters={}
2025-10-16T11:47:33.082+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.w.s.s.s.WebSocketHandlerMapping      : Mapped to org.springframework.web.socket.server.support.WebSocketHttpRequestHandler@15beb40b
2025-10-16T11:47:33.085+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.w.s.s.s.WebSocketHttpRequestHandler  : GET /media-stream
2025-10-16T11:47:33.103+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.web.servlet.DispatcherServlet        : Completed 101 SWITCHING_PROTOCOLS
2025-10-16T11:47:33.112+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-3] s.w.s.h.LoggingWebSocketHandlerDecorator : New StandardWebSocketSession[id=0025764c-decf-a0b5-d7f0-3008041e3f17, uri=ws://benedictory-provocative-lauralee.ngrok-free.dev/media-stream]
2025-10-16T11:47:33.112+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.handler.TwilioMediaStreamHandler   : === TWILIO WEBSOCKET CONNECTED === Session ID: 0025764c-decf-a0b5-d7f0-3008041e3f17
2025-10-16T11:47:33.112+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.handler.TwilioMediaStreamHandler   : Remote address: /[0:0:0:0:0:0:0:1]:54187
2025-10-16T11:47:33.113+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.handler.TwilioMediaStreamHandler   : URI: ws://benedictory-provocative-lauralee.ngrok-free.dev/media-stream
2025-10-16T11:47:33.113+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.voip.factory.VoiceAiSessionFactory   : Creating AI session handler for provider: ELEVENLABS
2025-10-16T11:47:33.113+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.handler.TwilioMediaStreamHandler   : Created AI session handler: ElevenLabsSessionHandler
2025-10-16T11:47:40.785+01:00 DEBUG 71149 --- [saas-multitenant-api] [l-1:housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=10/10, idle=10/10, active=0, waiting=0)
2025-10-16T11:47:40.785+01:00 DEBUG 71149 --- [saas-multitenant-api] [l-1:housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled.
2025-10-16T11:47:42.962+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-4] s.w.s.h.LoggingWebSocketHandlerDecorator : Transport error in StandardWebSocketSession[id=0025764c-decf-a0b5-d7f0-3008041e3f17, uri=ws://benedictory-provocative-lauralee.ngrok-free.dev/media-stream]

java.io.EOFException: null
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1335)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1220)
	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74)
	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184)
	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164)
	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152)
	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1776)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:975)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:493)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	at java.base/java.lang.Thread.run(Thread.java:1474)

2025-10-16T11:47:42.962+01:00 ERROR 71149 --- [saas-multitenant-api] [nio-7001-exec-4] c.s.v.handler.TwilioMediaStreamHandler   : === WEBSOCKET TRANSPORT ERROR === Session: 0025764c-decf-a0b5-d7f0-3008041e3f17

java.io.EOFException: null
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1335)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1220)
	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74)
	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184)
	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164)
	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152)
	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1776)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:975)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:493)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	at java.base/java.lang.Thread.run(Thread.java:1474)

2025-10-16T11:47:42.969+01:00 DEBUG 71149 --- [saas-multitenant-api] [nio-7001-exec-4] s.w.s.h.LoggingWebSocketHandlerDecorator : StandardWebSocketSession[id=0025764c-decf-a0b5-d7f0-3008041e3f17, uri=ws://benedictory-provocative-lauralee.ngrok-free.dev/media-stream] closed with CloseStatus[code=1006, reason=null]
2025-10-16T11:47:42.969+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-4] c.s.v.handler.TwilioMediaStreamHandler   : === TWILIO WEBSOCKET DISCONNECTED === Session: 0025764c-decf-a0b5-d7f0-3008041e3f17, status: CloseStatus[code=1006, reason=null]
2025-10-16T11:47:42.969+01:00  INFO 71149 --- [saas-multitenant-api] [nio-7001-exec-4] c.s.v.handler.ElevenLabsSessionHandler   : ElevenLabs handler - Closing session: 0025764c-decf-a0b5-d7f0-3008041e3f17
