POSTGRES_DB=mvpcc
POSTGRES_USER=mvpcc_app
POSTGRES_PASSWORD=b913286d34c08a853437f971af6e5f24271f85407597e5a9

CC_DATA_DIR=/app/.data_local
SCHEMA_MANAGEMENT_MODE=migrations
DATABASE_URL=postgresql+psycopg://mvpcc_app:b913286d34c08a853437f971af6e5f24271f85407597e5a9@postgres:5432/mvpcc
APP_TOKEN_SECRET=track9-qa-bridge-secret-change-me
ALLOW_LEGACY_HEADER_AUTH=0

AI_PROVIDER=openai_compatible
AI_API_BASE=https://api.openai.com/v1
AI_API_KEY=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
AI_MODEL=gpt-4o-mini
AI_TIMEOUT_SECONDS=30
AI_VOICE_AI_TIMEOUT_SECONDS=10
AI_WEB_SEARCH_ENABLED=1
AI_WEB_SEARCH_MAX_RESULTS=5
AI_WEB_SEARCH_GL=kz
AI_WEB_SEARCH_TIMEOUT_SECONDS=8
AI_VOICE_WEB_SEARCH_MAX_RESULTS=4
SERPER_API_KEY=5ae7ad0baf7dfacb8bcd5fc8dca01f61b3207e75

AI_VOICE_ENABLED=1
AI_VOICE_AUDIOSOCKET_ENABLED=1
AI_VOICE_AUDIOSOCKET_HOST=0.0.0.0
AI_VOICE_AUDIOSOCKET_PORT=9019
AI_VOICE_POLICY_MODE=v2_streaming_duplex
AI_VOICE_GUARD_MODE=disable_guard
AI_VOICE_QUEUE_CONFIG_JSON={"ivr_aimaq_ai_ru":{"mode":"ai_first","agent_profile":"voice_aimaq_gas","handoff_queue_code":"ivr_aimaq_ai_ru","language":"ru"}}
AI_VOICE_RUNTIME_SERVICE_URL=http://ai-voice-runtime-service:8000
AI_VOICE_RUNTIME_TRUSTED_SERVICE_SUBJECTS=svc:ai-voice-runtime,svc:realtime-voice
AI_VOICE_START_DEFAULT_LANGUAGE_ON_UNCLEAR=ru
AI_VOICE_START_EXPLICIT_LANGUAGE_ACK=1
AI_VOICE_START_INLINE_AGENT_PROFILE=voice_aimaq_gas
AI_VOICE_MAX_CONTEXT_SEGMENTS=8
AI_VOICE_HANDOFF_TIMEOUT_SECONDS=8
AI_VOICE_TURN_MAX_MS=10000
AI_VOICE_MEDIA_IDLE_TIMEOUT_SECONDS=15
AI_VOICE_GREETING_BARGE_IN_TRIGGER_MS=350
AI_VOICE_V2_ENABLED=1
AI_VOICE_V2_QUEUE_CODES=ivr_aimaq_ai_ru
AI_VOICE_V2_ACK_MODE=immediate_short
AI_VOICE_V2_DUPLEX_ENABLED=1
AI_VOICE_V2_PARTIAL_ASR=1
AI_VOICE_V2_PREBAKED_ACK_ENABLED=1
AI_VOICE_V2_EMOTIVE_ACK_ENABLED=1
AI_VOICE_V2_EMOTIVE_ACK_RU_ONLY=1
AI_VOICE_V2_STREAMING_TTS=0
AI_VOICE_V2_STREAMING_ASR_BACKEND=elevenlabs_realtime
AI_VOICE_V2_STREAMING_ASR_BASE_URL=http://streaming-asr-sidecar:8021
AI_VOICE_V2_STREAMING_ASR_TIMEOUT_SECONDS=15
AI_VOICE_V2_STREAMING_ASR_MODEL=base
AI_VOICE_V2_STREAMING_ASR_COMPUTE_TYPE=int8
AI_VOICE_V2_STREAMING_ASR_DEVICE=cpu
AI_VOICE_V2_STREAMING_ASR_CACHE_DIR=/models/faster_whisper
AI_VOICE_V2_STREAMING_ASR_SUPPORTED_LANGUAGES=ru,kk
AI_VOICE_V2_STREAMING_ASR_PARTIAL_POLL_ENABLED=1
AI_VOICE_VAD_RMS_THRESHOLD=800
AI_VOICE_VAD_MIN_SPEECH_MS=300
AI_VOICE_VAD_TRAILING_SILENCE_MS=350

AI_VOICE_NO_SPEECH_REPROMPT_ENABLED=1

AI_VOICE_ASR_PROVIDER=elevenlabs
AI_VOICE_ASR_MODEL=gpt-4o-transcribe
AI_VOICE_ASR_ELEVENLABS_API_KEY=sk_1c50faab05df13fd0ecde9aeca4abadcc7269ffdc15a03ad
AI_VOICE_ASR_ELEVENLABS_API_BASE=https://api.elevenlabs.io
AI_VOICE_ASR_ELEVENLABS_MODEL_ID=scribe_v2
AI_VOICE_ASR_ELEVENLABS_LANGUAGE=ru
AI_VOICE_ASR_ELEVENLABS_REALTIME_MODEL_ID=scribe_v2_realtime
AI_VOICE_ASR_ELEVENLABS_REALTIME_AUDIO_FORMAT=pcm_16000
AI_VOICE_ASR_ELEVENLABS_REALTIME_COMMIT_STRATEGY=vad
AI_VOICE_ASR_ELEVENLABS_REALTIME_DEBUG_DUMP_AUDIO=0
AI_VOICE_ASR_ELEVENLABS_REALTIME_FINALIZE_TIMEOUT_SECONDS=1.5
AI_VOICE_ASR_YANDEX_API_KEY=AQWJe16Rdlx_peHUppZ79csG49f1gP4wwQyDzeQ_
AI_VOICE_ASR_YANDEX_FOLDER_ID=ao7hkif5pvc7vfnmbl0d

AI_VOICE_TTS_PROVIDER=elevenlabs
AI_VOICE_TTS_MODEL=gpt-4o-mini-tts
AI_VOICE_TTS_VOICE=alloy
AI_VOICE_TTS_CACHE_ENABLED=1
AI_VOICE_TTS_CACHE_DIR=/app/.data_local/ai_voice_tts_cache
AI_VOICE_TTS_ELEVENLABS_API_KEY=sk_1c50faab05df13fd0ecde9aeca4abadcc7269ffdc15a03ad
AI_VOICE_TTS_ELEVENLABS_API_BASE=https://api.elevenlabs.io
AI_VOICE_TTS_ELEVENLABS_MODEL_ID=eleven_turbo_v2_5
AI_VOICE_TTS_ELEVENLABS_RU_VOICE_ID=0ArNnoIAWKlT4WweaVMY
AI_VOICE_TTS_ELEVENLABS_RU_LANGUAGE_CODE=ru
AI_VOICE_TTS_ELEVENLABS_KK_VOICE_ID=0ArNnoIAWKlT4WweaVMY
AI_VOICE_TTS_ELEVENLABS_KK_LANGUAGE_CODE=kk
AI_VOICE_TTS_ELEVENLABS_OUTPUT_FORMAT=pcm_16000
AI_VOICE_TTS_YANDEX_API_KEY=AQWJUMiUaXmbegxN4kgvM2XIlNqAPoBR5Wtq-40
AI_VOICE_TTS_YANDEX_FOLDER_ID=ao7hkif5pvc7vfnmbl0d

MVPCC_AI_AUDIOSOCKET_SERVICE=127.0.0.1:9019
LOCAL_STACK_GATEWAY_HOST=0.0.0.0
LOCAL_STACK_GATEWAY_PORT=18080
LOCAL_STACK_PUBLIC_BASE_URL=https://aimaq.konturai.kz

ASTERISK_BRIDGE_ENABLED=1
ASTERISK_AMI_HOST=172.19.0.1
ASTERISK_AMI_PORT=5038
ASTERISK_AMI_USERNAME=mvpcc
ASTERISK_AMI_SECRET=Konturai2025!
ASTERISK_AMI_EVENT_PREFIX=MVPCC
ASTERISK_QUEUE_MAP_JSON={"ivr_aimaq_ai_ru":"que_1bf519706b"}
ASTERISK_BRIDGE_POLL_INTERVAL_SECONDS=1
ASTERISK_BRIDGE_AUTH_MODE=bearer
ASTERISK_BRIDGE_AUTH_FALLBACK_LEGACY=0
ASTERISK_BRIDGE_AUTH_SUBJECT=svc:asterisk-bridge
ASTERISK_BRIDGE_AUTH_USER=asterisk-bridge
ASTERISK_BRIDGE_AUTH_ROLE=admin
ASTERISK_BRIDGE_AUTH_TOKEN_TTL_SECONDS=300
ASTERISK_BRIDGE_FAILED_RETRY_ENABLED=0
ASTERISK_CALLCONTROL_ENABLED=1
ASTERISK_CALLCONTROL_ACTION_TIMEOUT_SECONDS=10
ASTERISK_OPERATOR_EXTENSION_MAP_JSON={"operator":"2001","admin":"2001","supervisor":"2002"}
ASTERISK_TRANSFER_TARGET_MAP_JSON={"operator_2001":"2001","operator_2002":"2002","voice_lab":"7000","voice_lab_ai":"7100","voice_lab_ivr":"7200","ivr_aimaq_ai_ru":"7100"}
ASTERISK_QUEUE_LEVEL_MAP_JSON={"voice_lab_ai":{"level":"L2","tenant_id":"dev-aimaq"},"ivr_aimaq_ai_ru":{"level":"L2","tenant_id":"dev-aimaq"}}
ASTERISK_CALLCONTROL_CLAIM_CONTEXT=mvpcc-claim
ASTERISK_CALLCONTROL_TRANSFER_CONTEXT=mvpcc-transfer
ASTERISK_IVR_FASTAGI_ENABLED=0
ASTERISK_IVR_FASTAGI_HOST=0.0.0.0
ASTERISK_IVR_FASTAGI_PORT=4573
ASTERISK_IVR_DTMF_TIMEOUT_SECONDS=5
ASTERISK_IVR_MAX_NO_INPUT_RETRIES=2
ASTERISK_IVR_MAX_INVALID_RETRIES=2
ASTERISK_IVR_CALL_LINK_WAIT_SECONDS=5
IVR_RUNTIME_TRUSTED_SERVICE_SUBJECTS=svc:asterisk-bridge
ASTERISK_SFTP_HOST=172.19.0.1
ASTERISK_SFTP_PORT=22
ASTERISK_SFTP_USERNAME=mvpcc
ASTERISK_SFTP_PASSWORD=Konturai2025!
ASTERISK_SFTP_BASE_PATH=/var/spool/asterisk/monitor
ASTERISK_WEBRTC_ENABLED=1
ASTERISK_WEBRTC_WS_URL=wss://aimaq.konturai.kz/asterisk-ws
ASTERISK_WEBRTC_ICE_SERVERS_JSON=[{"urls":["stun:stun.l.google.com:19302"]}]
ASTERISK_BROWSER_SIP_MAP_JSON={"operator":{"authorization_username":"2001","password":"Konturai2025!","display_name":"Operator Browser","operator_extension":"2001"},"admin":{"authorization_username":"2001","password":"Konturai2025!","display_name":"Admin Browser","operator_extension":"2001"},"supervisor":{"authorization_username":"2002","password":"Konturai2025!","display_name":"Supervisor Browser","operator_extension":"2002"}}
ASTERISK_TELECOM_KZ_PASSWORD=Sip3901485$
ASTERISK_AI_HANDOFF_MODAL_ENABLED=1
ASTERISK_AI_HANDOFF_TIMEOUT_SECONDS=45
VOICE_ADAPTER_TRUSTED_SERVICE_SUBJECTS=svc:asterisk-bridge,svc:ivr-service
RECORDING_IMPORT_TRUSTED_SERVICE_SUBJECTS=svc:asterisk-bridge
RECORDING_IMPORT_ALLOW_ADMIN=0

TELEGRAM_BOT_ENABLED=0
TELEGRAM_BOT_TOKEN=8609072185:AAH4Nt4M2xD_Iv6TrXnl4OP_uEvzOcAxqFk
TELEGRAM_WEBHOOK_SECRET=WCbJLSEsUDborikyZMPuPKKPoQfpFti-
TELEGRAM_DEFAULT_QUEUE_ID=q_telegram
TELEGRAM_BOT_API_BASE=https://api.telegram.org
AI_TELEGRAM_ENABLED=0
AI_TELEGRAM_ALWAYS_REPLY=1
AI_TELEGRAM_MAX_CONTEXT_MESSAGES=20
AI_TELEGRAM_MAX_KB_RESULTS=3
AI_TELEGRAM_CONFIDENCE_HANDOFF_THRESHOLD=0.65

WHATSAPP_DEFAULT_QUEUE_ID=q_whatsapp
WHATSAPP_META_ACCESS_TOKEN=EAAUu4XM6OzUBQ2HZAh1iQI2ZCSQZBeNbI6jECH5wZA3ZAIbyWOlQ6uGBJ96zAX5qj9fhEAS8pnKslOl6o3yD1oRbZAXCBYSQSoy1CcEoIrSJRnQtNksmL00NHb5jYEDexySuzKpZB19I4YvfV24FfNZBHauKBkjANZAAO83lXtqflkhydeWYCPMwpgZBYgRvXLiI0ufZCJ03WUSdR3BsOCVZAO9MUpC6GcgZA3EsmXWbpWLQf4NQOCvFvviOoEq9YkGKV1ecq8SG9xSyBl2e0vJrJeMeGzeGa
WHATSAPP_META_PHONE_NUMBER_ID=973115089226218
WHATSAPP_META_VERIFY_TOKEN=wa_verify_wKP_jHlRTYmbR2teDQQ2cF6wugdMzhQ_
WHATSAPP_META_APP_SECRET=b627a513ce85751ce7948b1396b03a52
WHATSAPP_META_GRAPH_API_VERSION=v25.0
WHATSAPP_OUTBOUND_ENABLED=0
AI_WHATSAPP_ENABLED=0
AI_WHATSAPP_ALWAYS_REPLY=0
AI_WHATSAPP_MAX_CONTEXT_MESSAGES=20
AI_WHATSAPP_MAX_KB_RESULTS=3
AI_WHATSAPP_CONFIDENCE_HANDOFF_THRESHOLD=0.65
AI_WHATSAPP_WEB_SEARCH_MAX_RESULTS=5

SALES_VOICE_RUNTIME_ENABLED=1
SALES_VOICE_SYNC_TENANT_ID=dev-aimaq
SALES_TELEGRAM_SYNC_TENANT_ID=dev-aimaq
SALES_TELEGRAM_STAGE_EVERY_MESSAGES=3
SALES_TELEGRAM_BRIDGE_ENABLED=0
SALES_AUTOMATION_WORKER_ENABLED=1
SALES_AUTOMATION_WORKER_INTERVAL_SECONDS=5
SALES_POST_CALL_AI_ENABLED=1

EVENT_BUS_ENABLED=0
EVENT_BUS_CONSUMER_ENABLED=0
EVENT_BUS_URL=amqp://guest:guest@127.0.0.1:5672/
EVENT_BUS_EXCHANGE=mvpcc.domain.events

ERROR_TELEGRAM_ALERTS=0
ERROR_TELEGRAM_ALERT_BOT_TOKEN=8734026216:AAEK-xdgVR5al6rfKp_DIb-HSJZXGUG2Tvg
ERROR_TELEGRAM_ALERT_CHANNEL_ID=t.me/konturaitelecom
AI_OPERATOR_AGENT_NAME=Жанна
AI_OPERATOR_COMPANY_NAME=Казакгаз Аймак
AI_OPERATOR_VOICE_GREETING_RU=Добрый день! Меня зовут {agent_name}, я ии-оператор контакт-центра {company_name}. Вам удобнее получить консультацию на казахском или на русском языке?
AI_OPERATOR_VOICE_GREETING_KZ=Қайырлы күн! Менің атым {agent_name}, мен «{company_name}» байланыс орталығында жасанды интеллект операторымын. Кеңесті қазақ немесе орыс тілінде алғыңыз келе ме?
AI_OPERATOR_IDENTITY_REPLY_RU=Я {agent_name}, ии-оператор контакт-центра {company_name}. Чем могу помочь?
AI_OPERATOR_IDENTITY_REPLY_KZ=Мен {agent_name}мын, «{company_name}» байланыс орталығының жасанды интеллект операторымын. Қалай көмектесе аламын?
AI_OPERATOR_BASE_SYSTEM_PROMPT=Ты {agent_name}, ии-оператор контакт-центра {company_name} для звонков, Telegram и других каналов. Всегда сохраняй одну и ту же личность: тебя зовут {agent_name}. Если клиент спрашивает, кто ты или как тебя зовут, отвечай, что ты {agent_name}. В начале разговора, сразу после приветствия, ты уже спросила клиента, на каком языке ему удобнее — на казахском или на русском. Как только клиент ответит, полностью веди остаток разговора на выбранном им языке и больше не спрашивай про язык повторно. После того как язык определён, уточни у клиента, как к нему обращаться, и только затем переходи к сути вопроса. Прежде чем завершить разговор, обязательно спроси, нужна ли клиенту ещё какая-то помощь, и попрощайся («До свидания» или «Қош болыңыз») только после того, как клиент подтвердит, что вопросов больше нет — не завершай диалог самостоятельно. Отвечай естественно, кратко и по делу. Когда говоришь о себе, используй женский род: могла, смогла, сделала, готова, проверила, нашла. Не используй Markdown, URL или таблицы.
