2025-10-21T21:42:58.652+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.filter.TelnyxTenantResolverFilter  : 🎯 TelnyxTenantResolverFilter: Intercepting webhook: /api/voip/telnyx/texml-response
2025-10-21T21:42:58.655+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
Hibernate: 
    select
        pn1_0.id,
        pn1_0.created_at,
        pn1_0.description,
        pn1_0.friendly_name,
        pn1_0.is_active,
        pn1_0.phone_number,
        pn1_0.provider,
        pn1_0.tenant_id,
        pn1_0.updated_at 
    from
        phone_numbers pn1_0 
    where
        pn1_0.phone_number=?
2025-10-21T21:42:58.698+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:42:58.698+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:42:58.698+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T21:42:58.711+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
Hibernate: 
    select
        t1_0.id,
        t1_0.created_at,
        t1_0.schema_name,
        t1_0.status,
        t1_0.tenant_id,
        t1_0.tenant_name,
        t1_0.updated_at 
    from
        tenants t1_0 
    where
        t1_0.tenant_id=?
2025-10-21T21:42:58.712+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:42:58.712+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:42:58.712+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T21:42:58.714+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.filter.TelnyxTenantResolverFilter  : ✅ TelnyxTenantResolverFilter: Resolved tenant 'e7f7179a-5393-4711-adae-083a22cf9e68' (schema: tenant_clinique_la_rive1_bleue1) for number: +18066983980 - Context remains 'saas_db'
2025-10-21T21:42:58.722+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] o.s.security.web.FilterChainProxy        : Securing POST /api/voip/telnyx/texml-response
2025-10-21T21:42:58.727+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.security.TenantIdentifierFilter    : 🔒 TenantIdentifierFilter: Tenant already set to 'saas_db', skipping JWT extraction for URI: /api/voip/telnyx/texml-response
2025-10-21T21:42:58.728+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-21T21:42:58.731+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] o.s.security.web.FilterChainProxy        : Secured POST /api/voip/telnyx/texml-response
2025-10-21T21:42:58.733+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T21:42:58.741+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : === TELNYX TeXML REQUEST ===
2025-10-21T21:42:58.741+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 📞 From: +212661979197, To: +18066983980, CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, Status: null
2025-10-21T21:42:58.741+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : ✅ Using tenant from filter: e7f7179a-5393-4711-adae-083a22cf9e68 (schema: tenant_clinique_la_rive1_bleue1)
2025-10-21T21:42:58.743+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:42:58.743+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:42:58.744+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
Hibernate: 
    insert 
    into
        inbound_call_data
        (account_sid, api_version, call_sid, call_status, call_token, called, called_city, called_country, called_state, called_zip, caller, caller_city, caller_country, caller_state, caller_zip, conversation, created_at, direction, duration, end_time, forwarded_from, from_city, from_country, from_number, from_state, from_zip, parent_call_sid, provider, recording_sid, recording_url, start_time, stir_verstat, tenant_id, to_city, to_country, to_number, to_state, to_zip, updated_at) 
    values
        (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as json), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2025-10-21T21:42:58.761+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : ✅ [1/2] Call data saved to ADMIN database (saas_db) - CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, Tenant: e7f7179a-5393-4711-adae-083a22cf9e68
2025-10-21T21:42:58.761+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : 🆕 Creating MANUAL Hibernate Session for tenant schema: tenant_clinique_la_rive1_bleue1
2025-10-21T21:42:58.761+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T21:42:58.761+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: tenant_clinique_la_rive1_bleue1
2025-10-21T21:42:58.761+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE tenant_clinique_la_rive1_bleue1
2025-10-21T21:42:58.761+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: tenant_clinique_la_rive1_bleue1
2025-10-21T21:42:58.761+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : ✅ New Hibernate Session created with explicit tenantIdentifier: tenant_clinique_la_rive1_bleue1
Hibernate: 
    insert 
    into
        inbound_call_data
        (account_sid, api_version, call_sid, call_status, call_token, called, called_city, called_country, called_state, called_zip, caller, caller_city, caller_country, caller_state, caller_zip, conversation, created_at, direction, duration, end_time, forwarded_from, from_city, from_country, from_number, from_state, from_zip, parent_call_sid, provider, recording_sid, recording_url, start_time, stir_verstat, to_city, to_country, to_number, to_state, to_zip, updated_at) 
    values
        (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as json), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2025-10-21T21:42:58.772+01:00  WARN 14814 --- [saas-multitenant-api] [nio-7001-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1054, SQLState: 42S22
2025-10-21T21:42:58.772+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper   : Unknown column 'conversation' in 'field list'
2025-10-21T21:42:58.774+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : Error saving call data to tenant schema 'tenant_clinique_la_rive1_bleue1' for CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA

org.hibernate.exception.SQLGrammarException: could not execute statement [Unknown column 'conversation' in 'field list'] [insert into inbound_call_data (account_sid,api_version,call_sid,call_status,call_token,called,called_city,called_country,called_state,called_zip,caller,caller_city,caller_country,caller_state,caller_zip,conversation,created_at,direction,duration,end_time,forwarded_from,from_city,from_country,from_number,from_state,from_zip,parent_call_sid,provider,recording_sid,recording_url,start_time,stir_verstat,to_city,to_country,to_number,to_state,to_zip,updated_at) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,cast(? as json),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]
	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:66)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
	at org.hibernate.id.insert.GetGeneratedKeysDelegate.performMutation(GetGeneratedKeysDelegate.java:116)
	at org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:47)
	at org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:55)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.doStaticInserts(InsertCoordinatorStandard.java:194)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.coordinateInsert(InsertCoordinatorStandard.java:132)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.insert(InsertCoordinatorStandard.java:95)
	at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:85)
	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:682)
	at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:293)
	at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:274)
	at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:324)
	at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:394)
	at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:308)
	at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:224)
	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:136)
	at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:177)
	at org.hibernate.event.internal.DefaultPersistEventListener.persist(DefaultPersistEventListener.java:95)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55)
	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
	at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:761)
	at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:745)
	at com.saas.tenant.service.InboundCallService.saveInTenantSchema(InboundCallService.java:164)
	at com.saas.tenant.service.InboundCallService.saveInBothDatabases(InboundCallService.java:110)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:360)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:724)
	at com.saas.tenant.service.InboundCallService$$SpringCGLIB$$0.saveInBothDatabases(<generated>)
	at com.saas.voip.controller.TelnyxTeXMLController.handleTeXMLRequest(TelnyxTeXMLController.java:97)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:258)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:191)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:991)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:896)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
	at org.springframework.security.web.ObservationFilterChainDecorator$FilterObservation$SimpleFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:490)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:351)
	at org.springframework.security.web.ObservationFilterChainDecorator.lambda$wrapSecured$0(ObservationFilterChainDecorator.java:83)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:129)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:125)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at com.saas.shared.security.TenantIdentifierFilter.doFilterInternal(TenantIdentifierFilter.java:57)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at com.saas.shared.security.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:56)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:334)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:225)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.ServletRequestPathFilter.doFilter(ServletRequestPathFilter.java:52)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebSecurityConfiguration.java:319)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$4(HandlerMappingIntrospector.java:267)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:240)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:110)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at com.saas.voip.filter.TelnyxTenantResolverFilter.doFilterInternal(TelnyxTenantResolverFilter.java:89)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:116)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:398)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	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)
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'conversation' in 'field list'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:988)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1166)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1101)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1448)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1084)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:194)
	... 178 common frames omitted

2025-10-21T21:42:58.775+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : 🔒 Closed manual Hibernate Session for schema: tenant_clinique_la_rive1_bleue1
2025-10-21T21:42:58.775+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : ❌ CRITICAL: Failed to save call data to TENANT database - CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA

java.lang.RuntimeException: Failed to save call data to tenant schema: tenant_clinique_la_rive1_bleue1
	at com.saas.tenant.service.InboundCallService.saveInTenantSchema(InboundCallService.java:180)
	at com.saas.tenant.service.InboundCallService.saveInBothDatabases(InboundCallService.java:110)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:360)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:724)
	at com.saas.tenant.service.InboundCallService$$SpringCGLIB$$0.saveInBothDatabases(<generated>)
	at com.saas.voip.controller.TelnyxTeXMLController.handleTeXMLRequest(TelnyxTeXMLController.java:97)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:258)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:191)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:991)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:896)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
	at org.springframework.security.web.ObservationFilterChainDecorator$FilterObservation$SimpleFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:490)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:351)
	at org.springframework.security.web.ObservationFilterChainDecorator.lambda$wrapSecured$0(ObservationFilterChainDecorator.java:83)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:129)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:125)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at com.saas.shared.security.TenantIdentifierFilter.doFilterInternal(TenantIdentifierFilter.java:57)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at com.saas.shared.security.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:56)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:334)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:225)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.ServletRequestPathFilter.doFilter(ServletRequestPathFilter.java:52)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebSecurityConfiguration.java:319)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$4(HandlerMappingIntrospector.java:267)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:240)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:110)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at com.saas.voip.filter.TelnyxTenantResolverFilter.doFilterInternal(TelnyxTenantResolverFilter.java:89)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:116)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:398)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	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)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement [Unknown column 'conversation' in 'field list'] [insert into inbound_call_data (account_sid,api_version,call_sid,call_status,call_token,called,called_city,called_country,called_state,called_zip,caller,caller_city,caller_country,caller_state,caller_zip,conversation,created_at,direction,duration,end_time,forwarded_from,from_city,from_country,from_number,from_state,from_zip,parent_call_sid,provider,recording_sid,recording_url,start_time,stir_verstat,to_city,to_country,to_number,to_state,to_zip,updated_at) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,cast(? as json),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]
	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:66)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
	at org.hibernate.id.insert.GetGeneratedKeysDelegate.performMutation(GetGeneratedKeysDelegate.java:116)
	at org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:47)
	at org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:55)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.doStaticInserts(InsertCoordinatorStandard.java:194)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.coordinateInsert(InsertCoordinatorStandard.java:132)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.insert(InsertCoordinatorStandard.java:95)
	at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:85)
	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:682)
	at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:293)
	at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:274)
	at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:324)
	at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:394)
	at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:308)
	at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:224)
	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:136)
	at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:177)
	at org.hibernate.event.internal.DefaultPersistEventListener.persist(DefaultPersistEventListener.java:95)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55)
	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
	at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:761)
	at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:745)
	at com.saas.tenant.service.InboundCallService.saveInTenantSchema(InboundCallService.java:164)
	... 155 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'conversation' in 'field list'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:988)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1166)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1101)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1448)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1084)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:194)
	... 178 common frames omitted

2025-10-21T21:42:58.775+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : 🔄 ROLLBACK: Deleting orphaned admin record for CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA
Hibernate: 
    delete 
    from
        inbound_call_data 
    where
        id=?
2025-10-21T21:42:58.780+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : ✅ ROLLBACK SUCCESS: Admin record deleted for CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : ╔═══════════════════════════════════════════════════════╗
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : ║     CRITICAL ERROR: FAILED TO SAVE CALL DATA         ║
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : ╚═══════════════════════════════════════════════════════╝
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : ❌ Error saving Telnyx call data to databases
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    ├─ TenantId: e7f7179a-5393-4711-adae-083a22cf9e68
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    ├─ Schema: tenant_clinique_la_rive1_bleue1
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    ├─ CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA
2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    └─ Error: Failed to save call data to tenant database (tenant_clinique_la_rive1_bleue1): Failed to save call data to tenant schema: tenant_clinique_la_rive1_bleue1

java.lang.RuntimeException: Failed to save call data to tenant database (tenant_clinique_la_rive1_bleue1): Failed to save call data to tenant schema: tenant_clinique_la_rive1_bleue1
	at com.saas.tenant.service.InboundCallService.saveInBothDatabases(InboundCallService.java:128)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:360)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:724)
	at com.saas.tenant.service.InboundCallService$$SpringCGLIB$$0.saveInBothDatabases(<generated>)
	at com.saas.voip.controller.TelnyxTeXMLController.handleTeXMLRequest(TelnyxTeXMLController.java:97)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:258)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:191)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:991)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:896)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
	at org.springframework.security.web.ObservationFilterChainDecorator$FilterObservation$SimpleFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:490)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:351)
	at org.springframework.security.web.ObservationFilterChainDecorator.lambda$wrapSecured$0(ObservationFilterChainDecorator.java:83)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:129)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:125)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at com.saas.shared.security.TenantIdentifierFilter.doFilterInternal(TenantIdentifierFilter.java:57)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at com.saas.shared.security.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:56)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:334)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:225)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.ServletRequestPathFilter.doFilter(ServletRequestPathFilter.java:52)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebSecurityConfiguration.java:319)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$4(HandlerMappingIntrospector.java:267)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:240)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:110)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at com.saas.voip.filter.TelnyxTenantResolverFilter.doFilterInternal(TelnyxTenantResolverFilter.java:89)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:116)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:398)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	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)
Caused by: java.lang.RuntimeException: Failed to save call data to tenant schema: tenant_clinique_la_rive1_bleue1
	at com.saas.tenant.service.InboundCallService.saveInTenantSchema(InboundCallService.java:180)
	at com.saas.tenant.service.InboundCallService.saveInBothDatabases(InboundCallService.java:110)
	... 154 common frames omitted
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement [Unknown column 'conversation' in 'field list'] [insert into inbound_call_data (account_sid,api_version,call_sid,call_status,call_token,called,called_city,called_country,called_state,called_zip,caller,caller_city,caller_country,caller_state,caller_zip,conversation,created_at,direction,duration,end_time,forwarded_from,from_city,from_country,from_number,from_state,from_zip,parent_call_sid,provider,recording_sid,recording_url,start_time,stir_verstat,to_city,to_country,to_number,to_state,to_zip,updated_at) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,cast(? as json),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]
	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:66)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
	at org.hibernate.id.insert.GetGeneratedKeysDelegate.performMutation(GetGeneratedKeysDelegate.java:116)
	at org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:47)
	at org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:55)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.doStaticInserts(InsertCoordinatorStandard.java:194)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.coordinateInsert(InsertCoordinatorStandard.java:132)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.insert(InsertCoordinatorStandard.java:95)
	at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:85)
	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:682)
	at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:293)
	at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:274)
	at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:324)
	at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:394)
	at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:308)
	at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:224)
	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:136)
	at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:177)
	at org.hibernate.event.internal.DefaultPersistEventListener.persist(DefaultPersistEventListener.java:95)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55)
	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
	at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:761)
	at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:745)
	at com.saas.tenant.service.InboundCallService.saveInTenantSchema(InboundCallService.java:164)
	... 155 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'conversation' in 'field list'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:988)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1166)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1101)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1448)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1084)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:194)
	... 178 common frames omitted

2025-10-21T21:42:58.780+01:00 ERROR 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 📄 Error TeXML Response:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say language="fr-FR">Une erreur s'est produite. </Say>
  <Say language="fr-FR">Database error - please try again</Say>
  <Hangup/>
</Response>
2025-10-21T21:42:58.785+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.security.TenantIdentifierFilter    : 🧹 TenantIdentifierFilter: Cleared TenantContext after request
2025-10-21T21:42:58.786+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.filter.TelnyxTenantResolverFilter  : 🧹 TelnyxTenantResolverFilter: Cleared TenantContext
2025-10-21T21:43:04.967+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.filter.TelnyxTenantResolverFilter  : 🎯 TelnyxTenantResolverFilter: Intercepting webhook: /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:04.968+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
Hibernate: 
    select
        pn1_0.id,
        pn1_0.created_at,
        pn1_0.description,
        pn1_0.friendly_name,
        pn1_0.is_active,
        pn1_0.phone_number,
        pn1_0.provider,
        pn1_0.tenant_id,
        pn1_0.updated_at 
    from
        phone_numbers pn1_0 
    where
        pn1_0.phone_number=?
2025-10-21T21:43:04.972+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:43:04.973+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:43:04.974+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T21:43:04.980+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
Hibernate: 
    select
        t1_0.id,
        t1_0.created_at,
        t1_0.schema_name,
        t1_0.status,
        t1_0.tenant_id,
        t1_0.tenant_name,
        t1_0.updated_at 
    from
        tenants t1_0 
    where
        t1_0.tenant_id=?
2025-10-21T21:43:04.982+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:43:04.982+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:43:04.985+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T21:43:04.988+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.filter.TelnyxTenantResolverFilter  : ✅ TelnyxTenantResolverFilter: Resolved tenant 'e7f7179a-5393-4711-adae-083a22cf9e68' (schema: tenant_clinique_la_rive1_bleue1) for number: +18066983980 - Context remains 'saas_db'
2025-10-21T21:43:04.990+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.security.web.FilterChainProxy        : Securing POST /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:04.990+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.security.TenantIdentifierFilter    : 🔒 TenantIdentifierFilter: Tenant already set to 'saas_db', skipping JWT extraction for URI: /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:04.990+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-21T21:43:04.991+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.security.web.FilterChainProxy        : Secured POST /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:04.992+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T21:43:04.993+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TelnyxEventController   : === TELNYX AI CONVERSATION EVENT ===
2025-10-21T21:43:04.993+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TelnyxEventController   : 📥 Content-Type: application/x-www-form-urlencoded
2025-10-21T21:43:04.993+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TelnyxEventController   : 📥 All parameters: {AccountSid=24b8c68c-c52a-4dd2-859c-22f1d2e62203, AnsweredTime=2025-10-21T20:42:59.283809Z, CallControlId=v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, CallDuration=6, CallLegId=8720d7a8-aebe-11f0-a7e0-02420aef32a0, CallQualityStats={"inbound":{"jitter_max_variance":"0.00","jitter_packet_count":"0","mos":"4.50","packet_count":"277","skip_packet_count":"13"},"outbound":{"packet_count":"223","skip_packet_count":"0"}}, CallSessionId=8720d280-aebe-11f0-a95c-02420aef32a0, CallSid=v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, CallSidLegacy=v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, CallStatus=completed, CallbackSource=call-progress-events, CallingPartyType=pstn, ConnectionId=2806750933822736154, EndTime=2025-10-21T20:43:05.023793Z, From=+212661979197, FromSipUri=+212661979197@206.147.68.154:5060, HangupCause=normal_clearing, HangupSource=hangup-xml, OccurredAt=2025-10-21T20:43:05.023793Z, OrganizationId=24b8c68c-c52a-4dd2-859c-22f1d2e62203, SequenceNumber=0, SipHangupCause=unspecified, StartTime=2025-10-21T20:42:59.283809Z, Timestamp=2025-10-21 20:43:05.117294Z, To=+18066983980, ToSipUri=+18066983980@192.76.120.10:5060, UserId=24b8c68c-c52a-4dd2-859c-22f1d2e62203}
2025-10-21T21:43:05.009+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.security.TenantIdentifierFilter    : 🧹 TenantIdentifierFilter: Cleared TenantContext after request
2025-10-21T21:43:05.009+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.filter.TelnyxTenantResolverFilter  : 🧹 TelnyxTenantResolverFilter: Cleared TenantContext
2025-10-21T21:43:05.194+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.filter.TelnyxTenantResolverFilter  : 🎯 TelnyxTenantResolverFilter: Intercepting webhook: /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:05.195+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
Hibernate: 
    select
        pn1_0.id,
        pn1_0.created_at,
        pn1_0.description,
        pn1_0.friendly_name,
        pn1_0.is_active,
        pn1_0.phone_number,
        pn1_0.provider,
        pn1_0.tenant_id,
        pn1_0.updated_at 
    from
        phone_numbers pn1_0 
    where
        pn1_0.phone_number=?
2025-10-21T21:43:05.195+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:43:05.195+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:43:05.196+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T21:43:05.198+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
Hibernate: 
    select
        t1_0.id,
        t1_0.created_at,
        t1_0.schema_name,
        t1_0.status,
        t1_0.tenant_id,
        t1_0.tenant_name,
        t1_0.updated_at 
    from
        tenants t1_0 
    where
        t1_0.tenant_id=?
2025-10-21T21:43:05.198+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:43:05.198+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:43:05.199+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T21:43:05.200+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.filter.TelnyxTenantResolverFilter  : ✅ TelnyxTenantResolverFilter: Resolved tenant 'e7f7179a-5393-4711-adae-083a22cf9e68' (schema: tenant_clinique_la_rive1_bleue1) for number: +18066983980 - Context remains 'saas_db'
2025-10-21T21:43:05.200+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.security.web.FilterChainProxy        : Securing POST /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:05.201+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.security.TenantIdentifierFilter    : 🔒 TenantIdentifierFilter: Tenant already set to 'saas_db', skipping JWT extraction for URI: /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:05.201+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-21T21:43:05.201+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.security.web.FilterChainProxy        : Secured POST /api/voip/telnyx/ai/conversation-event
2025-10-21T21:43:05.201+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T21:43:05.201+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : === TELNYX AI CONVERSATION EVENT ===
2025-10-21T21:43:05.201+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : 📥 Content-Type: application/x-www-form-urlencoded
2025-10-21T21:43:05.201+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : 📥 All parameters: {AccountSid=24b8c68c-c52a-4dd2-859c-22f1d2e62203, BilledDurationSeconds[v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA]=60, CallCost[v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA]=0.0055, CallSid=v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, CallSidLegacy=v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, CallbackSource=call-cost-events, CallerId=+212661979197, CallingPartyType=pstn, ConnectionId=2806750933822736154, From=+212661979197, FromSipUri=+212661979197@206.147.68.154:5060, To=+18066983980, ToSipUri=+18066983980@192.76.120.10:5060}
2025-10-21T21:43:05.201+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : 💰 Processing call-cost-events webhook
2025-10-21T21:43:05.202+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : 💵 Call cost received - CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, Cost: $0.0055, Duration: 60s
Hibernate: 
    select
        pn1_0.id,
        pn1_0.created_at,
        pn1_0.description,
        pn1_0.friendly_name,
        pn1_0.is_active,
        pn1_0.phone_number,
        pn1_0.provider,
        pn1_0.tenant_id,
        pn1_0.updated_at 
    from
        phone_numbers pn1_0 
    where
        pn1_0.phone_number=?
2025-10-21T21:43:05.202+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T21:43:05.202+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T21:43:05.203+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
Hibernate: 
    select
        t1_0.id,
        t1_0.created_at,
        t1_0.schema_name,
        t1_0.status,
        t1_0.tenant_id,
        t1_0.tenant_name,
        t1_0.updated_at 
    from
        tenants t1_0 
    where
        t1_0.tenant_id=?
2025-10-21T21:43:05.206+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.t.service.CallCostTrackingService    : 💰 Saving call cost record - CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, Provider: TELNYX, Cost: 0.0055 USD
Hibernate: 
    select
        ccr1_0.id,
        ccr1_0.call_duration_seconds,
        ccr1_0.call_end_time,
        ccr1_0.call_sid,
        ccr1_0.call_start_time,
        ccr1_0.cost,
        ccr1_0.cost_details,
        ccr1_0.created_at,
        ccr1_0.currency,
        ccr1_0.from_number,
        ccr1_0.provider,
        ccr1_0.to_number,
        ccr1_0.updated_at 
    from
        call_cost_records ccr1_0 
    where
        ccr1_0.call_sid=?
Hibernate: 
    insert 
    into
        call_cost_records
        (call_duration_seconds, call_end_time, call_sid, call_start_time, cost, cost_details, created_at, currency, from_number, provider, to_number, updated_at) 
    values
        (?, ?, ?, ?, ?, cast(? as json), ?, ?, ?, ?, ?, ?)
2025-10-21T21:43:05.218+01:00  INFO 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : ✅ Call cost saved to admin database (saas_db) - CallSid: v3:32T2a9zu-8zgz3BvDpg9IRrvreECx4HxU9FeUk4oPUqr1zUaVvpdGA, Tenant: e7f7179a-5393-4711-adae-083a22cf9e68, Cost: $0.0055
2025-10-21T21:43:05.220+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.security.TenantIdentifierFilter    : 🧹 TenantIdentifierFilter: Cleared TenantContext after request
2025-10-21T21:43:05.220+01:00 DEBUG 14814 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.filter.TelnyxTenantResolverFilter  : 🧹 TelnyxTenantResolverFilter: Cleared TenantContext
