2025-10-21T15:34:02.077+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.filter.TelnyxTenantResolverFilter  : 🎯 TelnyxTenantResolverFilter: Intercepting webhook: /api/voip/telnyx/texml-response
2025-10-21T15:34:02.080+01:00  INFO 81523 --- [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-21T15:34:02.117+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:02.118+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:02.118+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T15:34:02.129+01:00  INFO 81523 --- [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-21T15:34:02.129+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:02.129+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:02.130+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T15:34:02.131+01:00  INFO 81523 --- [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-21T15:34:02.137+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-1] o.s.security.web.FilterChainProxy        : Securing POST /api/voip/telnyx/texml-response
2025-10-21T15:34:02.140+01:00 DEBUG 81523 --- [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-21T15:34:02.140+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-1] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-21T15:34:02.142+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-1] o.s.security.web.FilterChainProxy        : Secured POST /api/voip/telnyx/texml-response
2025-10-21T15:34:02.144+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T15:34:02.150+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : === TELNYX TeXML REQUEST ===
2025-10-21T15:34:02.150+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 📞 From: +212661979197, To: +18066983980, CallSid: v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, Status: null
2025-10-21T15:34:02.150+01:00  INFO 81523 --- [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-21T15:34:02.152+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:02.152+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:02.152+01:00  INFO 81523 --- [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, 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
        (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2025-10-21T15:34:02.167+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : ✅ [1/2] Call data saved to ADMIN database (saas_db) - CallSid: v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, Tenant: e7f7179a-5393-4711-adae-083a22cf9e68
2025-10-21T15:34:02.167+01:00  INFO 81523 --- [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-21T15:34:02.167+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T15:34:02.167+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: tenant_clinique_la_rive1_bleue1
2025-10-21T15:34:02.167+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE tenant_clinique_la_rive1_bleue1
2025-10-21T15:34:02.168+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: tenant_clinique_la_rive1_bleue1
2025-10-21T15:34:02.168+01:00 DEBUG 81523 --- [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, 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
        (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2025-10-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : 💾 Call data saved to TENANT schema 'tenant_clinique_la_rive1_bleue1' - CallSid: v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, From: +212661979197, To: +18066983980
2025-10-21T15:34:02.170+01:00 DEBUG 81523 --- [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-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : ✅ [2/2] Call data saved to TENANT database (tenant_clinique_la_rive1_bleue1) - CallSid: v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw
2025-10-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.tenant.service.InboundCallService    : 🎯 SUCCESS: Call data saved to BOTH admin and tenant databases
2025-10-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : ✅ SUCCESS: Telnyx call data saved to BOTH admin and tenant databases
2025-10-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    ├─ Admin DB (saas_db): ✅
2025-10-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    ├─ Tenant DB (tenant_clinique_la_rive1_bleue1): ✅
2025-10-21T15:34:02.170+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   :    └─ CallSid: v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw
2025-10-21T15:34:02.171+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.s.TenantVoipConfigRuntimeService   : 🔍 Resolving VoIP config for tenant: e7f7179a-5393-4711-adae-083a22cf9e68, provider: TELNYX
Hibernate: 
    select
        tvc1_0.id,
        tvc1_0.ai_assistant_id,
        tvc1_0.ai_type,
        tvc1_0.created_at,
        tvc1_0.is_active,
        tvc1_0.messaging_profile_id,
        tvc1_0.metadata,
        tvc1_0.provider,
        tvc1_0.stream_url,
        tvc1_0.tenant_id,
        tvc1_0.updated_at 
    from
        tenant_voip_configs tvc1_0 
    where
        tvc1_0.tenant_id=? 
        and tvc1_0.provider=? 
        and tvc1_0.is_active=?
2025-10-21T15:34:02.173+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.s.TenantVoipConfigRuntimeService   : ✅ VoIP config found in database (active)
2025-10-21T15:34:02.174+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 📋 VoIP Config loaded for tenant: e7f7179a-5393-4711-adae-083a22cf9e68 - Type: TELNYX_NATIVE_AI, AssistantID: assistant-265ff822-c3e7-43ca-b9f3-02d3ae189e7d
2025-10-21T15:34:02.174+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 🔧 VoIP Config - Type: TELNYX_NATIVE_AI, AssistantID: assistant-265ff822-c3e7-43ca-b9f3-02d3ae189e7d, StreamURL: wss://benedictory-provocative-lauralee.ngrok-free.dev/stream, Source: DATABASE
2025-10-21T15:34:02.174+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 🤖 Starting Telnyx Native AI Assistant with Connect: assistant-265ff822-c3e7-43ca-b9f3-02d3ae189e7d
2025-10-21T15:34:02.174+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 📞 StatusCallback configured: https://benedictory-provocative-lauralee.ngrok-free.dev/api/voip/telnyx/status-callback
2025-10-21T15:34:02.174+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.controller.TelnyxTeXMLController   : 📄 TeXML Response:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!-- Telnyx AI Assistant - Full Conversation Mode -->
  <Connect statusCallback="https://benedictory-provocative-lauralee.ngrok-free.dev/api/voip/telnyx/status-callback" statusCallbackEvent="initiated ringing answered completed">
    <AIAssistant id="assistant-265ff822-c3e7-43ca-b9f3-02d3ae189e7d"/>
  </Connect>
</Response>
2025-10-21T15:34:02.179+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.s.security.TenantIdentifierFilter    : 🧹 TenantIdentifierFilter: Cleared TenantContext after request
2025-10-21T15:34:02.179+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-1] c.s.v.filter.TelnyxTenantResolverFilter  : 🧹 TelnyxTenantResolverFilter: Cleared TenantContext
2025-10-21T15:34:13.333+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.filter.TelnyxTenantResolverFilter  : 🎯 TelnyxTenantResolverFilter: Intercepting webhook: /api/voip/telnyx/ai/conversation-event
2025-10-21T15:34:13.335+01:00  INFO 81523 --- [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-21T15:34:13.339+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:13.340+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:13.341+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T15:34:13.346+01:00  INFO 81523 --- [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-21T15:34:13.347+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:13.348+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:13.348+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T15:34:13.350+01:00  INFO 81523 --- [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-21T15:34:13.351+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.security.web.FilterChainProxy        : Securing POST /api/voip/telnyx/ai/conversation-event
2025-10-21T15:34:13.351+01:00 DEBUG 81523 --- [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-21T15:34:13.352+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-21T15:34:13.352+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-2] o.s.security.web.FilterChainProxy        : Secured POST /api/voip/telnyx/ai/conversation-event
2025-10-21T15:34:13.353+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T15:34:13.354+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TelnyxEventController   : === TELNYX AI CONVERSATION EVENT ===
2025-10-21T15:34:13.354+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TelnyxEventController   : 📥 Content-Type: application/x-www-form-urlencoded
2025-10-21T15:34:13.354+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.controller.TelnyxEventController   : 📥 All parameters: {AccountSid=24b8c68c-c52a-4dd2-859c-22f1d2e62203, AnsweredTime=2025-10-21T14:34:02.603197Z, CallControlId=v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, CallDuration=11, CallLegId=fcb93412-ae8a-11f0-bea2-02420aef1b1f, CallQualityStats={"inbound":{"jitter_max_variance":"0.00","jitter_packet_count":"0","mos":"4.50","packet_count":"512","skip_packet_count":"20"},"outbound":{"packet_count":"467","skip_packet_count":"0"}}, CallSessionId=fcb92f80-ae8a-11f0-af20-02420aef1b1f, CallSid=v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, CallSidLegacy=v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, CallStatus=completed, CallbackSource=call-progress-events, CallingPartyType=pstn, ConnectionId=2806750933822736154, EndTime=2025-10-21T14:34:13.183185Z, From=+212661979197, FromSipUri=+212661979197@208.69.81.78:5060, HangupCause=normal_clearing, HangupSource=caller, OccurredAt=2025-10-21T14:34:13.183185Z, OrganizationId=24b8c68c-c52a-4dd2-859c-22f1d2e62203, SequenceNumber=0, SipHangupCause=200, StartTime=2025-10-21T14:34:02.603197Z, Timestamp=2025-10-21 14:34:13.404870Z, To=+18066983980, ToSipUri=+18066983980@64.16.250.10:5060, UserId=24b8c68c-c52a-4dd2-859c-22f1d2e62203}
2025-10-21T15:34:13.365+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.s.security.TenantIdentifierFilter    : 🧹 TenantIdentifierFilter: Cleared TenantContext after request
2025-10-21T15:34:13.365+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-2] c.s.v.filter.TelnyxTenantResolverFilter  : 🧹 TelnyxTenantResolverFilter: Cleared TenantContext
2025-10-21T15:34:13.625+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.filter.TelnyxTenantResolverFilter  : 🎯 TelnyxTenantResolverFilter: Intercepting webhook: /api/voip/telnyx/ai/conversation-event
2025-10-21T15:34:13.626+01:00  INFO 81523 --- [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-21T15:34:13.627+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:13.628+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:13.628+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T15:34:13.630+01:00  INFO 81523 --- [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-21T15:34:13.631+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : 🔥 getConnection() CALLED with tenantIdentifier: saas_db
2025-10-21T15:34:13.631+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ⚡ Executing: USE saas_db
2025-10-21T15:34:13.631+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] .s.c.SchemaMultiTenantConnectionProvider : ✅ Successfully switched to database: saas_db
2025-10-21T15:34:13.632+01:00  INFO 81523 --- [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-21T15:34:13.633+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.security.web.FilterChainProxy        : Securing POST /api/voip/telnyx/ai/conversation-event
2025-10-21T15:34:13.633+01:00 DEBUG 81523 --- [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-21T15:34:13.633+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.s.w.a.AnonymousAuthenticationFilter  : Set SecurityContextHolder to anonymous SecurityContext
2025-10-21T15:34:13.634+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-3] o.s.security.web.FilterChainProxy        : Secured POST /api/voip/telnyx/ai/conversation-event
2025-10-21T15:34:13.634+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.core.TenantIdentifierResolverImpl  : 🔍 resolveCurrentTenantIdentifier() CALLED - returning: saas_db
2025-10-21T15:34:13.634+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : === TELNYX AI CONVERSATION EVENT ===
2025-10-21T15:34:13.634+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : 📥 Content-Type: application/x-www-form-urlencoded
2025-10-21T15:34:13.634+01:00  INFO 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.controller.TelnyxEventController   : 📥 All parameters: {AccountSid=24b8c68c-c52a-4dd2-859c-22f1d2e62203, BilledDurationSeconds[v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw]=60, CallCost[v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw]=0.0055, CallSid=v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, CallSidLegacy=v3:_CZ1yMfu_J1fKTYBqSf6y7YciHiXRjXsrHkmy8isdJA71hGKLApadw, CallbackSource=call-cost-events, CallerId=+212661979197, CallingPartyType=pstn, ConnectionId=2806750933822736154, From=+212661979197, FromSipUri=+212661979197@208.69.81.78:5060, To=+18066983980, ToSipUri=+18066983980@64.16.250.10:5060}
2025-10-21T15:34:13.635+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.s.security.TenantIdentifierFilter    : 🧹 TenantIdentifierFilter: Cleared TenantContext after request
2025-10-21T15:34:13.635+01:00 DEBUG 81523 --- [saas-multitenant-api] [nio-7001-exec-3] c.s.v.filter.TelnyxTenantResolverFilter  : 🧹 TelnyxTenantResolverFilter: Cleared TenantContext
