INFO conversation CALL_START|call__1765310...
# ask-ai
m
INFO conversation CALL_START|call__1765310266_18880_6a2b5335||{"first_name": "", "last_name": "", "lead_id": "", "gmt_offset": "", "campaign_id": "", "customer_number": ""} {"pid": 18880, "job_id": "AJ_4UHaFgTLxeBg", "room_id": "RM_dzvbMKKCtNPa"} not taking leadid leadinfo while calling and disconnecting after 15 sec
t
Thanks for reaching out, Rithwikreddy. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're reporting that CALL_START logs show empty lead fields and calls drop after ~15s. I'll help troubleshoot both. Quick checklist and actions to try now 1. Confirm lead metadata is being sent with the job ◦ When you dispatch the agent, include lead fields in the job metadata (JSON). Example keys:
lead_id
,
first_name
,
last_name
, etc. ◦ If you control the dispatch code or CLI, verify the
metadata
payload actually contains those fields before the request is sent. 1. Ensure the agent reads metadata on start ◦ In the agent entrypoint, parse the job metadata (for example
json.loads(ctx.job.metadata)
) and map the fields into the CALL_START payload so they appear in logs. 1. Prevent early disconnects (15s) ◦ Check whether silence detection is active. If so, raise the
SILENCE_THRESHOLD
or play an immediate greeting prompt on connect so the session isn’t treated as silent. ◦ Confirm the agent successfully connects and publishes an audio track right after join. If media is not published, the system may treat the call as inactive. ◦ Review disconnect logs for a
STATE_MISMATCH
or timeout reason which indicates media/connection sync problems. Questions to narrow this down • How are you dispatching the job (API code, CLI, or another system)? Share the dispatch snippet that sets
metadata
(redact secrets). • Does your agent entrypoint currently parse
ctx.job.metadata
and forward those fields into the call payload? • Do server logs show a disconnect reason (e.g.,
STATE_MISMATCH
, silence timeout, or ICE failure)? If you send the dispatch metadata snippet and the agent entrypoint code that handles
ctx.job.metadata
, I’ll point out the exact place to fix so lead fields appear and advise the best setting to prevent 15s disconnects. Sources: Job lifecycle | LiveKit docs | Agents telephony integration | LiveKit docs | examples/frontdesk | livekit/livekit_composite | DeepWiki | Understanding the STATE_MISMATCH Disconnect Reason
m
if i didnt add any leadid and first name and all is this the reason that agent doesnt take the user input and disconnecting the call after 15 sce
t
You're right to ask — missing lead fields (like
lead_id
or
first_name
) do not automatically cause the agent to ignore user input or force a 15‑second disconnect. What is likely happening • The 15s disconnect is usually caused by silence detection or the media/connection not being established (no published audio track, ICE/keep‑alive failures, or a configured silence threshold that closes inactive calls). • Lead metadata is optional. If it's empty, the agent may simply have no caller info to log/display, but it should still accept audio and continue the call. What to check now • Confirm the client actually publishes an audio track immediately after join. • Check disconnect logs for a reason (e.g., silence timeout,
STATE_MISMATCH
, ICE failure). • If silence detection is enabled, either increase
SILENCE_THRESHOLD
or play an immediate greeting prompt when the call connects so the session isn't treated as silent. If you want, paste: • the dispatch metadata snippet you send (redact secrets), and • the agent entrypoint code that reads
ctx.job.metadata
and handles publishing audio — and I’ll point out any specific fixes.
m
agent is not taking the user input its speaking by it self and disconnecting due to no response how to check that agent is replying to user or not in terminal quick
t
You're asking for a quick terminal check to confirm whether the agent is receiving user audio and actually replying (vs speaking on its own) before the disconnect. Below are concise, actionable steps to verify that in your terminal. 1) Tail agent logs in real time • Run the agent process logs (or container logs) with: ◦ For systemd: journalctl -fu <agent-service-name> ◦ For Docker: docker logs -f <agent-container> • Watch for lines showing received audio events, transcription, or user intent parsing (keywords like "audio_received", "transcript", "voice_activity", or "user_input"). 2) Enable verbose / debug logging • Start the agent with debug or verbose mode (e.g.,
--log-level=debug
or
LOG_LEVEL=debug
) so message flows and silence detection details appear. • Look for: ◦ Incoming audio frames or VAD events (e.g., "voice activity detected", "audio buffer"). ◦ Transcription or NLU logs (e.g., "transcript: ...", "intent: ..."). ◦ Outgoing agent responses (e.g., "sending_tts", "play_prompt", "publish_audio"). 3) Confirm media publish/subscription events • In logs, check for publish/subscribe events: ◦ "track_published" or "audio_published" (agent published audio) ◦ "track_subscribed" or "audio_subscribed" (agent receiving caller audio) • If you see publish without any "transcript" or "vad" events, the agent speaks but isn't detecting user input. 4) Watch silence-detection and disconnect reasons • Look for messages like "silence_threshold_exceeded", "disconnecting due to silence", or "disconnect reason: STATE_MISMATCH/ICE_FAILURE". • These explain the 15s disconnect if no user speech is detected. 5) Quick terminal test commands (example) • Tail logs and filter useful keywords: ◦ Unix: tail -f /path/to/log | grep --line-buffered -E "transcript|voice_activity|sending_tts|play_prompt|silence|disconnect|track_published|track_subscribed" • This shows user transcripts, VAD, agent TTS, silence, and disconnect lines in one stream. If you paste a short snippet of the recent log output around the call start and disconnect (redact any secrets), I’ll point to the exact lines that show whether user audio was received and whether the agent replied. Would you like that?
m
202228.839 DEBUG livekit.agents input stream detached {"participant": "sip_18052225602", "source": "SOURCE_MICROPHONE", "accepted_sources": ["SOURCE_MICROPHONE"], "pid": 20061, "job_id": "AJ_7SD4SJYWDfnd", "room_id": "RM_fiuY3t3pzhxE"} 202228.922 WARNI… livekit.agents skipping user input, speech scheduling is paused {"user_input": "Yes.", "pid": 20061, "job_id": "AJ_7SD4SJYWDfnd", "room_id": "RM_fiuY3t3pzhxE"} 202228.967 DEBUG livekit.agents received user transcript {"user_transcript": "Yes.", "language": "en-US", "pid": 20061, "job_id": "AJ_7SD4SJYWDfnd", "room_id": "RM_fiuY3t3pzhxE"} 202228.977 WARNI… livekit.agents skipping user input, speech scheduling is paused {"user_input": "Yes.", "pid": 20061, "job_id": "AJ_7SD4SJYWDfnd", "room_id": "RM_fiuY3t3pzhxE"} 202228.982 WARNI… livekit.agents skipping user input, speech scheduling is paused {"user_input": "", "pid": 20061, "job_id": "AJ_7SD4SJYWDfnd", "room_id": "RM_fiuY3t3pzhxE"}
t
You're seeing the right log lines — "speech scheduling is paused" is why the agent logs the user's transcript ("Yes.") but skips handling it and later disconnects. Missing lead metadata is not causing this. What to check and do now • Search your agent logs for where speech scheduling or audio is paused/unpaused. ◦ Look for calls like
set_audio_enabled(False)
or any "pause"/"scheduling paused" messages. • Re-enable speech scheduling / audio: ◦ Ensure your code calls
set_audio_enabled(True)
(or the equivalent resume) after any manual pause. • Confirm session start completed before handling input: ◦ Verify
session.start()
finished without errors and that the agent is not mid-TTS when user speaks. • Watch these log keywords in real time: ◦ grep -E "scheduling paused|set_audio_enabled|sending_tts|play_prompt|received user transcript|track_subscribed|input stream detached|disconnect" ◦ Example: tail -f /path/to/log | grep --line-buffered -E "scheduling paused|set_audio_enabled|sending_tts|received user transcript|input stream detached|disconnect" • Look for exceptions or long-running TTS generation that might block scheduling. If you want, paste the small code snippet where you manage audio/scheduling (or the part around
session.start()
and any
set_audio_enabled
calls) and I’ll point out exactly where to change it. Sources: Text and transcriptions | LiveKit docs | Turn detection and interruptions | LiveKit Docs | Agents and handoffs | LiveKit docs | Job lifecycle | LiveKit docs | Agent speech and audio | LiveKit docs
m
how to check vividial api manager is working or not
t
I can help—quick question first to narrow the steps: how is your Vividial API Manager deployed (on‑prem server, Docker container, Kubernetes, or a hosted service)? Also tell me any of the following you already have: the API base URL, a health endpoint, or access to logs/terminal on the host.
m
on prem server
i have base api url
t
To check the Vividial API Manager on your on‑prem server, run these quick steps — tell me which ones you can run and I’ll help interpret results. 1) Ping the base API URL • curl -I <BASE_API_URL> ◦ Expect HTTP 200 or 2xx. 5xx/4xx indicates the service is reachable but errored or misrouted. 2) Call a health or info endpoint (if available) • curl -sS <BASE_API_URL>/health | jq . • curl -sS <BASE_API_URL>/status or <BASE_API_URL>/api/info ◦ Look for JSON with status = "ok" or similar. 3) Check the service process on the server • Systemd: sudo systemctl status vividial-api-manager • Docker: docker ps | grep vividial && docker logs -f <container> • Kubernetes: kubectl get pods -l app=vividial && kubectl logs -f <pod> 4) Tail Vividial logs for errors • Typical locations: /var/log/vividial/, /opt/vividial/logs/ (adjust to your install) • tail -n 200 /var/log/vividial/*.log | grep -E "ERROR|WARN|Exception" 5) Test an API call that exercises authentication or SIP functions • curl -v -u user:pass <BASE_API_URL>/api/endpoint -d '{"test":true}' -H "Content-Type: application/json" ◦ Confirm auth succeeds and response body is valid. 6) Check network and ports • sudo ss -ltnp | grep :<PORT> • Confirm firewall allows traffic to the API port and SIP/WebRTC ports if relevant. If you share: • the base API URL (or a health endpoint), • whether it runs under systemd, Docker, or other, I’ll give the exact curl commands and the log file paths to check and help interpret the outputs.
m
(venv) root@215-180-106-216:~/realcopy/voiceai_08082025# curl -I "https://default.autodial.tech/vicidial/non_agent_api.php" curl: (6) Could not resolve host: default.autodial.tech
t
The curl error means your server cannot resolve the hostname default.autodial.tech. Let’s quickly check DNS/network and a few fallbacks. Quick checks to run on the on‑prem server 1. Ping the hostname • ping -c 4 default.autodial.tech 1. Check DNS resolution • nslookup default.autodial.tech • dig +short default.autodial.tech 1. Inspect resolver config • cat /etc/resolv.conf 1. Try curl by IP (if you know the IP) • curl -I "https://1.2.3.4/vicidial/non_agent_api.php" (replace 1.2.3.4) 1. Test basic network connectivity • curl -I https://google.com ◦ If this fails, it's a general network/DNS issue. 1. Check for local hosts override • grep default.autodial.tech /etc/hosts || true Share the outputs of steps 1–3 (and 4 if you tried it). I’ll tell you the next action (fix DNS, add host entry, or check firewall).