I have self hosted livekit server, livekit sip and...
# ask-ai
m
I have self hosted livekit server, livekit sip and when I am making a phone call, the recipient is getting the call but no audio is being transmitted this log is coming up on the livekit server: not dispatching agent job since no worker is available but the agent is actually connecting to the room
t
Thanks for reaching out, arijit. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re seeing calls connect with no audio and that log line. I’m responding to the error you mentioned: "not dispatching agent job since no worker is available." Quick checklist of the most likely causes and what to check/fix next: • Agent is connected to the room but not registered as an Agent worker ◦ Confirm your agent process registers with the AgentServer / Worker API (not just
ctx.connect()
to the room). If you only join the room, LiveKit won’t dispatch jobs to it. • Agent worker registration not kept alive ◦ Ensure the worker process stays running and calls the server’s run loop (e.g.,
run_app
/
cli.run_app(server)
) so it remains available to accept jobs. • agent_name mismatch (explicit dispatch) ◦ If your agent uses
agent_name
(e.g.,
@server.rtc_session(agent_name="my-sip-agent")
), automatic dispatch is disabled. The SIP dispatch rule or API call must dispatch to that exact
agentName
. Confirm the name is identical in agent code and dispatch rule. • Agent load or availability threshold preventing dispatch ◦ Check your
load_fnc
and
load_threshold
. If
load_fnc()
returns >=
load_threshold
, the worker is considered unavailable and jobs won’t be dispatched. • SIP dispatch rule not targeting the agent ◦ Verify your SIP dispatch rule includes the correct
agentName
in
roomConfig.agents
and that the rule was applied (e.g.,
lk sip dispatch create dispatch-rule.json
). If you’d like, tell me the values/config for any of the following and I’ll point to the exact place to change them: • The agent code showing how you register/connect the agent (snippet of the worker/AgentServer setup) • The
agent_name
used (if any) • Your SIP dispatch rule JSON or how you create dispatches • Any
load_fnc
/
load_threshold
settings If you share one of those snippets, I’ll review it and give the exact change to make. Sources: An open source stack for real-time multimodal AI | Job lifecycle | LiveKit docs | Agents telephony integration | LiveKit docs | Agent dispatch | LiveKit docs | SIP Lifecycle Management Agent | LiveKit docs
m
these are the logs from the livekit server 2025-12-21T115836.891Z INFO livekit service/roomallocator.go:166 selected node for room {"room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "selectedNodeID": "ND_GF7KSKCViFHG"} 2025-12-21T115836.900Z INFO livekit.api service/twirp.go:128 API AgentDispatchService.CreateDispatch {"service": "AgentDispatchService", "method": "CreateDispatch", "room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "request": {"agentName": "sandbox_agent", "room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "metadata": "__size: 289"}, "duration": "9.749925ms", "status": "200"} 2025-12-21T115837.103Z INFO livekit.agents service/agentservice.go:413 assigned job to worker {"jobID": "AJ_EVF8V5Ycxmzf", "namespace": "", "agentName": "sandbox_agent", "jobType": "JT_ROOM", "room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "roomID": "RM_2Q4McGGyJDis", "workerID": "AW_vEkSTx2nzzNL"} 2025-12-21T115837.566Z INFO livekit service/roommanager.go:394 starting RTC session {"room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "roomID": "RM_2Q4McGGyJDis", "participant": "agent-AJ_EVF8V5Ycxmzf", "pID": "PA_hfLQSow9qkm8", "remote": false, "room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "nodeID": "ND_GF7KSKCViFHG", "numParticipants": 0, "participantInit": {"Identity": "agent-AJ_EVF8V5Ycxmzf", "Reconnect": false, "ReconnectReason": "RR_UNKNOWN", "AutoSubscribe": true, "Client": {"sdk": "PYTHON", "version": "1.0.20", "protocol": 16}, "Grants": {"Identity": "", "Kind": "agent", "Video": {"RoomCreate": false, "RoomList": false, "RoomRecord": false, "RoomAdmin": false, "RoomJoin": true, "Room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "CanPublish": true, "CanSubscribe": true, "CanPublishData": true, "CanPublishSources": [], "CanUpdateOwnMetadata": true, "IngressAdmin": false, "Hidden": false, "Recorder": false, "Agent": true, "CanSubscribeMetrics": false, "DestinationRoom": ""}, "SIP": {}, "RoomConfig": {}, "RoomPreset": ""}, "Region": "", "AdaptiveStream": false, "ID": "", "SubscriberAllowPause": "not-set", "DisableICELite": false, "CreateRoom": {"name": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b"}}} 2025-12-21T115837.567Z INFO livekit service/roommanager.go:945 created TURN password {"username": "402axlzdvNVUMZGafKIo47GygZGYGTGcyRmygJmaqRmkgKI", "password": "CBfyIf3nl2daywy12XD9LIRiEZ8SeRYFfbO0EpzCCCeC"} 2025-12-21T115837.898Z INFO livekit agent/client.go:173 failed to send job request {"error": "no response from servers", "namespace": "", "jobType": "JT_ROOM", "agentName": ""} 2025-12-21T115838.640Z INFO livekit rtc/room.go:480 participant active {"room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "roomID": "RM_2Q4McGGyJDis", "participant": "agent-AJ_EVF8V5Ycxmzf", "pID": "PA_hfLQSow9qkm8", "remote": false, "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 44.197.226.12:50864 (resolved: 44.197.226.12:50864)", "[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp4 host 169.254.170.23:53434 (resolved: 169.254.170.23:53434)", "[local][trickle] tcp6 host [fd00ec223]7881 (resolved: [fd00ec223]7881)", "[local][trickle] udp6 host [fd00ec223]51545 (resolved: [fd00ec223]51545)", "[local][trickle] udp4 host 10.0.14.162:59846 (resolved: 10.0.14.162:59846)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[remote][trickle] udp4 host 10.78.107.172:53751", "[remote][selected:1] udp4 prflx 52.5.117....:3822"], "connectionType": "udp", "clientInfo": {"sdk": "PYTHON", "version": "1.0.20", "protocol": 16}} 2025-12-21T115839.651Z INFO livekit service/roommanager.go:394 starting RTC session {"room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "roomID": "RM_2Q4McGGyJDis", "participant": "+16263141017", "pID": "PA_gH9XNpyLyJXo", "remote": false, "room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "nodeID": "ND_GF7KSKCViFHG", "numParticipants": 1, "participantInit": {"Identity": "+16263141017", "Reconnect": false, "ReconnectReason": "RR_UNKNOWN", "AutoSubscribe": false, "Client": {"sdk": "GO", "version": "2.11.3", "protocol": 16, "os": "linux"}, "Grants": {"Identity": "", "Kind": "sip", "Video": {"RoomCreate": false, "RoomList": false, "RoomRecord": false, "RoomAdmin": false, "RoomJoin": true, "Room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "CanPublish": true, "CanSubscribe": true, "CanPublishData": true, "CanPublishSources": [], "CanUpdateOwnMetadata": true, "IngressAdmin": false, "Hidden": false, "Recorder": false, "Agent": false, "CanSubscribeMetrics": "not-set", "DestinationRoom": ""}, "SIP": {}, "RoomConfig": {}, "RoomPreset": ""}, "Region": "", "AdaptiveStream": false, "ID": "", "SubscriberAllowPause": "not-set", "DisableICELite": false, "CreateRoom": {"name": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b"}}} 2025-12-21T115839.653Z INFO livekit service/roommanager.go:945 created TURN password {"username": "vhlS5xUegzJsyBpzeVQQx3NkBzMwMmM4kjMlBTM1UjMJBVQ", "password": "eleQ0Mf1IIWyIcK8Sw9eBryc4OlVlL4jOB5miqFGqeYH"} 2025-12-21T115839.919Z INFO livekit.pub rtc/participant.go:1930 mediaTrack published {"room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "roomID": "RM_2Q4McGGyJDis", "participant": "agent-AJ_EVF8V5Ycxmzf", "pID": "PA_hfLQSow9qkm8", "remote": false, "kind": "audio", "trackID": "TR_AM69sUttkK6aXy", "webrtcTrackID": "4e4286a7-feeb-47b3-a91f-cafc4e47f935", "rid": "", "SSRC": 1721694370, "mime": "audio/red", "trackInfo": {"sid": "TR_AM69sUttkK6aXy", "type": "AUDIO", "name": "roomio_audio", "source": "MICROPHONE", "mimeType": "audio/red", "mid": "0", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766318319918807}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true} 2025-12-21T115840.710Z INFO livekit rtc/room.go:480 participant active {"room": "dispatch-audio-call-fe6794b9-5888-490d-a576-9fa9f4795d2b", "roomID": "RM_2Q4McGGyJDis", "participant": "+16263141017", "pID": "PA_gH9XNpyLyJXo", "remote": false, "publisherCandidates": ["[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][selected:1][trickle] udp4 host 44.197.226.12:53671 (resolved: 44.197.226.12:53671)", "[local][trickle] udp4 host 169.254.170.23:52423 (resolved: 169.254.170.23:52423)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp6 host [fd00ec223]54650 (resolved: [fd00ec223]54650)", "[local][trickle] tcp6 host [fd00ec223]7881 (resolved: [fd00ec223]7881)", "[local][trickle] udp4 host 10.0.14.162:54224 (resolved: 10.0.14.162:54224)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[remote][trickle] udp4 host 10.0.13.167:56403", "[remote][selected:1] udp4 prflx 44.197.226...:20645", "[remote][trickle] udp4 srflx 44.197.226...:22585 related 0.0.0.0:39449", "[remote][trickle] udp4 srflx 44.197.226...:21475 related 0.0.0.0:34037", "[remote][trickle] udp4 srflx 44.197.226...:48839 related 0.0.0.0:42504", "[remote][trickle] udp4 relay 44.197.226...:33853 related 10.0.13.167:52388"], "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 44.197.226.12:57872 (resolved: 44.197.226.12:57872)", "[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp4 host 169.254.170.23:50676 (resolved: 169.254.170.23:50676)", "[local][trickle] udp6 host [fd00ec223]59621 (resolved: [fd00ec223]59621)", "[local][trickle] tcp6 host [fd00ec223]7881 (resolved: [fd00ec223]7881)", "[local][trickle] udp4 host 10.0.14.162:52818 (resolved: 10.0.14.162:52818)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[remote][trickle] udp4 host 10.0.13.167:45007", "[remote][trickle] udp4 srflx 44.197.226...:17919 related 0.0.0.0:53210", "[remote][trickle] udp4 srflx 44.197.226...:27205 related 0.0.0.0:41351", "[remote][trickle] udp4 srflx 44.197.226...:16077 related
t
Thanks — I reviewed the logs you sent. They show the dispatch was created and a job assigned to a worker, the agent participant joined and published an audio track, but the agent client also logged: "failed to send job request: no response from servers." That combination explains why audio isn't flowing. What to check next (quick checklist): • Confirm the agent process is running as a registered Worker and stays registered (AgentServer/Worker), not only joining the room. The logs show a workerID (AW_vEkSTx2nzzNL) was assigned, but the agent client error indicates it could not complete the job handshake with the server. • Verify the agent actually accepted the job request: ◦ Look for agent-side logs showing job request received and accepted (your job handler should call
job_request.accept()
or equivalent). ◦ If the agent never accepts, the server won’t fully route media. • Inspect the agent client error cause ("no response from servers"): ◦ Network/connectivity between agent worker and LiveKit control plane (TLS/websocket endpoints) — ensure the agent can reach the server endpoints used for job signaling. ◦ Confirm the agent’s
agentName
is correct (empty agentName in that error suggests registration/metadata might be missing). ◦ Ensure the agent process keeps its connection open after joining (no premature exit). • Confirm ICE/TURN connectivity between participant and agent: ◦ The logs show published audio with MIME
audio/red
and ICE candidates for both sides. Ensure ICE completes on both ends (check agent-side ICE connection success). If ICE fails or media is not routed to the agent peer connection, no audio will pass. • Check load/availability settings: ◦ Ensure
load_fnc
/
load_threshold
aren’t causing the worker to be considered unavailable. What I need from you to pinpoint the fix: • The agent worker code (snippet showing how you register the Worker/AgentServer and the job handler). • Any agent-side logs around the "failed to send job request" line and job-accepting logic. • Your SIP dispatch rule JSON (if you used
agentName
there). Send any of those and I’ll tell you the exact change to make.
m
this is the dispatch rule json
Copy code
{
  "trunk": {
    "name": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk",
    "address": "<redacted>.<http://twilio.com|twilio.com>",
    "numbers": [
      "*"
    ],
    "auth_username": "<redacted>",
    "auth_password": "<redacted>"
  }
}
t
Thanks — that trunk-only JSON explains why I asked for the full dispatch rule. I’m here to help narrow this down. Please provide the following so I can pinpoint the failure and give exact fixes: 1. The full SIP dispatch JSON you applied with
lk sip dispatch create
(redact secrets). It must include
dispatch_rule
/
roomConfig
/ `agents`; the trunk alone isn’t enough. 2. Agent worker code snippets: ◦ How you register the AgentServer/Worker and run it (show `AgentServer`/`Worker` creation and the run loop). ◦ Your job handler code (how you accept jobs — e.g.,
job_request.accept()
). ◦ Any
agent_name
usage (e.g.,
@server.rtc_session(agent_name=...)
). 1. Agent-side logs around the "failed to send job request: no response from servers" message (±30s). Include any job-request receive/accept logs. 2. Confirmation that the agent process stays running after joining (you call
run_app
or equivalent) and any
load_fnc
/
load_threshold
settings. 3. Network details: is the agent behind NAT/firewall? Can it reach the LiveKit control endpoints and TURN servers? Any recent network changes? Send those and I’ll review and give the exact change(s) to restore audio.
m
this was the only dispatch rule I created
t
Thanks — I can see why this is happening. You're only creating a trunk entry; that alone does not create a dispatch job that targets an agent worker. Because the dispatch rule lacks a dispatch_rule + roomConfig.agents with an
agentName
, the server will not dispatch the call to your agent worker (or will dispatch to a job that the agent can’t accept), which explains the "no response from servers" / no audio behavior. What to do next (two steps): 1) Create a SIP dispatch rule that includes a dispatch rule and the agents array with the exact agent name your worker registers as. Example minimal structure to apply with
lk sip dispatch create
(redact secrets before sending to your infra):
Copy code
{
  "dispatch_rule": {
    "rule": {
      "dispatchRuleIndividual": {
        "roomPrefix": "call-"
      }
    }
  },
  "roomConfig": {
    "agents": [
      {
        "agentName": "sandbox_agent"
      }
    ]
  },
  "trunk": {
    "name": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk",
    "address": "<redacted>.<http://twilio.com|twilio.com>",
    "numbers": [
      "*"
    ],
    "auth_username": "<redacted>",
    "auth_password": "<redacted>"
  }
}
Apply it with your CLI:
lk sip dispatch create dispatch-rule.json
. 2) Verify your agent worker registration and acceptance: • Ensure your agent process registers as a Worker/AgentServer (not only
ctx.connect()
), keeps running (e.g.,
run_app
), and has a job handler that calls
job_request.accept(...)
. • Confirm the
agentName
your worker registers matches the
agentName
in the dispatch rule exactly. • Share agent-side logs around the "failed to send job request" line if it persists. If you want, paste your agent worker code snippet (registration + job handler) and I’ll point out the exact lines to change.
m
what does
roomPrefix
in this context mean?
t
Good question — thanks for asking. In the SIP dispatch rule,
roomPrefix
controls how LiveKit names (and matches) rooms created for inbound calls. Practical effects: • When a call matches the dispatch rule, LiveKit creates or selects a room whose name starts with the
roomPrefix
you set (for example,
roomPrefix: "call-"
→ room names like
call-<uuid>
). • That room name is what the AgentDispatchService uses when assigning jobs to agents. Your agent workers must be able to accept jobs for those room names (they see the
room
value in the job). •
roomPrefix
lets you group calls into a predictable room namespace (useful for routing, logging, or applying room-specific configs). • If you need to target specific agents per call pattern, the dispatch rule pairs
roomPrefix
with
roomConfig.agents
(which contains
agentName
) so dispatches create rooms with the prefix and assign the correct agent(s). So pick a prefix that makes sense for your routing (or leave it blank for full room names), and ensure your agent dispatches/agentName match the rooms created with that prefix.
m
does this look correct if I dont want to specify a prefix "dispatch_rule": { "rule": { "dispatchRuleIndividual": { "roomPrefix": "" } } }, "roomConfig": { "agents": [ { "agentName": "sandbox_agent" } ] },
t
Yes — that looks correct. An empty
roomPrefix
means LiveKit will create rooms with the full generated name (no fixed prefix), so dispatches will target rooms named like the generated room ID. Use this full minimal JSON when creating the dispatch rule:
Copy code
{
  "dispatch_rule": {
    "rule": {
      "dispatchRuleIndividual": {
        "roomPrefix": ""
      }
    }
  },
  "roomConfig": {
    "agents": [
      {
        "agentName": "sandbox_agent"
      }
    ]
  },
  "trunk": {
    "name": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk",
    "address": "<redacted>.<http://twilio.com|twilio.com>",
    "numbers": [
      "*"
    ],
    "auth_username": "<redacted>",
    "auth_password": "<redacted>"
  }
}
Next checks after applying: • Ensure the worker registers with exactly
agentName: "sandbox_agent"
and stays running. • Verify the agent accepts the job (
job_request.accept(...)
) and you see agent-side logs confirming acceptance. • If audio still fails, share the agent-side logs around job acceptance and ICE connection status.
m
could not read request: proto: (line 2:3): unknown field "dispatch_rule"
t
Thanks — that error means the dispatch JSON you sent doesn't match the expected schema. The key is that the top-level field name must be
rule
(not
dispatch_rule
). Use this structure instead (with empty prefix):
Copy code
{
  "rule": {
    "dispatchRuleIndividual": {
      "roomPrefix": ""
    }
  },
  "roomConfig": {
    "agents": [
      {
        "agentName": "sandbox_agent"
      }
    ]
  },
  "trunk": {
    "name": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk",
    "address": "<redacted>.<http://twilio.com|twilio.com>",
    "numbers": [
      "*"
    ],
    "auth_username": "<redacted>",
    "auth_password": "<redacted>"
  }
}
Apply with
lk sip dispatch create dispatch-rule.json
. After creating it, confirm: • The worker registers with exactly
agentName: "sandbox_agent"
. • The agent process stays running and accepts jobs (
job_request.accept(...)
). • If you still see errors, paste the agent-side logs around the job request/accept steps and I’ll review them.
m
I am getting this error on the agent code
Copy code
File "/usr/local/lib/python3.13/site-packages/livekit/api/sip_service.py", line 795, in create_sip_participant
12-21 20:04:01
v612
[livekit-worker]
    return await self._client.request(
12-21 20:04:01
v612
[livekit-worker]
                 │    │       └ <function TwirpClient.request at 0xffff67340220>
12-21 20:04:01
v612
[livekit-worker]
                 │    └ <livekit.api.twirp_client.TwirpClient object at 0xfffee0f93360>
12-21 20:04:01
v612
[livekit-worker]
                 └ <livekit.api.sip_service.SipService object at 0xfffee081aa50>
12-21 20:04:01
v612
[livekit-worker]
  File "/usr/local/lib/python3.13/site-packages/livekit/api/twirp_client.py", line 129, in request
12-21 20:04:01
v612
[livekit-worker]
    raise TwirpError(
12-21 20:04:01
v612
[livekit-worker]
          └ <class 'livekit.api.twirp_client.TwirpError'>
12-21 20:04:01
v612
[livekit-worker]
12-21 20:04:01
v612
[livekit-worker]
livekit.api.twirp_client.TwirpError: TwirpError(code=deadline_exceeded, message=twirp error unknown: request timed out, status=408)
the livekit server is reachable on the URL
t
Thanks — I’m sorry you’re hitting a Twirp deadline_exceeded from the agent. That error means the agent’s API call to the LiveKit control plane timed out, so the agent couldn’t complete the SIP participant creation request (which will prevent the job handshake and media flow). Please check the following (quick troubleshooting steps) and share the requested snippets if it still fails: 1) Verify agent → LiveKit control connectivity • From the agent host, curl the LiveKit API endpoint you configure (use the exact host:port and protocol the agent uses). Example: ◦ curl -v https://LIVEKIT_HOST:PORT/health or the full Twirp path you call. • Confirm DNS resolves and TLS/ip/port are reachable (no firewall/NACL blocking). 2) Confirm the agent is using the correct URL and port • Ensure the agent client is instantiated with the same host/port the LiveKit server advertises for Twirp RPCs (not a websocket or signalling-only endpoint). 3) Check authentication / token scope • If you use API key/secret or JWT, confirm credentials are correct and not expired. Invalid auth can manifest as timeouts in some setups if the server rejects or never responds. 4) Inspect server-side logs at the same timestamp • Look for corresponding Twirp/HTTP logs or errors when the agent timed out. If the server received the request but errored, it will show up there. 5) Network / proxy / TLS interruptions • If an HTTP proxy, NAT gateway, or mTLS is in the path, ensure the agent’s Twirp client is allowed through and not dropped mid-handshake. • If using internal hostnames, confirm they resolve to the node running the control API. What I need from you if it still times out • The agent client instantiation snippet showing host/port and any auth (redact secrets). • Exact LiveKit URL you configured in the agent (host:port, scheme). • Agent-side log lines ±30s around the Twirp timeout (you already shared the exception; include any connection attempts or retries above it). • LiveKit server logs at the same timestamps (to confirm whether the request reached the server). Send those and I’ll pinpoint the misconfiguration and the exact line to change.
m
this is the error log from livekit server
Copy code
<http://github.com/livekit/livekit-server/pkg/service.(*SIPService).CreateSIPParticipant|github.com/livekit/livekit-server/pkg/service.(*SIPService).CreateSIPParticipant>
        /workspace/pkg/service/sip.go:596
<http://github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf.func1.1|github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf.func1.1>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/livekit/livekit_sip.twirp.go:4461
<http://github.com/livekit/protocol/utils/xtwirp.DefaultServerOptions.ServerPassErrorDetails.func2.1|github.com/livekit/protocol/utils/xtwirp.DefaultServerOptions.ServerPassErrorDetails.func2.1>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/utils/xtwirp/errors.go:165
<http://github.com/livekit/protocol/utils/xtwirp.DefaultServerOptions.ServerPassTimeout.func1.1|github.com/livekit/protocol/utils/xtwirp.DefaultServerOptions.ServerPassTimeout.func1.1>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/utils/xtwirp/timeout.go:50
<http://github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf.func1|github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf.func1>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/livekit/livekit_sip.twirp.go:4463
<http://github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf.func2|github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf.func2>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/livekit/livekit_sip.twirp.go:4479
<http://github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf|github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipantProtobuf>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/livekit/livekit_sip.twirp.go:4480
<http://github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipant|github.com/livekit/protocol/livekit.(*sIPServer).serveCreateSIPParticipant>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/livekit/livekit_sip.twirp.go:4341
<http://github.com/livekit/protocol/livekit.(*sIPServer).ServeHTTP|github.com/livekit/protocol/livekit.(*sIPServer).ServeHTTP>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/livekit/livekit_sip.twirp.go:1799
<http://github.com/livekit/protocol/utils/xtwirp.PassHeadersHandler.func1|github.com/livekit/protocol/utils/xtwirp.PassHeadersHandler.func1>
        /go/pkg/mod/github.com/livekit/protocol@v1.39.1-0.20250604205715-2227c44329ee/utils/xtwirp/headers.go:36
net/http.HandlerFunc.ServeHTTP
        /usr/local/go/src/net/http/server.go:2294
net/http.(*ServeMux).ServeHTTP
        /usr/local/go/src/net/http/server.go:2822
<http://github.com/urfave/negroni/v3.(*Negroni).UseHandler.Wrap.func1|github.com/urfave/negroni/v3.(*Negroni).UseHandler.Wrap.func1>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:59
<http://github.com/urfave/negroni/v3.HandlerFunc.ServeHTTP|github.com/urfave/negroni/v3.HandlerFunc.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:33
<http://github.com/urfave/negroni/v3.middleware.ServeHTTP|github.com/urfave/negroni/v3.middleware.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:51
net/http.HandlerFunc.ServeHTTP
        /usr/local/go/src/net/http/server.go:2294
<http://github.com/livekit/livekit-server/pkg/service.(*APIKeyAuthMiddleware).ServeHTTP|github.com/livekit/livekit-server/pkg/service.(*APIKeyAuthMiddleware).ServeHTTP>
        /workspace/pkg/service/auth.go:107
<http://github.com/urfave/negroni/v3.middleware.ServeHTTP|github.com/urfave/negroni/v3.middleware.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:51
<http://github.com/livekit/livekit-server/pkg/service.RemoveDoubleSlashes|github.com/livekit/livekit-server/pkg/service.RemoveDoubleSlashes>
        /workspace/pkg/service/utils.go:49
<http://github.com/urfave/negroni/v3.HandlerFunc.ServeHTTP|github.com/urfave/negroni/v3.HandlerFunc.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:33
<http://github.com/urfave/negroni/v3.middleware.ServeHTTP|github.com/urfave/negroni/v3.middleware.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:51
<http://github.com/rs/cors.(*Cors).ServeHTTP|github.com/rs/cors.(*Cors).ServeHTTP>
        /go/pkg/mod/github.com/rs/cors@v1.11.1/cors.go:324
<http://github.com/urfave/negroni/v3.middleware.ServeHTTP|github.com/urfave/negroni/v3.middleware.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:51
<http://github.com/urfave/negroni/v3.(*Recovery).ServeHTTP|github.com/urfave/negroni/v3.(*Recovery).ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/recovery.go:210
<http://github.com/urfave/negroni/v3.middleware.ServeHTTP|github.com/urfave/negroni/v3.middleware.ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:51
<http://github.com/urfave/negroni/v3.(*Negroni).ServeHTTP|github.com/urfave/negroni/v3.(*Negroni).ServeHTTP>
        /go/pkg/mod/github.com/urfave/negroni/v3@v3.1.1/negroni.go:111
net/http.serverHandler.ServeHTTP
        /usr/local/go/src/net/http/server.go:3301
net/http.(*conn).serve
        /usr/local/go/src/net/http/server.go:2102
2025-12-21T14:34:01.919Z        INFO    livekit.api     service/twirp.go:128    API SIP.CreateSIPParticipant    {"service": "SIP", "method": "CreateSIPParticipant", "room": "dispatch-audio-call-f908ae84-a66d-4033-93c9-28592b799039", "participant": "+919873347321", "toUser": "+919873347321", "trunkID": "ST_p9rVLLmUkc9E", "callID": "SCL_8DDAA9nvCt9y", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "duration": "1m20.001955197s", "status": "408", "error": "twirp error unknown: request timed out", "code": "deadline_exceeded"}
t
Thanks — the server logs confirm CreateSIPParticipant timed out (status 408), which means the agent’s Twirp call reached LiveKit but the SIP participant creation could not complete before the deadline. That prevents the job handshake and media flow. Please check these items next (quick, prioritized): 1) SIP trunk reachability from LiveKit server • From the LiveKit server, resolve/connect to your trunk host (the toHost shown). Example: ◦ curl -v https://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com:443 • Confirm DNS, firewall, or egress rules aren’t blocking LiveKit → trunk. 2) LiveKit SIP settings and trunk credentials • Ensure the trunk address, auth_username, and auth_password in the dispatch JSON are correct and active in Twilio. Invalid trunk auth can cause the SIP create to hang/timeout. 3) Server-side SIP subsystem health & timeouts • Check LiveKit server logs around that timestamp for any SIP subsystem errors before/after the timeout. If the SIP provider is slow to respond, you may need to increase server-side timeouts or fix provider connectivity. 4) Agent / control-plane connectivity and auth (already checked client→server reachable) • Verify the agent is using the correct LiveKit control URL and API credentials. Invalid auth can cause requests to be delayed or rejected. Share the agent client init snippet (redact secrets) if unsure. 5) Correlate agent logs with server logs • You sent the agent Twirp timeout earlier; compare timestamps to confirm whether the server attempted the SIP call and then timed out (server logs you shared show that). What I need to pinpoint the fix: • LiveKit server SIP config (trunk entry and any SIP-related settings — redact secrets). • Agent client instantiation snippet showing the LiveKit URL and auth used (redact keys). • Any LiveKit server log lines immediately before the CreateSIPParticipant stack (±30s). If you share those three items I’ll tell you the exact field to change or the network test to run next.
m
t
Sorry that curl is failing — thanks for checking. To pinpoint whether this is DNS, routing, firewall/egress, or TLS/SNI from the LiveKit server to the Twilio trunk, please run these tests from the same host (or pod/node) where LiveKit runs and paste the outputs (redact secrets): 1) DNS • dig +short aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com • nslookup aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com 2) Basic HTTPS/TLS connect • curl -v https://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com/ • openssl s_client -connect aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com:443 -servername aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com 3) Routing / firewall • traceroute aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com (or mtr if available) 4) Confirm general egress works • curl -v https://www.google.com/ 5) If LiveKit runs in Kubernetes, run from the pod: • kubectl exec -n <ns> <livekit-pod> -- curl -v https://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com/ 6) Tell me: • Where LiveKit is running (bare metal / VM / cloud / k8s) and cloud provider. • Any egress proxy, NAT gateway, firewall, or network policy that could block outbound 443. • Whether you recently changed networking or added restrictive policies. Post the outputs and environment details and I’ll tell you the exact next step (DNS fix, security-group change, proxy config, or TLS workaround).
m
the SIP error has been fixed but I am still getting this log 2025-12-21T152136.402Z INFO livekit agent/client.go:146 not dispatching agent job since no worker is available {"agentName": "sandbox_agent", "jobType": "JT_PARTICIPANT", "room": "dispatch-audio-call-a3fd4d68-d048-4d88-8b2a-76a19a51c36c", "roomID": "RM_EeCqSFB4XzEP"}
t
Thanks — I see the log is for a
JT_PARTICIPANT
job: LiveKit created the dispatch but did not find an available worker to handle participant-type jobs for
agentName: "sandbox_agent"
. Quick checklist to resolve this (please check items and share snippets where asked): 1) Agent registered as a Worker that accepts JT_PARTICIPANT jobs • Your agent must register with the AgentServer/Worker API (not only join the room). Share the code where you create the
AgentServer
/
Worker
and the job handler so I can confirm it’s set to accept participant jobs. 2) agentName match • Confirm the agent registers with the exact name
"sandbox_agent"
. If you use
agent_name
in any decorator (e.g.,
@server.rtc_session(agent_name=...)
), that name must match the dispatch
agentName
exactly. 3) Job handler accepts participant jobs • Ensure your job handler calls
job_request.accept()
(or equivalent) for
JT_PARTICIPANT
jobs. Share the handler snippet if unsure. 4) Worker stays registered (process not exiting) • Ensure you run the worker loop (e.g.,
run_app
/
agents.run_app(worker)
) so it remains available after joining. Confirm agent process uptime in logs. 5) Load/availability not blocking dispatch • If you use
load_fnc
/
load_threshold
, confirm
load_fnc()
returns <
load_threshold
so the worker is considered available. 6) Agent-side logs to correlate • Paste agent logs around the dispatch time showing worker registration and any job-request handling (±30s). The server log shows no worker available — the agent logs will show whether it registered and whether it received the job. If you share: • The worker registration + job handler code snippet • Agent-side log lines around the dispatch attempt …I’ll point out the exact line to change so the worker accepts
JT_PARTICIPANT
jobs and audio will route correctly.
m
but I am getting logs on the agent worker and stt and tts is being initialized
t
Thanks — good detail. It’s helpful that STT/TTS initialize on the agent; that means the agent process is running, but the server still reports no available worker for
JT_PARTICIPANT
. That usually means the worker either isn’t registering to accept participant jobs or the
agentName
doesn’t match the dispatch. Please paste the following agent worker snippets (redact secrets) so I can pinpoint the mismatch and give an exact fix: 1. Worker / AgentServer registration (how you create the
AgentServer
or
Worker
and run it). 2. Any
@server.rtc_session(...)
or
@server.participant
decorators showing
agent_name
usage. 3. The job handler code where you handle/accept jobs (the function that should call
job_request.accept(...)
). 4. Any
load_fnc
/
load_threshold
configuration. 5. Agent-side logs around the dispatch time showing registration, job requests, or errors (±30s). If you prefer, paste just the few lines that set
agentName
and the accept call — I’ll point to the exact line to change.
m
Copy code
def request_fnc(req: JobRequest) -> None:
    """Job request filter that accepts all job types.

    This function is called by the LiveKit worker to determine whether
    to accept an incoming job request. By accepting all job types,
    the worker can handle JT_ROOM, JT_PARTICIPANT, and JT_PUBLISHER jobs.

    Args:
        req: The incoming job request from LiveKit.
    """
    # Accept all job types by calling accept() without conditions
    req.accept()
t
Thanks — that
request_fnc
looks correct (it accepts all jobs). The remaining likely causes are: • The worker isn’t actually registered with the AgentServer (or
request_fnc
wasn’t passed into the Worker/AgentServer). • The worker process isn’t kept alive (so it registers then disconnects). •
agentName
mismatch between the worker registration and the dispatch rule. •
load_fnc
/
load_threshold
marking the worker unavailable. Please paste these three small items (redact secrets) so I can give the exact change: 1. The code that creates the Worker/AgentServer and how you pass
request_fnc
to it (the Worker/AgentServer constructor call). 2. The line(s) that run the worker loop (e.g.,
agents.run_app(worker)
or
run_app(server)
). 3. Any code that sets
agent_name
(e.g.,
@server.rtc_session(agent_name=...)
) or otherwise specifies the agent identity. With those I’ll point to the exact line to change so jobs of type
JT_PARTICIPANT
are dispatched to your running worker.
m
I got this log on the server {"level": "INFO", "name": "livekit.agents", "message": "received job request", "job_id": "AJ_e8dCvxe6iazn", "dispatch_id": "AD_tvS4WA3wtLKq", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "room_id": "RM_pDsJTKgrqvpz", "agent_name": "sandbox_agent", "resuming": false, "enable_recording": false, "timestamp": "2025-12-21T160150.691233+00:00"} but still no audio is being sent to the call
t
Thanks — good news: the server log shows the job request reached the agent ("received job request"), so the dispatch and worker registration are working. Since you still have no audio, we need to check the media path between the SIP participant and the agent. Please provide or check the following so I can pinpoint the failure: 1. Agent media handling code • Paste the snippet that runs when the job is accepted and creates/joins the RTC session (where you call
job_request.accept()
and then connect to the room or create peer connections). • Include any code that publishes/subscribes audio (e.g.,
ctx.publish
,
roomio_audio
, or WebRTC track handling). 1. Agent logs around the job acceptance (±30s) • Look for lines showing: ◦ job accepted by the agent ◦ agent publishing an audio track (track published) ◦ ICE connection state changes / ICE completed for the agent peer ◦ any errors when creating or sending audio 1. Server logs around the same time (±30s) • Look for: ◦ SIP participant publishing a track (server log shows participant published earlier; confirm for this call) ◦ ICE candidate exchange/completion messages for both agent and SIP participant ◦ Any warnings/errors about track codec/mime (e.g.,
audio/red
) or incompatible codecs 1. Confirm codecs and track types • From server logs you previously saw
mime: "audio/red"
. Does your agent handle
audio/red
? If your agent expects PCM/Opus, you may need to enable backup codec policy or ensure the agent/peer supports the same codec. 1. Verify ICE/TURN connectivity • Confirm both agent and SIP participant show ICE connected/completed in logs. If ICE fails, media won’t flow even if tracks are published. If you paste the requested agent code (accept + RTC session + publish/subscription) and the agent/server log snippets showing job accept, track publish, and ICE states, I’ll point to the exact line to change or the missing step to restore audio.
m
SIP Server Logs
Copy code
2025-12-21T16:01:53.091Z        INFO    sip     sip/client.go:268       Creating SIP participant        {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017"}
2025-12-21T16:01:53.091Z        INFO    sip     sip/media_port.go:325   media timeout disabled  {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false}
2025-12-21T16:01:53.148Z        INFO    sip     v2@v2.11.4-0.20251016050252-63f7c8381817/localparticipant.go:140        published track {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "name": "+16263141017", "source": "MICROPHONE", "trackID": "TR_AM3Y7YGWu4Nmd7"}
2025-12-21T16:01:53.190Z        INFO    sip     sip/outbound.go:854     auth requested  {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "sipCallID": "wifem30yoEZJVqmijHksbmM6ZXL", "status": 407, "body": ""}
2025-12-21T16:01:57.798Z        INFO    sip     sip/media_port.go:574   using codecs    {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "audio-codec": "PCMU/8000", "audio-rtp": 0, "dtmf-rtp": 101, "srtp": ""}
2025-12-21T16:01:57.798Z        INFO    sip     sip/media_port.go:189   setting media destination       {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "addr": "168.86.139.99:11792"}
2025-12-21T16:01:57.798Z        INFO    sip     sip/media_port.go:347   media timeout enabled   {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "initial": "30s", "timeout": "15s"}
2025-12-21T16:01:57.799Z        INFO    sip     sip/media_port.go:386   media timeout reset     {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "tick": "15s"}
2025-12-21T16:01:57.799Z        INFO    sip     sip/outbound.go:387     Outbound SIP call established   {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA1cce7787d766cf8a4bd4e95e2e2ccca0"}
2025-12-21T16:01:57.918Z        INFO    sip     v2@v2.11.4-0.20251016050252-63f7c8381817/remoteparticipant.go:121       track subscribed        {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "participant": "agent-AJ_e8dCvxe6iazn", "trackID": "TR_AM6ayhY5r7UUBS", "kind": "audio"}
2025-12-21T16:01:57.918Z        INFO    sip     sip/room.go:315 mixing track    {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "participant": "agent-AJ_e8dCvxe6iazn", "pID": "PA_G4XDzyEUM4CR", "trackID": "TR_AM6ayhY5r7UUBS", "trackName": "roomio_audio", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "roomID": "RM_pDsJTKgrqvpz"}
2025-12-21T16:02:27.799Z        INFO    sip     sip/media_port.go:456   triggering media timeout        {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "startPackets": 0, "sinceStart": "30.000887853s", "sinceLast": "30.000776618s", "timeout": "30s", "isInitial": true}
2025-12-21T16:02:27.799Z        INFO    sip     sip/media_port.go:465   media timeout loop stopped      {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false}
2025-12-21T16:02:27.799Z        WARN    sip     sip/outbound.go:306     Closing outbound call with error        {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA1cce7787d766cf8a4bd4e95e2e2ccca0", "reason": "media-timeout"}
2025-12-21T16:02:27.929Z        INFO    sip     sip/media_port.go:200   setting media source    {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "addr": "invalid AddrPort"}
2025-12-21T16:02:27.929Z        INFO    sip     sip/media.go:116        call statistics {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "traceID": "5a5a456157387652", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA1cce7787d766cf8a4bd4e95e2e2ccca0", "stats": {"port":{"streams":0,"packets":0,"packets_ignored":0,"packets_input":0,"mux_packets":0,"mux_bytes":0,"audio_packets":0,"audio_bytes":0,"audio_in_frames":0,"audio_in_samples":0,"audio_out_frames":1506,"audio_out_samples":240960,"audio_rx":0,"audio_tx":6916.475536269047,"dtmf_packets":0,"dtmf_bytes":0,"closed":true},"room":{"input_packets":148,"input_bytes":4352,"dtmf_packets":0,"published_frames":0,"published_samples":0,"publish_tx":0,"mixer_samples":142080,"mixer_frames":148,"output_samples":1671360,"output_frames":1741,"closed":true},"mixer":{"tracks":1,"tracks_total":1,"restarts":36,"timing_resets":0,"mixes":1741,"mixes_timed":1741,"mixes_jump":0,"mixes_zero":0,"mixes_negative":0,"input_samples":142080,"input_frames":148,"mixed_samples":140160,"mixed_frames":146,"output_samples":1671360,"output_frames":1741,"write_errors":0,"blocked_mixes":0},"closed":true}, "durMin": 0, "sip_rx_ppm": -1000000, "sip_tx_ppm": -855906.7596610615, "lk_publish_ppm": -1000000, "expected_pcm_hz": 48000}
2025-12-21T16:02:27.930Z        INFO    sip     service/service.go:258  SIP call ended  {"nodeID": "NE_nfjVbVrm6hTV", "callID": "SCL_ZZEaW8vRE7bv", "reason": "media-timeout"}
t
Thanks — the SIP logs show the outbound call is established and the agent’s audio is being published/mixed, but LiveKit never sees any RTP packets from the SIP side (packets: 0). That triggered the media-timeout and closed the call — so the problem is one-way audio: agent → LiveKit is fine, SIP client → LiveKit is not. Please check these next steps (in order): 1. Confirm the SIP client is actually sending RTP ◦ Check the SIP client/pjsua logs for RTP send counters or errors. ◦ If using file playback, try a simple microphone test or a different pjsua invocation (no playback) to rule out playback issues. 1. Verify codec match (server expects PCMU/8000) ◦ Ensure the SIP client offers/uses G.711 u-law (PCMU). A codec mismatch can prevent RTP from being accepted. 1. Capture network traffic on the SIP client host ◦ Run tcpdump/wireshark on the SIP client machine for the call’s UDP RTP port(s) and confirm outbound RTP to the trunk IP/port (e.g., capture 168.86.139.99:11792 from your logs). ◦ If you see no RTP packets, the client isn’t sending; if you see RTP but LiveKit still reports zero, check NAT/firewall. 1. Check firewall/NAT/egress rules for RTP ports ◦ Ensure outbound UDP on the RTP port(s) and range used by your SIP client is allowed. SIP signaling and media use different ports; media often uses high-numbered UDP ranges. 1. Verify media addresses/ports the SIP trunk expects ◦ Confirm the SIP client is sending to the address/port that Twilio/your trunk advertised. The SIP logs show media destination addr 168.86.139.99:11792 — validate your client is targeting that. 1. Short test: run a packet capture on the LiveKit/SIP node too ◦ Capture UDP on the LiveKit node for the same port to see whether packets arrive and are dropped or never sent. If you can paste these results I’ll tell you the precise next change: • pjsua (or SIP client) logs showing RTP send or codec negotiation • tcpdump output (or a short pcap) from the SIP client and/or LiveKit node showing RTP traffic • The exact pjsua command you used With that I’ll point to the exact cause (client not sending, NAT/firewall blocking, or wrong destination/codec) and the fix. Sources: Ports and firewall | LiveKit docs | sip | livekit/livekit_composite | DeepWiki
m
Livekit server logs 2025-12-21T160153.148Z INFO livekit rtc/room.go:480 participant active {"room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "roomID": "RM_pDsJTKgrqvpz", "participant": "+16263141017", "pID": "PA_rvisztWrgJBs", "remote": false, "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 44.197.226.12:53025 (resolved: 44.197.226.12:53025)", "[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][trickle] udp4 host 169.254.170.23:53644 (resolved: 169.254.170.23:53644)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp6 host [fd00ec223]56795 (resolved: [fd00ec223]56795)", "[local][trickle] tcp6 host [fd00ec223]7881 (resolved: [fd00ec223]7881)", "[local][trickle] udp4 host 10.0.14.162:51042 (resolved: 10.0.14.162:51042)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[remote][selected:1][trickle] udp4 host 10.0.8.105:49095"], "connectionType": "udp", "clientInfo": {"sdk": "GO", "version": "2.11.3", "protocol": 16, "os": "linux"}} 2025-12-21T160153.165Z INFO livekit.pub rtc/participant.go:1930 mediaTrack published {"room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "roomID": "RM_pDsJTKgrqvpz", "participant": "agent-AJ_e8dCvxe6iazn", "pID": "PA_G4XDzyEUM4CR", "remote": false, "kind": "audio", "trackID": "TR_AM6ayhY5r7UUBS", "webrtcTrackID": "f63d6abd-2757-42d8-bcdd-d7eb1c956bc2", "rid": "", "SSRC": 3523509484, "mime": "audio/red", "trackInfo": {"sid": "TR_AM6ayhY5r7UUBS", "type": "AUDIO", "name": "roomio_audio", "source": "MICROPHONE", "mimeType": "audio/red", "mid": "0", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766332913165327}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true} 2025-12-21T160153.183Z INFO livekit.pub rtc/participant.go:1930 mediaTrack published {"room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "roomID": "RM_pDsJTKgrqvpz", "participant": "+16263141017", "pID": "PA_rvisztWrgJBs", "remote": false, "kind": "audio", "trackID": "TR_AM3Y7YGWu4Nmd7", "webrtcTrackID": "audio", "rid": "", "SSRC": 1863164795, "mime": "audio/opus", "trackInfo": {"sid": "TR_AM3Y7YGWu4Nmd7", "type": "AUDIO", "name": "+16263141017", "source": "MICROPHONE", "mimeType": "audio/opus", "mid": "0", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766332913183398}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true} 2025-12-21T160155.485Z INFO livekit agent/client.go:146 not dispatching agent job since no worker is available {"agentName": "sandbox_agent", "jobType": "JT_PARTICIPANT", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "roomID": "RM_pDsJTKgrqvpz"} 2025-12-21T160155.485Z INFO livekit agent/client.go:146 not dispatching agent job since no worker is available {"agentName": "sandbox_agent", "jobType": "JT_PUBLISHER", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "roomID": "RM_pDsJTKgrqvpz"} 2025-12-21T160157.808Z INFO livekit.api service/twirp.go:128 API SIP.CreateSIPParticipant {"service": "SIP", "method": "CreateSIPParticipant", "room": "dispatch-audio-call-3ad89b39-ab5d-4437-9795-263d0b12efa3", "participant": "+16263141017", "toUser": "+16263141017", "trunkID": "ST_p9rVLLmUkc9E", "callID": "SCL_ZZEaW8vRE7bv", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "duration": "4.92938801s", "status": "200"}
t
Thanks — the server logs show both sides published audio tracks (agent published `audio/red`; SIP participant published
audio/opus
), but the SIP subsystem recorded zero RTP packets from the SIP leg and triggered a media-timeout. That explains the no-audio behavior: one-way audio where the SIP side isn’t sending media to LiveKit. Actions to take next (in order): 1. Confirm the SIP client is actually sending RTP • Check your SIP client (pjsua) logs for RTP send counters or errors. • If you use file playback, try a microphone test or a simple outbound call without playback. 1. Verify codec negotiation • LiveKit’s SIP side logged PCMU/8000 earlier. Ensure the SIP client is sending PCMU (G.711 u-law) or that the trunk/LiveKit are negotiating a codec both sides support. Codec mismatch can prevent media. 1. Confirm media destination/address • LiveKit logged media destination addr 168.86.139.99:11792. Ensure your SIP client is sending RTP to that IP:port (not a different address/port). 1. Capture packets on the SIP client host • Run tcpdump/wireshark on the SIP client machine for the RTP port to confirm outbound RTP to 168.86.139.99:11792. Example: ◦ sudo tcpdump -n -i <iface> host 168.86.139.99 and udp and port 11792 • If you see no RTP, the client isn’t sending. If you see RTP, check LiveKit node capture to confirm arrival. 1. Check firewall/NAT/egress • Ensure outbound UDP for the RTP port(s)/range is allowed. Media uses high-numbered UDP ports—verify NAT/firewall rules allow them and that NAT preserves source ports. 1. Capture on LiveKit/SIP node • Run tcpdump on the LiveKit node for the same IP:port to see whether packets arrive. This isolates client vs network vs server issues. 1. Short-term tests • Use a different SIP client or an uncluttered test call to rule out client-side playback or codec issues. • Temporarily allow broad RTP UDP egress to test. If you want, paste: • The pjsua (or SIP client) command-line you used, • pjsua/client logs around call setup and RTP, • tcpdump output (from client or LiveKit node) showing whether RTP packets exist. Send any of those and I’ll tell you the exact next step to restore two‑way audio.
m
I am using kamailio proxy for SIP might that be causing any issue? 214426.020 sip_endpoint.c !.Module "mod-pjsua-log" registered 214426.020 sip_endpoint.c .Module "mod-tsx-layer" registered 214426.020 sip_endpoint.c .Module "mod-stateful-util" registered 214426.020 sip_endpoint.c .Module "mod-ua" registered 214426.020 sip_endpoint.c .Module "mod-100rel" registered 214426.020 sip_endpoint.c .Module "mod-pjsua" registered 214426.020 sip_endpoint.c .Module "mod-invite" registered 214426.043 coreaudio_dev.c ..core audio detected 2 devices 214426.043 coreaudio_dev.c .. dev_id 72: MacBook Pro Speakers (in=0, out=2) 48000Hz 214426.043 coreaudio_dev.c .. dev_id 79: MacBook Pro Microphone (in=1, out=0) 48000Hz 214426.043 coreaudio_dev.c ..core audio initialized 214426.043 pjlib ..select() I/O Queue created (0x101140718) 214426.047 sip_endpoint.c .Module "mod-evsub" registered 214426.047 sip_endpoint.c .Module "mod-presence" registered 214426.047 sip_endpoint.c .Module "mod-dlg_even" registered 214426.047 sip_endpoint.c .Module "mod-mwi" registered 214426.047 sip_endpoint.c .Module "mod-refer" registered 214426.047 sip_endpoint.c .Module "mod-pjsua-pres" registered 214426.047 sip_endpoint.c .Module "mod-pjsua-im" registered 214426.047 sip_endpoint.c .Module "mod-pjsua-options" registered 214426.047 pjsua_core.c .1 SIP worker threads created 214426.047 pjsua_core.c .pjsua version 2.16 for Darwin-25.1/arm64 initialized 214426.047 pjsua_core.c .PJSUA state changed: CREATED --> INIT 214426.047 sip_endpoint.c Module "mod-default-handler" registered 214426.047 conference.c .Add port 1 (ringback) queued 214426.047 conference.c .Add port 2 (ring) queued 214426.047 pjsua_core.c SIP UDP socket reachable at 192.168.169.196:5060 214426.047 udp0xa931ca000 SIP UDP transport started, published address is 192.168.169.196:5060 214426.047 pjsua_acc.c Adding account: id=sip:192.168.169.196:5060 214426.048 pjsua_acc.c .Account sip:192.168.169.196:5060 added with id 0
t
Thanks — Kamailio can absolutely affect media flow and cause the media-timeout you’re seeing. Your logs show the SIP leg never delivered RTP (packets: 0) even though the agent published audio, so the proxy is a prime suspect. Checklist to debug Kamailio-related media issues (run these and paste results if you want me to review): 1) SDP handling / address rewriting • Confirm Kamailio isn’t rewriting the media IP:port in SDP to a private address that Twilio/LiveKit can’t reach. Look for any s=, c= or m= lines being rewritten. • If using RTP proxying modules, check whether Kamailio is set to force RTP through a media proxy. 2) RTP proxy vs direct media • If you rely on Kamailio + rtpengine/rtpproxy, ensure the proxy is actually relaying media and configured to forward RTP between Twilio and the LiveKit SIP node. If you’re not using an RTP proxy, ensure Kamailio is passing SDP through unmodified so endpoints send RTP directly to the advertised IP/port. 3) NAT and contact/record-route headers • Verify Contact and Record-Route headers are correct so responses and media are sent to the correct hop. Misconfigured NAT handling in Kamailio can cause SDP to advertise unreachable addresses. 4) Verify actual RTP flow with packet captures • On the Kamailio host, capture UDP on the RTP port(s) advertised by LiveKit (e.g., 168.86.139.99:11792) and on the local RTP ports used by the SIP client. Example: ◦ sudo tcpdump -n -i <iface> host 168.86.139.99 and udp and port 11792 • If Kamailio sees incoming RTP from the SIP client but not forwarding to LiveKit, that points to proxying/forward rules. If Kamailio sees no RTP from the client, the client isn’t sending. 5) Codec negotiation through the proxy • Ensure Kamailio is not stripping or altering codec attributes in SDP. LiveKit expected PCMU (G.711 µ-law). Confirm the negotiated codec in the proxied SDP matches what the client can send. 6) Check Kamailio modules/config to allow media relay • If using `rtpproxy`/`rtpengine`, check that session creation succeeded and that the proxy’s IP/ports are reachable by both Twilio and your SIP client. • If using
mediaproxy
features, ensure keepalive and timeout settings don’t prematurely tear down media. 7) Temporary bypass test • If possible, bypass Kamailio (direct SIP from pjsua to LiveKit trunk) for one test call. If RTP flows with Kamailio bypassed, the proxy is confirmed as the problem. 8) Confirm port and firewall rules on Kamailio host • Ensure Kamailio host allows inbound/outbound UDP on the RTP ports your SIP client uses and those the LiveKit SIP node advertises. If you share: • A short pcap from the Kamailio host covering the call (or tcpdump output), and • The SDP from the INVITE/200OK as seen by Kamailio and as forwarded to LiveKit, I’ll point to the exact SDP line or config change to fix the media path.
m
SIP + Kamailio Architecture Summary Stack: External Client (PSTN/SIP) ↓ UDP:5060 (SIP) + UDP:10000-20000 (RTP) AWS NLB (internet-facing) ↓ Round-robin Kamailio (2 replicas, hostNetwork) ↓ Call-ID hash routing + failover SIP Server (DaemonSet, hostNetwork, 1 pod/node) ↓ WebSocket LiveKit Server + Redis Key Components: 1. AWS NLB: Layer 4 load balancer, port 5060 UDP/TCP, single public endpoint 2. Kamailio 6.0.4: - Pure SIP signaling proxy (NO media/SDP manipulation) - Call-ID hash (algorithm: 0) for session affinity - Backend discovery via headless service DNS - Failover enabled (flags: 2) - Modules: tm, dispatcher, rr (NO rtpproxy/nathelper) 3. SIP Server: - DaemonSet on public node pool (Porter toleration) - hostNetwork: true + USE_EXTERNAL_IP: true - Ports: 5060 (SIP), 10000-20000 (RTP) - Headless service (clusterIP: None) - Connects to LiveKit via WSS Media Flow: - Signaling: Client → NLB → Kamailio → SIP Server → LiveKit - RTP Media: Client ↔️ SIP Server directly (bypasses Kamailio) Session Affinity: All requests with same Call-ID route to same SIP server backend via hash function Network: Both Kamailio and SIP server use hostNetwork: true to bind directly to node IPs. SIP server pods scheduled on public node pool with security group UDP 10000-20000 open.
t
Thanks — your architecture and logs make the situation clear: Kamailio is only proxying signaling, but RTP must flow directly between the PSTN/SIP client and your SIP server. The media-timeout shows LiveKit’s SIP gateway never received RTP from the SIP leg, so focus on the SIP server ↔️ PSTN media path. Please check these prioritized items and share results so I can pinpoint the fix: 1) Capture RTP on the SIP server (hostNetwork node) during a failing call • Run tcpdump on the SIP server node for the advertised media addr/port (from logs, e.g. dst 168.86.139.99 and port 11792) and for your local RTP range: sudo tcpdump -n -i <iface> udp and host 168.86.139.99 and port 11792 sudo tcpdump -n -i <iface> udp portrange 10000-20000 • If you see incoming RTP from the PSTN client to the SIP server, note source IP/port. If you see nothing, the client isn’t sending to your SIP server. 2) Confirm SIP server sends RTP to LiveKit's media addr/port • Check SIP server logs or capture outbound UDP to LiveKit SIP node IP/port. Ensure your SIP server forwards RTP to the exact IP:port LiveKit logged (168.86.139.99:11792). 3) Verify NAT/firewall/SG rules for RTP ports on the SIP server node • Ensure inbound UDP for 10000-20000 is allowed on the node’s public IP and no egress rules block outbound to LiveKit IPs/ports. 4) Verify SDP seen by the SIP client (and by LiveKit) • Show the SDP from the INVITE/200OK as seen by the client and as seen by LiveKit (or the SIP server’s forwarded SDP). Confirm the media IP/port in the c= and m= lines are reachable addresses, not private ones rewritten by Kamailio. 5) Confirm Kamailio DID NOT rewrite SDP (you stated it shouldn't) • Double-check config for any modules that could touch SDP (ensure no accidental record-route/append or force-RTP-proxying). If in doubt, test bypassing Kamailio for one call. 6) If NAT/asymmetric routing exists, consider an RTP proxy • If your PSTN client is behind NAT or source port changes, add/enable an RTP proxy (rtpengine/rtpproxy) or configure your SIP server to anchor media reliably so LiveKit receives RTP. What to paste here for the fastest next step: • tcpdump output (10–30 lines) from the SIP server during a failing call showing whether RTP arrives. • The INVITE/200OK SDP snippets (as seen by SIP server and by LiveKit) — redact sensitive tokens. • SIP server log lines showing where it sets media destination (you already have some; include surrounding lines). Send those and I’ll point to the exact configuration or network change to restore two‑way audio.
m
here is the head of the tcpdump output !Hi{# DE+E0(@|; iJ}KfW!B4Yۧ !Hia$ DE+E0(|: iJ}֭KfW!Bv> !HiY) P$ĩE<11J} iKf( FN !B4Yۧ!Hi) P$ĩE<-6JJ} iKf֭( FN !Bv!Hi= DE+E0(@|9 iJ}KfW!Bsnd !Hi: P$ĩE<-5J} iKf(O FN !Bs!Hi DE+E0(@|8 iJ}KfW!BD|*oO! ơ. !HiH P$ĩE<12JJ} iKf(w> !BD|*oO! FN!HE+E X@ iV9'+Fx~~~~~~~~~~~~~~~~!HE+E Y@ iV9'+Fx~~~~~~~~~~~~~~~~~~!HiE+E [@ iV9'+F@x~~~~~~~~~~~~~~~~~~~~~!HE+E \@ iV9'+Fx~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!HE+E ]@ iV9'+Fx~~~~~~~~~~~~~~~~~~~~~~~~~!Hi! E+E ^@ iV9'+F x~~~~~~~~~~~~~~~~~~~~~~~~!Hin E+E `@ iV9'+Fx~~~~~~~~~~~~~~~~~~~~~~!Hi7 E+E a@ iV9'+F`x~~~~~~~~~~~~~~!Hi E+E c@ iV9'+x~~~~~~~~~~~~~~~~~~~~~~~~~~!HiN[ E+E e@ iV9'+F x~~~~~~~~~~~~~~~~~~~~~!Hi E+E f@ iV9'+F @x~~~~~~~~~~~~~~!Hi E+E h@ iV9'+F x~~~~~~~~~~~~~~~~!Hi`E E+E j@ iV9'+F x~~~~~~~~~~~~~~~~~~~~~~!Hiz
t
Thanks — that tcpdump head shows RTP payload (the repeating/tilde-looking bytes are audio), so RTP is arriving at the SIP server. Because LiveKit reported zero packets, the SIP server is either not forwarding that RTP to LiveKit or is sending it to the wrong IP/port. Please run these focused checks from the SIP server node and paste results: 1) Capture outbound RTP to LiveKit’s media addr/port (replace iface if needed): • sudo tcpdump -n -i <iface> host 168.86.139.99 and udp and port 11792 -c 200 2) Capture all outbound UDP from your SIP server RTP range: • sudo tcpdump -n -i <iface> udp and portrange 10000-20000 -c 200 3) Show SIP server log lines around where it sets media destination / forwards RTP (±10s of the previously logged "setting media destination" line). Interpretation guide: • If (1) shows packets → SIP server is forwarding; then capture on LiveKit node to confirm arrival (so we can check network/firewall between SIP server and LiveKit). • If (1) shows nothing but (2) shows RTP to some other IP/port → your SIP server is sending to the wrong destination; share the destination IP/port and I’ll show exactly where to change it. • If neither shows outbound RTP → SIP server isn’t forwarding; share the forwarding code/config and logs and I’ll point to the exact change. Run (1) first and paste the output (or the first 20 lines). I’ll tell you the exact next command or config line to change.
m
here are the logs Creating SIP participant {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017"} 2025-12-21T163209.537Z INFO sip sip/media_port.go:325 media timeout disabled {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false} 2025-12-21T163210.647Z INFO sip v2@v2.11.4-0.20251016050252-63f7c8381817/localparticipant.go:140 published track {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "name": "+16263141017", "source": "MICROPHONE", "trackID": "TR_AMP6zZyxhbnkiE"} 2025-12-21T163210.770Z INFO sip sip/outbound.go:854 auth requested {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "sipCallID": "G4KYs6QHmEAHVuqUVZTfh7ewq3P", "status": 407, "body": ""} 2025-12-21T163218.446Z INFO sip sip/media_port.go:574 using codecs {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "audio-codec": "PCMU/8000", "audio-rtp": 0, "dtmf-rtp": 101, "srtp": ""} 2025-12-21T163218.446Z INFO sip sip/media_port.go:189 setting media destination {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "addr": "168.86.139.57:11136"} 2025-12-21T163218.446Z INFO sip sip/media_port.go:347 media timeout enabled {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "initial": "30s", "timeout": "15s"} 2025-12-21T163218.447Z INFO sip sip/media_port.go:386 media timeout reset {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "tick": "15s"} 2025-12-21T163218.447Z INFO sip sip/outbound.go:387 Outbound SIP call established {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA4d8ecf5bb0db6e1b14dc3f734d903def"} 2025-12-21T163218.568Z INFO sip v2@v2.11.4-0.20251016050252-63f7c8381817/remoteparticipant.go:121 track subscribed {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "participant": "agent-AJ_ZMDr8u6S3USc", "trackID": "TR_AMX36CdvxJ2qGF", "kind": "audio"} 2025-12-21T163218.568Z INFO sip sip/room.go:315 mixing track {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "participant": "agent-AJ_ZMDr8u6S3USc", "pID": "PA_QnxzzCHEkZPS", "trackID": "TR_AMX36CdvxJ2qGF", "trackName": "roomio_audio", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "roomID": "RM_YehWQSim4gs3"} 2025-12-21T163228.865Z INFO sip hwstats/cpu.go:129 high cpu load {"nodeID": "NE_nfjVbVrm6hTV", "load": 0.9020687685611013} 2025-12-21T163231.946Z INFO sip sip/client.go:339 BYE from remote {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_RdMm5ASaSPWh", "traceID": "52644d6d35415361", "room": "dispatch-audio-call-cdaf4dba-afe2-43db-8eb4-985cb5a1368f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA4d8ecf5bb0db6e1b14dc3f734d903def"}
t
Thanks — your SIP server is setting the media destination (168.86.139.57:11136) and the SIP side published/subscribed tracks, but LiveKit recorded zero RTP packets and triggered a media-timeout. That means your SIP server is not actually delivering RTP to the LiveKit media endpoint (or LiveKit isn’t seeing it). Please run these two quick captures and checks so we can pinpoint whether the RTP is leaving your SIP server and whether it reaches LiveKit: 1) On the SIP server node (where you ran the previous tcpdump), capture outbound packets destined to LiveKit’s media address/port: • sudo tcpdump -n -i <iface> host 168.86.139.57 and udp and port 11136 -c 100 2) On the LiveKit/SIP node (the node whose IP LiveKit logged, or the LiveKit public node), capture inbound packets on that port: • sudo tcpdump -n -i <iface> udp and port 11136 -c 100 Report the first ~20 lines of each capture (or say “no packets” if empty). Also confirm these quickly: • Security groups / host firewalls: outbound UDP to 11136 and outbound UDP for your RTP range (10000–20000) are allowed from the SIP server node, and inbound UDP to LiveKit on 11136 is allowed. • The SIP server is sending RTP to exactly 168.86.139.57:11136 (check the outbound capture for the destination IP/port). • If outbound capture shows RTP to a different IP/port, paste that IP:port. If the SIP server shows RTP leaving to 168.86.139.57:11136 but LiveKit capture shows nothing, we’ll focus on network/firewall routing between the nodes. If the SIP server shows no outbound RTP, we’ll focus on the SIP server forwarding/SDP config (I’ll point to the exact config lines to change).
m
what port of the livekit server are we supposed to get the audio packets?
t
Use the media addr:port shown in the LiveKit SIP logs — e.g., the logs above show LiveKit expecting RTP to 168.86.139.57:11136. LiveKit’s SIP gateway will receive RTP on that specific IP:port for the call. Additionally: • LiveKit/SIP uses UDP RTP ports in the high range (default 10000–20000). The exact destination port is per-call and is the port logged as the media destination (the addr field). • For troubleshooting, capture on that logged IP:port (e.g., sudo tcpdump -n -i <iface> host 168.86.139.57 and udp and port 11136). • Ensure your SIP server (or Kamailio path) sends RTP to the exact IP:port in the LiveKit log and that any firewalls/security groups allow outbound UDP from your SIP server and inbound UDP to the LiveKit node on that port/range.
m
tcpdump output for pod running livekit for portrange 10000-60000 /tmp/rtp.pcap <== &HiX`ctr}EL1@ {ˣ{8h# -;]u&Hi2`mqEL@:{ {ˣ8$ z<`-;]u>t M>t &HimqEe@|ٔ4u 3ߺth-X!B7XyDnkGKoifaLcMvZBFVqHJcDZsz:2oVoWk2ʧer@$U-zTς(J/&HiP pctr}E\\@P 4u3H=,!B7XyDnkGKoifa!<NG*/.|/[(%&Hi ctr}E]@+ head: -vv: No such file or directory / # cat /tmp/rtp.pcap &HiX`ctr}EL1@ {ˣ{8h# -;]u&Hi2`mqEL@:{ {ˣ8$ z<`-;]u>t M>t &HimqEe@|ٔ4u 3ߺth-X!B7XyDnkGKoifaLcMvZBFVqHJcDZsz:2oVoWk2ʧer@$U-zTς(J/&HiP pctr}E\\@P 4u3H=,!B7XyDnkGKoifa!<NG*/.|/[(%&Hi ctr}E]@+ 4u3laP!BM+DS`"w2oVo:LcMvZBFVqHJcDZsz+a$B"nK+O3(&Hi ctr}E@ u3laP!B*#"@]E2oVo:LcMvZBFVqHJcDZsz+a$b*%oѩD(:Mu&Hi ctr}Ej@Q 4u3laP!Bnvk d2oVo:LcMvZBFVqHJcDZsz+a$:X 5')h̊HuIR('H&Hi pmqE\e@|ٿ4u FJJpV٘,!BM+DS`"w / (n&Hif mqEe@|e4u 3ߺj {1d<[q;r =<N +/̨̩ /5@ &Hi ctr}E@ u3laP!B5'L]N#!AB2oVo:LcMvZBFVqHJcDZsz+a$3Ci@Oe5G(st&Hi ctr}Ej@Q 4u3laP!B=z.ې4%2oVo:LcMvZBFVqHJcDZsz+a$#7SlbKNdxi- ctr}E@_ NZ lzP!B4&Dc<4¯2oVo:LcMvZBFVqHJcDZsz+a$&6_1uk{pX (0)&HiC ctr}E @2Z
t
Thanks — the tcpdump contents look like RTP payload (so packets are arriving at the LiveKit pod). Since LiveKit still logged zero packets and a media-timeout, the next checks are to verify the SIP server is sending to the exact LiveKit media IP:port that LiveKit expects and that the LiveKit SIP process is bound and receiving on that address. Please check and share these four quick items so I can pinpoint the issue: 1) Confirm the media destination IP:port your SIP server used for this call (from your sip logs it showed e.g. "addr": "168.86.139.57:11136"). Paste that exact addr value for the failing call. 2) From the LiveKit host/pod, show which process/IP:port is listening for RTP: • sudo ss -lunp | grep 11136 (or replace 11136 with the media port your logs show). Paste the output. 3) Capture inbound packets on the LiveKit node again but include source/dest addresses: • sudo tcpdump -n -i <iface> udp and port 11136 -c 50 -w /tmp/livekit_in.pcap Then run: sudo tcpdump -nn -r /tmp/livekit_in.pcap | head -n 20 Paste the first lines or say "no packets". 4) Confirm whether you have multiple LiveKit nodes (headless/cluster) and whether the media addr in the sip logs matches the IP of the specific LiveKit node/pod that was selected for the room. If multiple nodes exist, paste the LiveKit node IPs. What I’ll do after you share those: • If SIP server is sending to a different IP than the LiveKit process is listening on, I’ll tell you exactly where the mismatch comes from and how to fix the advertised media addr (or how to bind LiveKit to that addr). • If packets arrive at the LiveKit host but the process isn’t receiving them, I’ll point to likely causes (host firewall, container network binding, or LiveKit SIP binding) and the exact commands/config to change. Send the outputs and I’ll give the exact next command or config change.
m
now the agent is able to speak but users response is not coming to livekit
t
Great progress — since the agent → user audio works but the user → LiveKit audio does not, the problem is that inbound RTP from the SIP participant isn't reaching LiveKit. Let’s narrow it down quickly. Please provide these two small captures/outputs from the SIP server and the LiveKit node you used earlier: 1) On the SIP server node (where RTP originates), run during a failing call and paste the first 20 lines: • sudo tcpdump -n -i <iface> host <livekit_media_ip> and udp and port <livekit_media_port> -c 100 2) On the LiveKit node (the IP shown in the LiveKit SIP logs), show what UDP ports LiveKit is listening on: • sudo ss -lunp | grep LISTEN or • sudo ss -lunp | grep <livekit_media_port> Also answer these quick questions: • The exact media addr:port shown in the LiveKit SIP logs for the current call (addr field). • Any NAT/firewall between the SIP server and LiveKit (security groups, host firewall). • Did you change advertise_ip, hostNetwork, or rtp_port_range in LiveKit config recently? If the SIP server capture shows outbound RTP to the exact livekit_media_ip:port but LiveKit's ss shows no process bound to that port, we’ll need to fix LiveKit binding (advertise_ip/rtp range). If SIP server shows no outbound RTP, we’ll focus on the SIP server forwarding/SDP. Paste the two outputs and I’ll tell you the exact command or config line to change.
m
tcpdump from livekit
Copy code
2025-12-21 18:38:27.928274 eth0  Out IP (tos 0x0, ttl 255, id 26319, offset 0, flags [DF], proto UDP (17), length 76)
    10.0.10.237.29728 > 169.254.169.123.123: NTPv4, Client, length 48
        Leap indicator:  (0), Stratum 0 (unspecified), poll 4 (16s), precision 32
        Root Delay: 0.000000, Root dispersion: 0.000000, Reference-ID: (unspec)
          Reference Timestamp:  0.000000000
          Originator Timestamp: 0.000000000
          Receive Timestamp:    0.000000000
          Transmit Timestamp:   2473561010.131746727 (1978-05-21T04:16:50Z)
            Originator - Receive Timestamp:  0.000000000
            Originator - Transmit Timestamp: 2473561010.131746727 (1978-05-21T04:16:50Z)
2025-12-21 18:38:27.928456 eth0  In  IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 76)
    169.254.169.123.123 > 10.0.10.237.29728: NTPv4, Server, length 48
        Leap indicator:  (0), Stratum 3 (secondary reference), poll 4 (16s), precision -18
        Root Delay: 0.000152, Root dispersion: 0.000213, Reference-ID: 0xa9fea97a
          Reference Timestamp:  3975331096.782958261 (2025-12-21T18:38:16Z)
          Originator Timestamp: 2473561010.131746727 (1978-05-21T04:16:50Z)
          Receive Timestamp:    3975331107.928373113 (2025-12-21T18:38:27Z)
          Transmit Timestamp:   3975331107.928389013 (2025-12-21T18:38:27Z)
            Originator - Receive Timestamp:  +1501770097.796626386
            Originator - Transmit Timestamp: +1501770097.796642286
2025-12-21 18:38:37.373642 eth0  In  IP (tos 0x0, ttl 124, id 28979, offset 0, flags [DF], proto UDP (17), length 136)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 108
2025-12-21 18:38:37.373741 eth0  Out IP (tos 0x0, ttl 255, id 7181, offset 0, flags [DF], proto UDP (17), length 92)
    10.0.10.237.56141 > 52.5.117.242.27091: UDP, length 64
2025-12-21 18:38:37.373767 eth0  Out IP (tos 0x0, ttl 255, id 7182, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.56141 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.373790 eth0  Out IP (tos 0x0, ttl 255, id 13874, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.57746 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.373809 eth0  Out IP (tos 0x0, ttl 255, id 1723, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.55541 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.375024 eth0  In  IP (tos 0x0, ttl 124, id 28980, offset 0, flags [DF], proto UDP (17), length 92)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 64
2025-12-21 18:38:37.375148 eth0  In  IP (tos 0x0, ttl 124, id 28981, offset 0, flags [DF], proto UDP (17), length 181)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 153
2025-12-21 18:38:37.417719 eth0  Out IP (tos 0x0, ttl 255, id 13875, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.57746 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.417740 eth0  Out IP (tos 0x0, ttl 255, id 1724, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.55541 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.417769 eth0  Out IP (tos 0x0, ttl 255, id 12761, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.21831 > 10.78.90.205.36300: UDP, length 100
2025-12-21 18:38:37.417786 eth0  Out IP (tos 0x0, ttl 255, id 63285, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.62554 > 10.78.90.205.36300: UDP, length 100
2025-12-21 18:38:37.417798 eth0  Out IP (tos 0x0, ttl 255, id 49696, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.38267 > 10.78.90.205.36300: UDP, length 100
2025-12-21 18:38:37.420794 eth0  In  IP (tos 0x0, ttl 124, id 28983, offset 0, flags [DF], proto UDP (17), length 136)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 108
2025-12-21 18:38:37.420931 eth0  Out IP (tos 0x0, ttl 255, id 7185, offset 0, flags [DF], proto UDP (17), length 92)
    10.0.10.237.56141 > 52.5.117.242.27091: UDP, length 64
2025-12-21 18:38:37.423757 eth0  In  IP (tos 0x0, ttl 124, id 28984, offset 0, flags [DF], proto UDP (17), length 181)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 153
2025-12-21 18:38:37.469017 eth0  In  IP (tos 0x0, ttl 124, id 28986, offset 0, flags [DF], proto UDP (17), length 136)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 108
2025-12-21 18:38:37.469205 eth0  Out IP (tos 0x0, ttl 255, id 7186, offset 0, flags [DF], proto UDP (17), length 92)
    10.0.10.237.56141 > 52.5.117.242.27091: UDP, length 64
2025-12-21 18:38:37.523211 eth0  In  IP (tos 0x0, ttl 124, id 28988, offset 0, flags [DF], proto UDP (17), length 181)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 153
2025-12-21 18:38:37.618722 eth0  Out IP (tos 0x0, ttl 255, id 13893, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.57746 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.618748 eth0  Out IP (tos 0x0, ttl 255, id 1744, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.55541 > 52.5.117.242.27091: UDP, length 100
2025-12-21 18:38:37.618784 eth0  Out IP (tos 0x0, ttl 255, id 12781, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.21831 > 10.78.90.205.36300: UDP, length 100
2025-12-21 18:38:37.618798 eth0  Out IP (tos 0x0, ttl 255, id 63292, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.62554 > 10.78.90.205.36300: UDP, length 100
2025-12-21 18:38:37.618811 eth0  Out IP (tos 0x0, ttl 255, id 49712, offset 0, flags [DF], proto UDP (17), length 128)
    10.0.10.237.38267 > 10.78.90.205.36300: UDP, length 100
2025-12-21 18:38:37.722246 eth0  In  IP (tos 0x0, ttl 124, id 28999, offset 0, flags [DF], proto UDP (17), length 181)
    52.5.117.242.27091 > 10.0.10.237.56141: UDP, length 153
sip
Copy code
tcpdump: data link type LINUX_SLL2
tcpdump: listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
2025-12-21 18:38:39.339518 eth0  Out IP (tos 0x0, ttl 127, id 53635, offset 0, flags [DF], proto UDP (17), length 48)
    10.0.8.105.34697 > 74.125.250.129.19302: UDP, length 20
2025-12-21 18:38:39.340454 eth0  Out IP (tos 0x0, ttl 127, id 53636, offset 0, flags [DF], proto UDP (17), length 48)
    10.0.8.105.33545 > 74.125.250.129.19302: UDP, length 20
2025-12-21 18:38:39.341160 eth0  In  IP (tos 0x80, ttl 49, id 0, offset 0, flags [none], proto UDP (17), length 60)
    74.125.250.129.19302 > 10.0.8.105.34697: UDP, length 32
2025-12-21 18:38:39.342561 eth0  In  IP (tos 0x0, ttl 49, id 0, offset 0, flags [none], proto UDP (17), length 60)
    74.125.250.129.19302 > 10.0.8.105.33545: UDP, length 32
2025-12-21 18:38:39.356432 eth0  Out IP (tos 0x0, ttl 127, id 53637, offset 0, flags [DF], proto UDP (17), length 48)
    10.0.8.105.37937 > 74.125.250.129.19302: UDP, length 20
2025-12-21 18:38:39.357050 eth0  Out IP (tos 0x0, ttl 127, id 53638, offset 0, flags [DF], proto UDP (17), length 48)
    10.0.8.105.59746 > 74.125.250.129.19302: UDP, length 20
2025-12-21 18:38:39.358041 eth0  In  IP (tos 0x80, ttl 49, id 0, offset 0, flags [none], proto UDP (17), length 60)
    74.125.250.129.19302 > 10.0.8.105.37937: UDP, length 32
2025-12-21 18:38:39.359022 eth0  In  IP (tos 0x80, ttl 45, id 0, offset 0, flags [none], proto UDP (17), length 60)
    74.125.250.129.19302 > 10.0.8.105.59746: UDP, length 32
2025-12-21 18:38:43.594126 eth0  Out IP (tos 0x0, ttl 127, id 10878, offset 0, flags [DF], proto UDP (17), length 200)
    10.0.8.105.15904 > 168.86.138.199.11790: UDP, length 172
2025-12-21 18:38:43.614466 eth0  Out IP (tos 0x0, ttl 127, id 10879, offset 0, flags [DF], proto UDP (17), length 200)
    10.0.8.105.15904 > 168.86.138.199.11790: UDP, length 172
2025-12-21 18:38:43.634820 eth0  Out IP (tos 0x0, ttl 127, id 10881, offset 0, flags [DF], proto UDP (17), length 200)
    10.0.8.105.15904 > 168.86.138.199.11790: UDP, length 172
2025-12-21 18:38:43.654127 eth0  Out IP (tos 0x0, ttl 127, id 10882, offset 0, flags [DF], proto UDP (17), length 200)
    10.0.8.105.15904 > 168.86.138.199.11790: UDP, length 172
2025-12-21 18:38:43.674327 eth0  Out IP (tos 0x0, ttl 127, id 10884, offset 0, flags [DF], proto UDP (17), length 200)
    10.0.8.105.15904 > 168.86.138.199.11790: UDP, length 172
2025-12-21 18:38:43.693927 eth0  Out IP (tos 0x0, ttl 127, id 10886, offset 0, flags [DF], proto UDP (17), length 200)
    10.0.8.105.15904 > 168.86.138.199.11790: UDP, length 172
t
Thanks — good captures. I can see the SIP server is sending RTP to 168.86.138.199:11790 (your sip tcpdump), while the LiveKit pod capture shows RTP on the pod’s internal IP (10.0.10.237) — that indicates a media destination/address mismatch: the SIP server is sending to a different public IP/port than the LiveKit process that accepted the call is actually bound to. What to check and how to fix (quick steps): 1) Confirm the media addr:port in the SIP logs for this call • From the SIP server logs you already pasted, note the exact addr value (e.g., 168.86.138.199:11790). Share it if unsure. 2) Ensure LiveKit is advertising the same external IP/port it is reachable at • Check LiveKit SIP/network config:
advertise_ip
,
USE_EXTERNAL_IP
, and
rtp_port_range
. If LiveKit is behind NAT or running in k8s,
advertise_ip
must be set to the external IP that SIP servers should send media to (the IP shown in SIP logs). • If LiveKit is binding to the node’s internal IP (10.0.10.237) but advertising a different external IP, update
advertise_ip
to the external IP that matches the
addr
in the SIP logs, or set
USE_EXTERNAL_IP=true
so LiveKit advertises the node’s external IP. 3) Confirm the SIP server sends to the exact IP:port LiveKit advertised • The caller-side SDP / the 200 OK that your SIP server receives must contain the same IP:port LiveKit expects. If it contains a different IP, your SIP server will send RTP to the wrong place. • Capture or paste the SDP from the 200 OK (as seen by the SIP server) and I’ll verify. 4) If multiple LiveKit nodes exist (cluster), ensure per-call node affinity • The SIP logs must point to the same node that accepted the room. If LiveKit advertises a load‑balanced IP but the selected node’s IP differs, either: ◦ Ensure the SIP server sends to the node IP that the room was allocated on, or ◦ Use an RTP relay/proxy (rtpengine/rtpproxy) or configure LiveKit to advertise a stable external IP that forwards to the node. 5) Short-term workaround: use an RTP proxy or allow SIP server to send to advertised IP • If you cannot change advertise_ip immediately, deploy an RTP proxy (rtpengine/rtpproxy) or configure Kamailio to anchor media to the same IP that LiveKit is listening on. If you want, paste these 3 items and I’ll give the exact config change: • The exact
addr
value from the SIP log for the failing call. • Your LiveKit SIP/network config (
advertise_ip
,
USE_EXTERNAL_IP
,
rtp_port_range
). • The SDP from the 200 OK as seen by your SIP server (redact secrets). I’ll tell you the single line to change (or whether to enable
USE_EXTERNAL_IP
or set
advertise_ip
) to make the SIP server send RTP to the correct address.
m
LiveKit is auto-detecting 168.86.138.199 instead of each node's actual public IP (44.197.226.12 for this node). How do I fix this for aws
t
Thanks — that explains the mismatch. LiveKit is auto-detecting the wrong IP; you need to make it advertise each node’s real public IP so SIP RTP is sent to the correct address. Quick fix (AWS, single-node or per-node public IPs): 1) Set LiveKit to advertise the node’s public IP • In your LiveKit server config (or Helm values), set: ◦
advertise_ip: "44.197.226.12"
(replace with the node’s public IP) ◦ and/or set
USE_EXTERNAL_IP=true
if you want LiveKit to auto-use the instance public IP (only when host networking and instance public IPs are present). If you run LiveKit on multiple nodes with different public IPs, set each node’s advertise_ip to its own public IP (per-node config) rather than a single shared IP. 2) How to get the instance public IP on AWS (if you want to automate) • On the node: curl -s http://169.254.169.254/latest/meta-data/public-ipv4 3) Helm / k8s notes • If you deployed with the LiveKit Helm chart, add these to your values.yaml for the server pod(s): server: advertiseIp: "44.197.226.12" env: • name: USE_EXTERNAL_IP value: "true" • For per-node advertise IPs in k8s, run LiveKit with hostNetwork: true and set advertiseIp per DaemonSet/Node (or use a startup script that reads instance metadata and writes advertise_ip env var). 4) After change • Restart LiveKit pod/service on that node. • Make a new SIP call and verify the SIP log
addr
matches the advertised public IP. • Confirm with tcpdump that RTP from the SIP server is sent to that advertised IP:port and LiveKit logs show RTP packets received. If you want, tell me: • How you deployed LiveKit (Helm chart or static manifest), and whether you use hostNetwork: true. I’ll provide the exact values.yaml snippet or manifest change to apply.
m
under what section of the helm chart values should I add
USE_EXTERNAL_IP=true
?
t
Add it under the server environment vars in your Helm values. For the LiveKit chart, put it in
server.env
(or
server.envFrom
if you use a secret). Example snippet to add to values.yaml: server: env: • name: USE_EXTERNAL_IP value: "true" Optionally set a per-node
advertiseIp
instead of relying on auto-detection: server: advertiseIp: "44.197.226.12" After updating values.yaml, apply the change: 1. helm upgrade <release> livekit/livekit -f values.yaml 2. Restart the server pod on the node (or let Helm rollout). 3. Verify the SIP logs show the advertised media addr matches the node public IP and that RTP arrives. If you want, tell me whether you deployed via Helm with a Deployment or DaemonSet and I’ll give the exact values.yaml snippet for that setup.
m
does this look good
Copy code
# =============================================================================
# LiveKit Server Helm Values for Porter (AWS EKS)
# =============================================================================
# After installing this chart, you still need to:
# * Open ports on the firewall (see <https://docs.livekit.io/deploy/ports-firewall>)
# * Update DNS of hostnames to the ingress/service that were created

replicaCount: 1

# Graceful termination: 5 hours (allows existing sessions to complete)
terminationGracePeriodSeconds: 18000

# =============================================================================
# Host Networking (REQUIRED for WebRTC)
# =============================================================================
# LiveKit requires host networking to properly handle WebRTC UDP traffic
# This binds the pod directly to the node's network interface
podHostNetwork: true

# =============================================================================
# Environment Variables
# =============================================================================
# USE_EXTERNAL_IP: Auto-detect EC2 instance public IP from AWS metadata
# This allows LiveKit to advertise the correct public IP for each node
env:
  - name: USE_EXTERNAL_IP
    value: "true"

# =============================================================================
# LiveKit Server Configuration
# =============================================================================
livekit:
  # port: 7880
  # Uncomment to enable prometheus metrics
  # prometheus_port: 6789
  log_level: info

  # ---------------------------------------------------------------------------
  # RTC Configuration
  # ---------------------------------------------------------------------------
  rtc:
    use_external_ip: true
    port_range_start: 50000
    port_range_end: 60000
    tcp_port: 7881

  # ---------------------------------------------------------------------------
  # Redis Configuration
  # ---------------------------------------------------------------------------
  redis:
    address: "<redacted>"
    db: 0
    username: "default"
    password: "<redacted>"

  # ---------------------------------------------------------------------------
  # API Keys Configuration
  # Generate your own keys: <https://docs.livekit.io/guides/getting-started/#generate-api-key-and-secret>
  # Format: api_key: "api_secret"
  # ---------------------------------------------------------------------------
  keys:
    <redacted>: <redacted>

  # ---------------------------------------------------------------------------
  # TURN Server Configuration
  # ---------------------------------------------------------------------------
  turn:
    enabled: true
    # Must match domain of your TLS cert
    domain: <http://turn.lk-sandbox.featherhq.com|turn.lk-sandbox.featherhq.com>
    # TURN/TLS port - use 443 for best firewall traversal
    tls_port: 443


    secretName: livekit-turn-tls
    # AWS NLB annotations for TURN LoadBalancer
    loadBalancerAnnotations:
      <http://service.beta.kubernetes.io/aws-load-balancer-scheme|service.beta.kubernetes.io/aws-load-balancer-scheme>: "internet-facing"
      <http://service.beta.kubernetes.io/aws-load-balancer-type|service.beta.kubernetes.io/aws-load-balancer-type>: "external"
      <http://service.beta.kubernetes.io/aws-load-balancer-nlb-target-type|service.beta.kubernetes.io/aws-load-balancer-nlb-target-type>: "ip"

# =============================================================================
# Load Balancer Configuration
# =============================================================================
loadBalancer:
  type: alb
  tls:
    - hosts:
        - <redacted>
  # ALB annotations for timeout and WebSocket support
  annotations:

    <http://alb.ingress.kubernetes.io/load-balancer-attributes|alb.ingress.kubernetes.io/load-balancer-attributes>: idle_timeout.timeout_seconds=3600
t
This looks good — you’ve set the right flags for AWS. A few small notes and the exact next steps to make LiveKit advertise each node’s real public IP: 1) Your env + rtc settings • You set
USE_EXTERNAL_IP=true
and
rtc.use_external_ip: true
— that will make LiveKit auto-detect the EC2 instance public IP via instance metadata and advertise it in SIP/SDP. Having both is redundant but harmless. 2) Port range • You set
port_range_start: 50000
/
port_range_end: 60000
. Ensure your AWS security groups and node host firewalls allow inbound UDP for that full range and outbound to peers. 3) hostNetwork / advertise behavior • Because you’re using host networking (
podHostNetwork: true
), LiveKit will bind to the node NICs and the instance public IP detection will work correctly. 4) Apply & verify • Update values.yaml, then: a. helm upgrade <release> livekit/livekit -f values.yaml b. Confirm pod restarted on the node (or force a restart on each node so it picks up its instance metadata). c. Make a SIP call and check the LiveKit SIP logs — the
addr
field should now show the node’s public IP (44.197.226.12) and a per-call port. d. Verify RTP arrives at that IP:port with tcpdump on the node: • sudo tcpdump -n -i <iface> udp and port <logged_port> -c 20 5) If you run multiple nodes • Deploy the same values on each node (hostNetwork true + USE_EXTERNAL_IP). Each node will auto-advertise its own public IP. If you need a different per-node value, use
livekit.advertiseIp
per-node or init logic to set advertise_ip from metadata. If you want, I can provide the exact values.yaml snippet formatted for your Helm release name and a command to restart pods safely. Which release name did you use for the Helm chart?
m
these are the logs I am getting now
Copy code
2025-12-22T05:58:18.819Z        INFO    livekit redis/redis.go:142      connecting to redis     {"simple": true, "addr": "livekit-redis-sandbox-redis-headless.default.svc.cluster.local:6379"}
2025-12-22T05:58:19.950Z        WARN    livekit rtcconfig/ip.go:272     could not validate external IP  {"ip": "44.197.226.12", "error": "context canceled"}
2025-12-22T05:58:19.950Z        WARN    livekit rtcconfig/ip.go:272     could not validate external IP  {"ip": "44.197.226.12", "error": "context canceled"}
2025-12-22T05:58:19.950Z        WARN    livekit rtcconfig/ip.go:272     could not validate external IP  {"ip": "44.197.226.12", "error": "context canceled"}
2025-12-22T05:58:19.950Z        WARN    livekit rtcconfig/ip.go:272     could not validate external IP  {"ip": "44.197.226.12", "error": "context canceled"}
2025-12-22T05:58:19.974Z        INFO    livekit rtcconfig/webrtc_config.go:276  failed to get external ip       {"local": "169.254.20.10", "err": "context canceled"}
2025-12-22T05:58:19.974Z        INFO    livekit rtcconfig/webrtc_config.go:276  failed to get external ip       {"local": "10.0.14.162", "err": "context canceled"}
2025-12-22T05:58:19.974Z        INFO    livekit rtcconfig/webrtc_config.go:276  failed to get external ip       {"local": "169.254.170.23", "err": "context canceled"}
2025-12-22T05:58:19.974Z        INFO    livekit rtcconfig/webrtc_config.go:276  failed to get external ip       {"local": "172.20.0.10", "err": "context canceled"}
2025-12-22T05:58:19.974Z        INFO    livekit rtcconfig/webrtc_config.go:102  using external IPs      {"ips": ["44.197.226.12/10.0.10.237", "169.254.170.23/169.254.170.23", "169.254.20.10/169.254.20.10", "172.20.0.10/172.20.0.10", "10.0.14.162/10.0.14.162"]}
2025-12-22T05:58:19.976Z        INFO    livekit service/turn.go:145     Starting TURN server    {"turn.relay_range_start": 30000, "turn.relay_range_end": 40000, "turn.portTLS": 443, "turn.externalTLS": false}
2025-12-22T05:58:19.979Z        INFO    livekit service/server.go:265   starting LiveKit server {"portHttp": 7880, "nodeID": "ND_zgY4nnsf2XSJ", "nodeIP": "44.197.226.12", "version": "1.9.0", "rtc.portTCP": 7881, "rtc.portICERange": [50000, 60000]}
2025-12-22T05:58:23.891Z        INFO    livekit.agents  service/agentservice.go:298     worker registered       {"namespace": "", "jobType": "JT_ROOM", "agentName": "sandbox_agent", "workerID": "AW_VURE69CtgKqm"}
t
Thanks — I reviewed the new LiveKit logs. What changed / what these logs mean • LiveKit is now advertising the node public IP: it shows nodeIP "44.197.226.12" and registered the worker. • The repeated "could not validate external IP ... context canceled" messages are warnings from the external-IP validation probe timing out and are harmless — LiveKit still uses the
44.197.226.12
value in SDP as shown by "using external IPs". Next steps to confirm full two‑way audio 1. Make a test SIP call and confirm the SIP server log shows the media destination
addr
with the same public IP (e.g., 44.197.226.12:<port>). 2. On the LiveKit node, capture packets on that per‑call port to confirm inbound RTP arrives: ◦ sudo tcpdump -n -i <iface> udp and host 44.197.226.12 and port <logged_port> -c 50 1. Ensure AWS security groups / host firewalls allow UDP 50000–60000 inbound to the node and outbound from your SIP server. 2. Verify LiveKit receives packets (tcpdump on node shows packets) and server logs show non-zero packet counts for the call. If packets arrive but LiveKit still reports zero, paste the capture and the SIP/LiveKit logs for the same call. If you want, run one test call now and paste: • The SIP server log lines showing
setting media destination
(addr) for that call. • The LiveKit SIP log lines for that call. • The first 20 lines of the tcpdump capture for the media port. I’ll tell you exactly whether to update security group rules, change advertise settings, or adjust anything else.
m
logs from SIP 2025-12-22T055842.500Z INFO sip sip/client.go:117 client starting {"nodeID": "NE_NFPk9cnW3ydQ", "local": "10.0.37.27", "external": "54.147.135.13"} 2025-12-22T055842.500Z INFO sip sip/server.go:281 server starting {"nodeID": "NE_NFPk9cnW3ydQ", "local": "10.0.37.27", "external": "54.147.135.13"} 2025-12-22T055842.500Z INFO sip sip/server.go:216 sip signaling listening on {"nodeID": "NE_NFPk9cnW3ydQ", "local": "10.0.37.27", "external": "54.147.135.13", "port": 5060, "announce-port": 5060, "proto": "udp"} 2025-12-22T055842.500Z INFO sip sip/server.go:239 sip signaling listening on {"nodeID": "NE_NFPk9cnW3ydQ", "local": "10.0.37.27", "external": "54.147.135.13", "port": 5060, "announce-port": 5060, "proto": "tcp"} 2025-12-22T060140.225Z INFO sip sip/client.go:268 Creating SIP participant {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017"} 2025-12-22T060140.225Z INFO sip sip/media_port.go:325 media timeout disabled {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false} 2025-12-22T060140.301Z INFO sip v2@v2.11.4-0.20251016050252-63f7c8381817/localparticipant.go:140 published track {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "name": "+16263141017", "source": "MICROPHONE", "trackID": "TR_AMumUExCqinNuM"} 2025-12-22T060140.336Z INFO sip sip/outbound.go:854 auth requested {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "sipCallID": "Xjl3136EMe2u9d56IwL5sGSYfpc", "status": 407, "body": ""} 2025-12-22T060147.876Z INFO sip sip/media_port.go:574 using codecs {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "audio-codec": "PCMU/8000", "audio-rtp": 0, "dtmf-rtp": 101, "srtp": ""} 2025-12-22T060147.876Z INFO sip sip/media_port.go:189 setting media destination {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "addr": "168.86.139.67:15718"} 2025-12-22T060147.876Z INFO sip sip/media_port.go:347 media timeout enabled {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "initial": "30s", "timeout": "15s"} 2025-12-22T060147.877Z INFO sip sip/media_port.go:386 media timeout reset {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "packets": 0, "tick": "15s"} 2025-12-22T060147.877Z INFO sip sip/outbound.go:387 Outbound SIP call established {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA92c96c73d24cb0867f7e1dc49c2553ac"} 2025-12-22T060147.998Z INFO sip v2@v2.11.4-0.20251016050252-63f7c8381817/remoteparticipant.go:121 track subscribed {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "participant": "agent-AJ_bpEBvKCwDWk2", "trackID": "TR_AMdADCnXS3PHJy", "kind": "audio"} 2025-12-22T060147.998Z INFO sip sip/room.go:315 mixing track {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "participant": "agent-AJ_bpEBvKCwDWk2", "pID": "PA_s36MJRzUwG4W", "trackID": "TR_AMdADCnXS3PHJy", "trackName": "roomio_audio", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "roomID": "RM_nbHPNPBj2YKe"} 2025-12-22T060207.290Z INFO sip sip/client.go:339 BYE from remote {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA92c96c73d24cb0867f7e1dc49c2553ac"} 2025-12-22T060207.290Z INFO sip sip/outbound.go:308 Closing outbound call {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA92c96c73d24cb0867f7e1dc49c2553ac", "reason": "bye"} 2025-12-22T060207.295Z INFO sip sip/media_port.go:200 setting media source {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "addr": "invalid AddrPort"} 2025-12-22T060207.295Z INFO sip service/service.go:258 SIP call ended {"nodeID": "NE_NFPk9cnW3ydQ", "callID": "SCL_wz4jAhbJRAVZ", "reason": "bye"} 2025-12-22T060207.295Z INFO sip sip/media.go:116 call statistics {"nodeID": "NE_NFPk9cnW3ydQ", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_wz4jAhbJRAVZ", "traceID": "777a346a4168624a", "room": "dispatch-audio-call-d1a70128-3342-4c46-a784-128f38f40e14", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA92c96c73d24cb0867f7e1dc49c2553ac", "stats": {"port":{"streams":0,"packets":0,"packets_ignored":0,"packets_input":0,"mux_packets":0,"mux_bytes":0,"audio_packets":0,"audio_bytes":0,"audio_in_frames":0,"audio_in_samples":0,"audio_out_frames":971,"audio_out_samples":155360,"audio_rx":0,"audio_tx":5739.162226523938,"dtmf_packets":0,"dtmf_bytes":0,"closed":true},"room":
t
Thanks — the SIP logs show LiveKit advertised the public addr (168.86.139.67:15718) which is correct, but the call stats still show zero inbound packets. That means RTP from the SIP side isn't reaching the LiveKit process on that port. Please check these items in order and paste the requested capture if you can: 1) AWS security groups / host firewall • Ensure inbound UDP to the node's public IP on your RTP range (50000–60000) and the per-call port (e.g., 15718) is allowed from the SIP provider (Twilio IPs). • Ensure no host firewall (iptables/nft) is blocking those ports. 2) Confirm SIP server is sending to the advertised IP:port • On the SIP server node, capture outbound to the advertised addr: sudo tcpdump -n -i <iface> host 168.86.139.67 and udp and port 15718 -c 50 • If that shows no packets, your SIP server is not sending to the advertised IP/port — share the output. 3) Confirm LiveKit host receives packets • On the LiveKit node, run: sudo tcpdump -n -i <iface> udp port 15718 -c 50 • Paste the first 20 lines (or say “no packets”). If you see packets, LiveKit should log non-zero packet counts; share the capture if LiveKit still shows zero. 4) Check that LiveKit is bound to the advertised port/IP • On the LiveKit node run: sudo ss -lunp | grep 15718 • If no process is bound, LiveKit may not be listening on that port — paste the output. 5) Short tests / workarounds • Temporarily allow the whole RTP range from the SIP provider in the SG and retest. • If packets arrive at the node but LiveKit doesn't count them, we can check LiveKit binding or host networking settings. One more note: the "invalid AddrPort" after BYE is normal on call teardown and not the root cause. If you share the tcpdump outputs from steps 2 and 3 and the ss output from step 4, I’ll tell you the exact network rule to change or the config line to update so inbound RTP reaches LiveKit.
m
the security group allows inbound traffic from app IP(4&6) to ports 10000-60000 web calling is working with audio going to and fro phone calls are still broken with audio only being streamed to the outbound caller and their response is not coming back to us
t
Thanks — you’ve done a great job narrowing this down. Web calls work because both endpoints are inside your LiveKit cluster path, while PSTN/SIP calls rely on external RTP hitting the correct LiveKit node IP/port. From the evidence: • Agent → caller audio is delivered (LiveKit publishes/mixes agent audio). • Caller → LiveKit audio is not received (SIP call stats show packets: 0). • SIP server is sending RTP to the IP/port LiveKit advertised for the call (e.g., 168.86.139.67:15718). • Your current security group allows RTP only from “app IP(4&6)” (the app network) to 10000–60000, not from the SIP provider or SIP server external IPs. Next action (fastest, most likely fix) 1. Update the node security group to allow inbound UDP 10000–60000 (and the per-call port if you prefer narrower rules) from: ◦ Your SIP server public IP(s) (e.g., 54.147.135.13) and any Kamailio/NLB public IPs that may send media. ◦ Your SIP provider (Twilio) IP ranges — Twilio publishes those ranges; allow them if calls come from Twilio. 1. Re-test a phone call immediately after updating the SG. Verification steps after updating SG • On LiveKit node during the call: ◦ tcpdump: sudo tcpdump -n -i <iface> udp and host <advertised_IP> and port <advertised_port> -c 20 ◦ LiveKit logs should show non-zero packet counts for the call. • If still zero, run on SIP server: ◦ sudo tcpdump -n -i <iface> host <advertised_IP> and udp and port <advertised_port> -c 20 ◦ If SIP server shows outbound RTP but LiveKit capture shows none, paste both captures and I’ll diagnose routing/firewall between them. If you want, I can: • Provide the exact security-group rules to add (CIDRs and ports) — tell me the SIP server public IPs and whether Twilio is your provider and I’ll draft them. • Review tcpdump outputs if you run the captures above.
m
I have allowed all incoming and outgoing traffic still the audio from caller is not being sent to the livekit server
t
Thanks — I know this has been frustrating. Since you’ve opened all ports and web calling works, the most likely remaining cause is a node/address mismatch: the SIP server may be sending RTP to a different IP/port than the LiveKit process that actually owns the room. Quick targeted checks (please run and paste results): 1) Which LiveKit node owns the room • From LiveKit logs for the call, find the room allocation line (it shows selectedNodeID or nodeIP). Paste that block. 2) Exact media destination the SIP server sent to • From the SIP logs you already have the
addr
value (e.g., 168.86.139.67:15718). Confirm and paste that exact addr for the failing call. 3) Verify outbound packets from the SIP server • On the SIP server during a failing call: sudo tcpdump -n -i <iface> host <addr_ip> and udp and port <addr_port> -c 20 • Paste first 10–20 lines (or say “no packets”). 4) Verify inbound packets on the LiveKit node that owns the room • On the LiveKit node identified in (1): sudo tcpdump -n -i <iface> udp and port <addr_port> -c 20 • Paste first 10–20 lines (or say “no packets”). 5) Confirm LiveKit is bound/listening on that port on that node • On that LiveKit node: sudo ss -lunp | grep <addr_port> • Paste the output. What to look for and next steps I’ll give based on results: • If SIP server shows outbound RTP to the same addr but LiveKit node shows no inbound packets → network path/NAT/firewall between SIP server and that specific LiveKit node still blocking; we’ll check route/security groups and provider IPs. • If SIP server sends to a different IP than the LiveKit node owns → fix by making LiveKit advertise the correct per-node public IP (use
USE_EXTERNAL_IP=true
or set
advertise_ip
per node), or update SIP server to send to the node IP in the SIP/SDP. • If packets arrive at the node but LiveKit isn’t counting them and
ss
shows no listener → LiveKit may not be bound on that port; confirm hostNetwork, rtp range, and restart LiveKit with correct advertise config. • If packets arrive and LiveKit shows non-zero packets but the caller still hears nothing, we’ll inspect codec negotiation (PCMU/OPUS) and mixing. Share the outputs for (1)-(5) and I’ll give the exact single change to restore two-way audio.
m
Copy code
2025-12-22T06:49:38.188Z        INFO    livekit service/roommanager.go:394      starting RTC session    {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "agent-AJ_iA4N3XdHGPeH", "pID": "PA_kxD9C6QQyqCv", "remote": false, "room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "nodeID": "ND_zgY4nnsf2XSJ", "numParticipants": 0, "participantInit": {"Identity": "agent-AJ_iA4N3XdHGPeH", "Reconnect": false, "ReconnectReason": "RR_UNKNOWN", "AutoSubscribe": true, "Client": {"sdk": "PYTHON", "version": "1.0.20", "protocol": 16}, "Grants": {"Identity": "", "Kind": "agent", "Video": {"RoomCreate": false, "RoomList": false, "RoomRecord": false, "RoomAdmin": false, "RoomJoin": true, "Room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "CanPublish": true, "CanSubscribe": true, "CanPublishData": true, "CanPublishSources": [], "CanUpdateOwnMetadata": true, "IngressAdmin": false, "Hidden": false, "Recorder": false, "Agent": true, "CanSubscribeMetrics": false, "DestinationRoom": ""}, "SIP": {}, "RoomConfig": {}, "RoomPreset": ""}, "Region": "", "AdaptiveStream": false, "ID": "", "SubscriberAllowPause": "not-set", "DisableICELite": false, "CreateRoom": {"name": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f"}}}
2025-12-22T06:49:38.190Z        INFO    livekit service/roommanager.go:945      created TURN password   {"username": "2NUc5FVU2MUOEh3afKIo47GygZGYGTGcyRmygJmaqRmkgKI", "password": "21BC5v5ndcJUZQXg1hiLwld3efReBPUT9kkbfBtmrYuD"}
2025-12-22T06:49:38.555Z        INFO    livekit agent/client.go:173     failed to send job request      {"error": "no response from servers", "namespace": "", "jobType": "JT_ROOM", "agentName": ""}
2025-12-22T06:49:39.253Z        INFO    livekit rtc/room.go:480 participant active      {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "agent-AJ_iA4N3XdHGPeH", "pID": "PA_kxD9C6QQyqCv", "remote": false, "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 44.197.226.12:58513 (resolved: 44.197.226.12:58513)", "[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][trickle] udp4 host 169.254.170.23:55850 (resolved: 169.254.170.23:55850)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp6 host [fd00:ec2::23]:53079 (resolved: [fd00:ec2::23]:53079)", "[local][trickle] tcp6 host [fd00:ec2::23]:7881 (resolved: [fd00:ec2::23]:7881)", "[local][trickle] udp4 host 10.0.14.162:58086 (resolved: 10.0.14.162:58086)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[remote][trickle] udp4 host 10.78.90.205:43482", "[remote][selected:1] udp4 prflx 52.5.117....:46797"], "connectionType": "udp", "clientInfo": {"sdk": "PYTHON", "version": "1.0.20", "protocol": 16}}
2025-12-22T06:49:40.091Z        INFO    livekit service/roommanager.go:394      starting RTC session    {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "nodeID": "ND_zgY4nnsf2XSJ", "numParticipants": 1, "participantInit": {"Identity": "+16263141017", "Reconnect": false, "ReconnectReason": "RR_UNKNOWN", "AutoSubscribe": false, "Client": {"sdk": "GO", "version": "2.11.3", "protocol": 16, "os": "linux"}, "Grants": {"Identity": "", "Kind": "sip", "Video": {"RoomCreate": false, "RoomList": false, "RoomRecord": false, "RoomAdmin": false, "RoomJoin": true, "Room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "CanPublish": true, "CanSubscribe": true, "CanPublishData": true, "CanPublishSources": [], "CanUpdateOwnMetadata": true, "IngressAdmin": false, "Hidden": false, "Recorder": false, "Agent": false, "CanSubscribeMetrics": "not-set", "DestinationRoom": ""}, "SIP": {}, "RoomConfig": {}, "RoomPreset": ""}, "Region": "", "AdaptiveStream": false, "ID": "", "SubscriberAllowPause": "not-set", "DisableICELite": false, "CreateRoom": {"name": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f"}}}
2025-12-22T06:49:40.093Z        INFO    livekit service/roommanager.go:945      created TURN password   {"username": "T1GT2djeO6s3shGxeVQQx3NkBzMwMmM4kjMlBTM1UjMJBVQ", "password": "vcf0pZZwUhfdaotBVLfyBQLpL7o1dvCiPRMhZfcBiZaD"}
2025-12-22T06:49:40.575Z        INFO    livekit.pub     rtc/participant.go:1930 mediaTrack published    {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "agent-AJ_iA4N3XdHGPeH", "pID": "PA_kxD9C6QQyqCv", "remote": false, "kind": "audio", "trackID": "TR_AMq78ppDEDGzm7", "webrtcTrackID": "ea89f5af-188a-4114-8a15-bfb7f2664762", "rid": "", "SSRC": 1027421501, "mime": "audio/red", "trackInfo": {"sid": "TR_AMq78ppDEDGzm7", "type": "AUDIO", "name": "roomio_audio", "source": "MICROPHONE", "mimeType": "audio/red", "mid": "0", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766386180574902}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true}
2025-12-22T06:49:41.146Z        INFO    livekit rtc/room.go:480 participant active      {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "publisherCandidates": ["[local][selected:1][trickle] udp4 host 44.197.226.12:53958 (resolved: 44.197.226.12:53958)", "[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][trickle] udp4 host 169.254.170.23:58516 (resolved: 169.254.170.23:58516)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp6 host [fd00:ec2::23]:53819 (resolved: [fd00:ec2::23]:53819)", "[local][trickle] tcp6 host [fd00:ec2::23]:7881 (resolved: [fd00:ec2::23]:7881)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[local][trickle] udp4 host 10.0.14.162:55407 (resolved: 10.0.14.162:55407)", "[remote][trickle] udp4 host 10.0.8.105:60255", "[remote][selected:1] udp4 prflx 44.197.226...:61386", "[remote][trickle] udp4 srflx 44.197.226...:21920  related 0.0.0.0:36121", "[remote][trickle] udp4 srflx 44.197.226...:12761  related 0.0.0.0:36035", "[remote][trickle] udp4 srflx 44.197.226...:27475  related 0.0.0.0:35230", "[remote][trickle] udp4 relay 44.197.226...:30046  related 10.0.8.105:35898"], "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 44.197.226.12:55471 (resolved: 44.197.226.12:55471)", "[local][trickle] tcp4 host 44.197.226.12:7881 (resolved: 44.197.226.12:7881)", "[local][trickle] udp4 host 169.254.170.23:52816 (resolved: 169.254.170.23:52816)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp6 host [fd00:ec2::23]:57543 (resolved: [fd00:ec2::23]:57543)", "[local][trickle] tcp6 host [fd00:ec2::23]:7881 (resolved: [fd00:ec2::23]:7881)", "[local][trickle] udp4 host 10.0.14.162:51958 (resolved: 10.0.14.162:51958)", "[local][trickle] tcp4 host 10.0.14.162:7881 (resolved: 10.0.14.162:7881)", "[remote][trickle] udp4 host 10.0.8.105:54647", "[remote][trickle] udp4 srflx 44.197.226...:38090  related 0.0.0.0:41282", "[remote][trickle] udp4 srflx 44.197.226...:49072  related 0.0.0.0:41051", "[remote][trickle] udp4 srflx 44.197.226...:58265  related 0.0.0.0:50180", "[remote][trickle] udp4 relay 44.197.226...:30253  related 10.0.8.105:35892", "[remote][selected:1] udp4 prflx 10.0.8.105:54647"], "connectionType": "udp", "clientInfo": {"sdk": "GO", "version": "2.11.3", "protocol": 16, "os": "linux"}}
2025-12-22T06:49:41.172Z        INFO    livekit.pub     rtc/participant.go:1930 mediaTrack published    {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "kind": "audio", "trackID": "TR_AMvdZ7QGQfc2HJ", "webrtcTrackID": "audio", "rid": "", "SSRC": 3404613937, "mime": "audio/opus", "trackInfo": {"sid": "TR_AMvdZ7QGQfc2HJ", "type": "AUDIO", "name": "+16263141017", "source": "MICROPHONE", "mimeType": "audio/opus", "mid": "1", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766386181171534}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true}
2025-12-22T06:49:42.554Z        INFO    livekit agent/client.go:146     not dispatching agent job since no worker is available  {"agentName": "sandbox_agent", "jobType": "JT_PARTICIPANT", "room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8"}
2025-12-22T06:49:42.554Z        INFO    livekit agent/client.go:146     not dispatching agent job since no worker is available  {"agentName": "sandbox_agent", "jobType": "JT_PUBLISHER", "room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8"}
2025-12-22T06:49:45.084Z        INFO    livekit.api     service/twirp.go:128    API SIP.CreateSIPParticipant    {"service": "SIP", "method": "CreateSIPParticipant", "room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "participant": "+16263141017", "toUser": "+16263141017", "trunkID": "ST_p9rVLLmUkc9E", "callID": "SCL_iTkh2qo69D5f", "fromUser": "+18444671810", "toHost": "<http://aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com|aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>", "duration": "5.221095428s", "status": "200"}
2025-12-22T06:49:45.176Z        INFO    livekit.sub     sfu/forwarder.go:2101   starting with dummy forwarding  {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "trackID": "TR_AMq78ppDEDGzm7", "relayed": false, "subscriberID": "PA_b46ogGz7vLmS:1766386185057937932", "sequenceNumber": 45560, "timestamp": 2959735778, "preStartTime": "2025-12-22T06:49:45.176Z"}
2025-12-22T06:49:45.394Z        INFO    livekit.sub     sfu/forwarder.go:1794   calculating dummyStartTSOffset  {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "trackID": "TR_AMq78ppDEDGzm7", "relayed": false, "subscriberID": "PA_b46ogGz7vLmS:1766386185057937932", "preStartTime": "2025-12-22T06:49:45.176Z", "extFirstTS": 2959735778, "timeSinceFirst": "217.173522ms", "rtpDiff": 10424, "extRefTS": 2959746202, "incomingTS": 2152705585, "referenceLayerSpatial": 0, "dummyStartTSOffset": 807040617}
2025-12-22T06:50:06.638Z        WARN    livekit.transport       rtc/transport.go:851    error reading data channel      {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "transport": "PUBLISHER", "label": "_lossy", "error": "[0x4001f125a0] abort chunk, with following errors: (User Initiated Abort: )"}
2025-12-22T06:50:06.638Z        WARN    livekit.transport       rtc/transport.go:851    error reading data channel      {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "transport": "PUBLISHER", "label": "_reliable", "error": "[0x4001f125a0] abort chunk, with following errors: (User Initiated Abort: )"}
2025-12-22T06:50:06.640Z        INFO    livekit rtc/participant.go:1097 participant closing     {"room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "roomID": "RM_jhi5EqMpNSw8", "participant": "+16263141017", "pID": "PA_b46ogGz7vLmS", "remote": false, "sendLeave": true, "reason": "CLIENT_REQUEST_LEAVE", "isExpectedToResume": false}
t
Thanks — the logs show the room was allocated on node ND_zgY4nnsf2XSJ (public IP 44.197.226.12) and the SIP participant published an audio track, but caller audio still shows as 0 packets. The most likely remaining causes: • The SIP server is sending RTP to a different IP/port than the LiveKit node that owns the room (media destination mismatch), or • RTP is arriving at the LiveKit host but not being delivered into the LiveKit process (binding/firewall/host-network mismatch). Please run these 3 quick checks and paste the outputs so I can give the exact single fix: 1) SIP server — media destination logged for this call • From your SIP server logs for the same call, paste the line containing "setting media destination" (it shows the addr value like 168.86.x.x:port). Confirm the exact addr. 2) SIP server — outbound capture showing where RTP is being sent • On the SIP server during a test call: sudo tcpdump -n -i <iface> host <media_addr_ip> and udp and port <media_port> -c 20 • Paste the first 10–20 lines (or say “no packets”). 3) LiveKit node that owns the room — inbound capture on that port • On the LiveKit node that owns the room (nodeIP shown in LiveKit logs; e.g., 44.197.226.12): sudo tcpdump -n -i <iface> udp and port <media_port> -c 20 • Paste the first 10–20 lines (or say “no packets”). What I’ll conclude from each result: • SIP outbound shows packets to the same addr and LiveKit inbound shows the same packets → LiveKit should receive them; if still zero, I’ll check process binding and hostNetwork config and tell you the exact config line to change. • SIP outbound shows packets to a different addr than LiveKit advertised → update LiveKit advertise_ip (or ensure the SIP server uses the media addr from the 200OK/SDP) — I’ll give the exact one-line change (USE_EXTERNAL_IP or advertiseIp) or the SIP server config tweak. • SIP shows no outbound RTP → SIP server/endpoint (pjsua/Kamailio) isn’t sending; I’ll point to the pjsua/Kamailio SDP or config line to change. If you paste those three outputs now I’ll tell you the single command or config edit to fix it.
m
media destination: setting media destination {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_iTkh2qo69D5f", "traceID": "69546b6832716f36", "room": "dispatch-audio-call-35889784-239d-4586-89c9-77e3036e895f", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "addr": "168.86.138.224:19392"}
t
Thanks — the SIP server is sending RTP to 168.86.138.224:19392 (from your last log), while the room was allocated on node 44.197.226.12. That node mismatch is why LiveKit sees zero inbound packets. What to do next (quick, exact steps): 1) Confirm how many LiveKit nodes and their public IPs • Run: kubectl get pods -o wide -n <ns> (or list your nodes) and paste the public IPs. I need to know if multiple LiveKit nodes exist. 2) Verify where RTP actually lands • On the SIP server, run: sudo tcpdump -n -i <iface> host 168.86.138.224 and udp and port 19392 -c 20 • On the LiveKit node that owns the room (44.197.226.12), run: sudo tcpdump -n -i <iface> udp and port 19392 -c 20 Paste the outputs (or say “no packets” for either). 3) Fix options depending on results • If SIP server sends to 168.86.138.224 and packets do NOT arrive at 44.197.226.12: ◦ Either make LiveKit advertise 168.86.138.224 on the node that owns the room, or ensure the SIP server sends to 44.197.226.12. Easiest fix: set per-node advertise IPs (or ensure USE_EXTERNAL_IP is returning each node’s real public IP). I can give the exact Helm/values change once you confirm deployment method. • If packets arrive at 44.197.226.12 but LiveKit still reports zero: ◦ Run: sudo ss -lunp | grep 19392 on that node and paste output — we’ll check whether LiveKit is bound/listening on that port. • If you run multiple LiveKit nodes behind a load balancer: ◦ Ensure SIP dispatch targets the same node that was allocated for the room (session affinity) OR configure LiveKit to advertise a stable public IP that traffic is routed to and forwarded to the selected node (or use an RTP proxy). If you tell me: • How many LiveKit nodes and their IPs, and • The tcpdump outputs requested in step 2, I’ll give the single exact change (helm values or security rule) to make the SIP server send RTP to the correct node and restore caller → LiveKit audio.
m
there is only one livekit node and only one instance of SIP server running the tcpdump logs stop after I disconnect the call (on both servers) log from livekit server: 2025-12-22 071058.155991 eth0 In IP (tos 0xb8, ttl 126, id 56781, offset 0, flags [DF], proto UDP (17), length 200) 168.86.138.207.16564 > 10.0.10.237.19172: [udp sum ok] UDP, length 172 0x0000: 45b8 00c8 ddcd 4000 7e11 d58c a856 8acf E.....@.~....V.. 0x0010: 0a00 0aed 40b4 4ae4 00b4 8a9b 8000 8032 ....@.J........2 0x0020: 0001 bd00 0a43 1304 7f7f 7f7f 7f7f 7f7f .....C.......... 0x0030: 7f7f 7f7e 7e7e 7e7f 7f7f 7f7f 7f7f 7f7f ...~~......... 0x0040: 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f ................ 0x0050: 7f7f 7f7f 7f7f 7f7f 7f7e 7e7e 7f7e 7e7f .........~.~~. 0x0060: 7e7f 7f7f 7f7e 7e7e 7e7e 7e7e 7e7e 7e7e ~....~~~~~~~~~~~ 0x0070: 7e7e 7e7e 7e7e 7e7f 7e7e 7e7e 7e7e 7f7f ~~~~~~~.~~~~~~.. 0x0080: 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7e ...............~ 0x0090: 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f ................ 0x00a0: 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f ................ 0x00b0: 7f7f 7f7f 7f7e 7f7f 7f7f 7f7f 7f7e 7f7f .............. 0x00c0: 7f7f 7f7f 7f7f 7e7f ......~. 2025-12-22 071058.164785 eni7a67d19b1dc In IP (tos 0x0, ttl 127, id 27204, offset 0, flags [DF], proto UDP (17), length 200) 10.0.8.105.19172 > 168.86.138.207.16564: [bad udp cksum 0x4654 -> 0xd67e!] kip 12140.126.255 > 8380.92.255: at-#255 156 0x0000: 4500 00c8 6a44 4000 7f11 4b52 0a00 0869 E...jD@...KR...i 0x0010: a856 8acf 4ae4 40b4 00b4 4654 8000 02c5 .V..J.@...FT.... 0x0020: 0001 bb20 bc2f 6c5c 7eff ffff ffff ffff ...../l\~....... 0x0030: ffff ffff ffff ffff ffff ffff ffff ffff ................ 0x0040: ffff ffff ffff ffff ffff 7e7e ffff ffff ..........~~.... 0x0050: ffff ffff ff7e ffff ffff ffff ffff ffff .....~.......... 0x0060: ffff ffff ffff ffff ffff ffff ff7e ffff .............~.. 0x0070: 7eff ffff ffff ffff 7e7e 7eff ffff ff7e ~.......~....~ 0x0080: ff7e ffff ffff ffff ff7e ff7e ff7e 7eff ..........~. 0x0090: 7eff ffff ff7e ffff ffff ffff ffff ffff .............. 0x00a0: ffff ffff ffff ffff ff7e ffff ff7e ffff .............. 0x00b0: ffff ffff ffff ffff ff7e ffff ff7e ffff .............. 0x00c0: ffff ffff ff7e 7eff . log from SIP 2025-12-22 071100.059312 eth0 In IP (tos 0x0, ttl 255, id 47428, offset 0, flags [DF], proto UDP (17), length 136) 10.0.10.237.58526 > 10.0.8.105.38039: [bad udp cksum 0x27db -> 0x0d04!] UDP, length 108 0x0000: 4500 0088 b944 4000 ff11 9aca 0a00 0aed E....D@......... 0x0010: 0a00 0869 e49e 9497 0074 27db 80ef 13b5 ...i.....t'..... 0x0020: ba58 8dd7 b8b0 171c 342d d08a bffc 705a .X......4-....pZ 0x0030: 87ff 002f 5ff2 6b53 03f0 e18d 0f99 1437 .../_.kS.......7 0x0040: a9aa e0e6 033a 8884 3030 dd37 0de7 c245 .....:..00.7...E 0x0050: 9091 6945 8311 2482 d93d daf6 9ad5 2423 ..iE..$..=....$# 0x0060: b9be bfdc 537a 573a 4ee0 149a 2a97 5965 ....SzW:N...*.Ye 0x0070: e665 a06e f82d ce4c d456 d29d 7aa8 1ebe .e.n.-.L.V..z... 0x0080: d2f6 52d9 8fde bb65
t
Thanks — the captures show RTP is reaching the LiveKit host (packets to 10.0.10.237:19172) and the LiveKit host is sending RTP back toward the SIP server. That means the network path is OK. The remaining problem is that LiveKit is not processing the inbound packets on that port. Key mismatch I see: your LiveKit rtc port range is 50000–60000, but the SIP leg is sending to port 19172. LiveKit will only accept RTP on ports it is configured/bound to. Please do the following checks and then one quick fix: 1) Check whether LiveKit is listening on the call port (run on the LiveKit node) • sudo ss -lunp | grep 19172 Paste the output (or “no output”). 2) Confirm the RTP port range LiveKit is configured to use (from your running pod logs or values.yaml) • You showed rtc.port_range_start: 50000 and port_range_end: 60000 earlier — confirm that is the effective runtime config. 3) If LiveKit is NOT listening on 19172: • That confirms the port is outside LiveKit’s configured RTP range. Two options: a) (Preferred) Make SIP server send RTP to a port inside LiveKit’s configured range (recommended). Ensure the SIP server/SDP uses a port in 50000–60000. b) (Alternative) Expand LiveKit’s RTP port range to include 19172 by updating your Helm values and rolling the server. Exact Helm change to expand the range (example to include 19172): • In values.yaml under livekit.rtc: port_range_start: 10000 port_range_end: 60000 Then apply and restart: 1. helm upgrade <release> livekit/livekit -f values.yaml 2. Restart the LiveKit pod on that node. 4) After you change either side, test one call and validate: • On the LiveKit node: sudo tcpdump -n -i <iface> udp and port <chosen_port> -c 20 • Check LiveKit logs for non-zero packet counts for the call. If ss shows LiveKit is already listening on 19172, paste the ss output and I’ll check process binding and advise the single command to correct it. If you prefer to change LiveKit’s range now, tell me your Helm release name and I’ll give the exact values.yaml snippet and helm command.
m
sip has port 10000-20000 open and livekit has port 50000-60000 open
t
You’ve found the root cause: the SIP side is sending RTP on ports in 10000–20000 (your capture showed 19172) while LiveKit is configured to bind/listen on 50000–60000. LiveKit therefore isn’t receiving packets on the port the SIP server uses. Fix options (pick one): 1) Recommended — make LiveKit accept the SIP RTP range (change LiveKit) • Update your Helm values to expand/replace LiveKit’s RTP range to include 10000–20000 (or the exact SIP RTP range). Example values.yaml snippet: livekit: rtc: port_range_start: 10000 port_range_end: 20000 • Apply and roll the server: 1. helm upgrade <release> livekit/livekit -f values.yaml 2. Restart the LiveKit pod(s) on the node(s). • Verify afterwards: ◦ Confirm LiveKit logs show the new port range and the node advertises the public IP. ◦ Make a test call and tcpdump the advertised port on the LiveKit node: sudo tcpdump -n -i <iface> udp and port <logged_port> -c 20 • LiveKit logs should show non-zero packet counts. 2) Alternative — make the SIP server send to LiveKit’s current range • Reconfigure the SIP server so the SDP/media destination uses ports in 50000–60000. This requires changing the SIP server/endpoint/pjsua RTP port configuration so outbound RTP targets the LiveKit advertised port range. Also check (both options): • AWS security groups and host firewalls allow inbound UDP for the chosen port range to the LiveKit node and outbound UDP from the SIP server to those ports. • LiveKit runs with host networking (so advertised IPs and port binding behave as expected). If you want, I can produce the exact values.yaml block with your release name and the helm command to run — tell me your Helm release name and whether you prefer option 1 or 2.
m
is modifying rtc: use_external_ip: true port_range_start: 10000 port_range_end: 60000 tcp_port: 7881 in the livekit values.yaml enough?
t
Yes — that change is sufficient to make LiveKit listen across the SIP RTP range you need. What it does •
rtc.port_range_start: 10000
and
rtc.port_range_end: 60000
expands LiveKit’s RTP bind range so it can receive RTP on ports the SIP side (10000–20000) uses as well as its previous range. •
rtc.use_external_ip: true
keeps LiveKit advertising the node public IP (needed for SIP peers to target the right address). •
tcp_port: 7881
is fine — no change needed there. Exact steps to apply 1. Update values.yaml with that block under
livekit.rtc
. 2. Apply: helm upgrade <release> livekit/livekit -f values.yaml 1. Restart the LiveKit pod(s) on each node (or let Helm roll them). Other checks to do now • Ensure AWS security groups and node host firewall allow inbound UDP 10000–60000 to the LiveKit node. • Confirm hostNetwork is true (you already have it). How to verify 1. Make a test SIP call. 2. On the LiveKit node, confirm packets arrive on the logged media port: sudo tcpdump -n -i <iface> udp and port <logged_port> -c 20 1. Check LiveKit SIP call stats —
packets
should be > 0 for the call. 2. Confirm two-way audio from caller → LiveKit and agent → caller. If you want, tell me your Helm release name and I’ll provide the exact values.yaml snippet and helm command.
m
still no audio logs from livekit 2025-12-22 072242.421088 eth0 Out IP (tos 0x0, ttl 255, id 13614, offset 0, flags [DF], proto UDP (17), length 57) 10.0.30.179.16973 > 10.0.8.105.52367: [bad udp cksum 0x3b52 -> 0xec6a!] UDP, length 29 0x0000: 4500 0039 352e 4000 ff11 0b6a 0a00 1eb3 E..95.@....j.... 0x0010: 0a00 0869 424d cc8f 0025 3b52 806f 9637 ...iBM...%;R.o.7 0x0020: b8bf d68a db52 ef51 61fe 0287 88cf d3e0 .....R.Qa....... 0x0030: b954 c1d2 a0a3 55a9 26 .T....U.& 2025-12-22 072242.459871 eth0 In IP (tos 0x0, ttl 125, id 55349, offset 0, flags [DF], proto UDP (17), length 76) 44.197.226.12.52432 > 10.0.30.179.19590: [udp sum ok] UDP, length 48 0x0000: 4500 004c d835 4000 7d11 ede6 2cc5 e20c E..L.5@.}...,... 0x0010: 0a00 1eb3 ccd0 4c86 0038 6dbe 80c8 0006 ......L..8m..... 0x0020: 3e4c 30b6 1a33 80cd 041e 5b10 f04a 5f40 >L0..3....[..J_@ 0x0030: 7a2f 9339 910a bb21 b256 a977 a75d e229 z/.9...!.V.w.].) 0x0040: 86f9 3877 e5ab a337 8000 0019 ..8w...7.... 2025-12-22 072242.460906 eth0 In IP (tos 0x0, ttl 126, id 32479, offset 0, flags [DF], proto UDP (17), length 80) 10.0.8.105.52367 > 10.0.30.179.16973: [udp sum ok] UDP, length 52 0x0000: 4500 0050 7edf 4000 7e11 42a2 0a00 0869 E..P~.@.~.B....i 0x0010: 0a00 1eb3 cc8f 424d 003c b5e2 81c9 0007 ......BM.<...... 0x0020: 8839 8b63 029b add1 9d36 9f5d 2952 0352 .9.c.....6.])R.R 0x0030: 264a 49d7 75e0 3182 da01 f129 9a0b 54d9 &JI.u.1....)..T. 0x0040: 31bc 7127 da28 cbd7 7c1a 39eb 8000 0009 1.q'.(..|.9..... logs from SIP 2025-12-22 072243.334103 eth0 In IP (tos 0x0, ttl 254, id 13663, offset 0, flags [DF], proto UDP (17), length 136) 10.0.30.179.16973 > 10.0.8.105.52367: [udp sum ok] UDP, length 108 0x0000: 4500 0088 355f 4000 fe11 0bea 0a00 1eb3 E...5_@......... 0x0010: 0a00 0869 424d cc8f 0074 104b 80ef 9642 ...iBM...t.K...B 0x0020: b8c0 964f db52 ef51 00e6 9886 4726 4890 ...O.R.Q....G&H. 0x0030: ac14 4072 687e c4a6 7ef9 6ac0 5ff7 8d97 ..@rh~..~.j._... 0x0040: b9af 042a 0085 5732 429e f24b 4d08 b820 ...*..W2B..KM... 0x0050: 6958 34ff cf48 3fc2 ab7f 4366 9d2e 77ad iX4..H?...Cf..w. 0x0060: 218f bfd3 6cc2 47eb e7f0 99c0 2170 7ac8 !...l.G.....!pz. 0x0070: 8a87 bb8a 5502 06cf 84f0 3e66 97d1 886e ....U.....>f...n 0x0080: cf3c 3385 f366 295c .<3..f)\ 2025-12-22 072243.353419 eth0 In IP (tos 0x0, ttl 254, id 13664, offset 0, flags [DF], proto UDP (17), length 136) 10.0.30.179.16973 > 10.0.8.105.52367: [udp sum ok] UDP, length 108 0x0000: 4500 0088 3560 4000 fe11 0be9 0a00 1eb3 E...5`@......... 0x0010: 0a00 0869 424d cc8f 0074 24f7 80ef 9643 ...iBM...t$....C 0x0020: b8c0 9a10 db52 ef51 a616 c156 c839 71d0 .....R.Q...V.9q. 0x0030: 4d44 24d6 ad3f e263 653f 0106 e7f2 8853 MD$..?.ce?.....S 0x0040: 53a4 bdb1 fabb cfd4 012b d017 7b46 7857 S........+..{FxW 0x0050: a143 0d44 10c9 09c9 1502 e002 5451 9578 .C.D........TQ.x 0x0060: f547 71cd f7d0 e8ae a676 0d68 af4a 1047 .Gq......v.h.J.G 0x0070: 9ac3 5e8d b1d1 ae5e 6dc8 a6d2 f9d0 c2e1 ..^....^m....... 0x0080: 6535 ceb8 57c9 276f
t
Thanks — the tcpdumps show RTP flowing both ways on the wire between the SIP server and LiveKit node, so the network path is OK. Since caller audio still isn't heard in LiveKit, the likely causes now are: • Codec mismatch / RTP payload not recognized by LiveKit (packets arrive but are not decoded) • LiveKit not associating incoming RTP with the SIP participant track (SSRC/SSRC mapping or missing RTP header fields) • Participant/track subscription or mixing issue inside LiveKit Please provide these three items so I can pinpoint the cause and give the exact fix: 1) The SIP/LIVEKIT logs for the same call showing codec negotiation — the lines containing "using codecs" or SDP (m= lines) from both SIP server and LiveKit. 2) LiveKit SIP call statistics for that call (the JSON-like stats block you previously saw) showing packets/audio counts for port/room. 3) Agent-side logs around the call showing whether the agent subscribed to the SIP participant track and whether LiveKit logged the SIP participant's track publish (you already have agent publishes — show subscribe/mixer lines if present). Quick checks you can run now (no restart): • Search LiveKit logs for the call's "track subscribed", "mixing track", and any codec/mime warnings. If LiveKit logged
mime: "audio/red"
for the agent and
mime: "audio/opus"
or
audio/PCMU
for the SIP participant, paste those lines. • Confirm in LiveKit logs that the SIP participant's SSRC appears and that mixer shows mixes > 0 for that track. • If SIP used PCMU (G.711) but LiveKit expected opus/a different payload type mapping, show the SDP m= line and a few RTP packet hex lines (from tcpdump) so I can confirm payload type mapping. If you paste the three items above I’ll tell you the exact single change (e.g., enable G.711 support, adjust backup codec policy, or fix SSRC mapping) to restore caller → LiveKit audio.
m
kle] udp4 host 10.78.90.205:41107", "[remote][selected:1] udp4 prflx 52.5.117....:11178"], "connectionType": "udp", "clientInfo": {"sdk": "PYTHON", "version": "1.0.20", "protocol": 16}} 2025-12-22T072229.453Z INFO livekit service/roommanager.go:394 starting RTC session {"room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "roomID": "RM_BuoqkSGaEQw6", "participant": "+16263141017", "pID": "PA_PnfW59iDZ4tE", "remote": false, "room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "nodeID": "ND_wiq8g8amLnhh", "numParticipants": 1, "participantInit": {"Identity": "+16263141017", "Reconnect": false, "ReconnectReason": "RR_UNKNOWN", "AutoSubscribe": false, "Client": {"sdk": "GO", "version": "2.11.3", "protocol": 16, "os": "linux"}, "Grants": {"Identity": "", "Kind": "sip", "Video": {"RoomCreate": false, "RoomList": false, "RoomRecord": false, "RoomAdmin": false, "RoomJoin": true, "Room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "CanPublish": true, "CanSubscribe": true, "CanPublishData": true, "CanPublishSources": [], "CanUpdateOwnMetadata": true, "IngressAdmin": false, "Hidden": false, "Recorder": false, "Agent": false, "CanSubscribeMetrics": "not-set", "DestinationRoom": ""}, "SIP": {}, "RoomConfig": {}, "RoomPreset": ""}, "Region": "", "AdaptiveStream": false, "ID": "", "SubscriberAllowPause": "not-set", "DisableICELite": false, "CreateRoom": {"name": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a"}}} 2025-12-22T072229.454Z INFO livekit service/roommanager.go:945 created TURN password {"username": "FRHNaRUa5UzVm5GUfKIo47GygZGYGTGcyRmygJmaqRmkgKI", "password": "f3nfkeW7bZ0OhIdX3s49veHX94jJ0WowMHBLUmP29YTD"} 2025-12-22T072229.469Z INFO livekit rtc/room.go:480 participant active {"room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "roomID": "RM_BuoqkSGaEQw6", "participant": "+16263141017", "pID": "PA_PnfW59iDZ4tE", "remote": false, "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 44.201.180.119:16973 (resolved: 44.201.180.119:16973)", "[local][trickle] tcp4 host 44.201.180.119:7881 (resolved: 44.201.180.119:7881)", "[local][trickle] udp4 host 169.254.170.23:56559 (resolved: 169.254.170.23:56559)", "[local][trickle] tcp4 host 169.254.170.23:7881 (resolved: 169.254.170.23:7881)", "[local][trickle] udp6 host [fd00ec223]57617 (resolved: [fd00ec223]57617)", "[local][trickle] tcp6 host [fd00ec223]7881 (resolved: [fd00ec223]7881)", "[local][trickle] udp4 host 10.0.26.33:42191 (resolved: 10.0.26.33:42191)", "[local][trickle] tcp4 host 10.0.26.33:7881 (resolved: 10.0.26.33:7881)", "[remote][selected:1][trickle] udp4 host 10.0.8.105:52367", "[remote][trickle] udp4 srflx 44.197.226...:64204 related 0.0.0.0:54858", "[remote][trickle] udp4 srflx 44.197.226...:34501 related 0.0.0.0:43587"], "connectionType": "udp", "clientInfo": {"sdk": "GO", "version": "2.11.3", "protocol": 16, "os": "linux"}} 2025-12-22T072229.496Z INFO livekit.pub rtc/participant.go:1930 mediaTrack published {"room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "roomID": "RM_BuoqkSGaEQw6", "participant": "agent-AJ_jx37CCPzrdty", "pID": "PA_igmNrbeZTNJm", "remote": false, "kind": "audio", "trackID": "TR_AMQtxgHQpRECK2", "webrtcTrackID": "d33a4fa8-8f8f-4b7e-ab57-2981dd07be3b", "rid": "", "SSRC": 783248987, "mime": "audio/red", "trackInfo": {"sid": "TR_AMQtxgHQpRECK2", "type": "AUDIO", "name": "roomio_audio", "source": "MICROPHONE", "mimeType": "audio/red", "mid": "0", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766388149494760}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true} 2025-12-22T072229.511Z INFO livekit.pub rtc/participant.go:1930 mediaTrack published {"room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "roomID": "RM_BuoqkSGaEQw6", "participant": "+16263141017", "pID": "PA_PnfW59iDZ4tE", "remote": false, "kind": "audio", "trackID": "TR_AM49FJMLqwo94v", "webrtcTrackID": "audio", "rid": "", "SSRC": 1045180598, "mime": "audio/opus", "trackInfo": {"sid": "TR_AM49FJMLqwo94v", "type": "AUDIO", "name": "+16263141017", "source": "MICROPHONE", "mimeType": "audio/opus", "mid": "0", "encryption": "NONE", "stream": "camera", "version": {"unixMicro": 1766388149510224}, "backupCodecPolicy": "PREFER_REGRESSION"}, "fromSdp": true}
t
Thanks — helpful logs. To finish diagnosing why caller→LiveKit audio isn’t processed I need three quick, specific items from one failing call (paste the snippets you have): 1) The SIP call stats block for that call (the JSON-like "stats" you posted earlier) showing packets/audio counts for the SIP port. 2) Codec/SDP negotiation lines from both sides (LiveKit "using codecs" / SDP m= or a= lines, and the SIP server INVITE/200OK SDP m= lines). 3) A short tcpdump excerpt (10–20 packets) from the LiveKit node for the call port (or the pcap): sudo tcpdump -n -i <iface> udp and port <media_port> -c 20 -w /tmp/call.pcap then: tcpdump -nn -r /tmp/call.pcap | head -n 30 With those I’ll determine whether it’s a codec/payload mismatch, SSRC/header mapping, or LiveKit binding/mixer issue and give the single configuration change to fix it.
m
stats 025-12-22T071904.524Z INFO sip sip/media.go:116 call statistics {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_Cqn8yNN2E8Gv", "traceID": "43716e38794e4e32", "room": "dispatch-audio-call-128d7b7c-e9a2-4158-87fa-721c853ae949", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA1ebb26255167a68a708b549cfebc0842", "stats": {"port":{"streams":0,"packets":0,"packets_ignored":0,"packets_input":0,"mux_packets":0,"mux_bytes":0,"audio_packets":0,"audio_bytes":0,"audio_in_frames":0,"audio_in_samples":0,"audio_out_frames":1501,"audio_out_samples":240160,"audio_rx":0,"audio_tx":6757.890925260347,"dtmf_packets":0,"dtmf_bytes":0,"closed":true},"room":{"input_packets":193,"input_bytes":9642,"dtmf_packets":0,"published_frames":0,"published_samples":0,"publish_tx":0,"mixer_samples":185280,"mixer_frames":193,"output_samples":1704960,"output_frames":1776,"closed":true},"mixer":{"tracks":1,"tracks_total":1,"restarts":36,"timing_resets":0,"mixes":1776,"mixes_timed":1776,"mixes_jump":0,"mixes_zero":0,"mixes_negative":0,"input_samples":185280,"input_frames":193,"mixed_samples":183360,"mixed_frames":191,"output_samples":1704960,"output_frames":1776,"write_errors":0,"blocked_mixes":0},"closed":true}, "durMin": 0, "sip_rx_ppm": -1000000, "sip_tx_ppm": -859210.6057237427, "lk_publish_ppm": -1000000, "expected_pcm_hz": 48000} 2025-12-22T072243.198Z INFO sip sip/media.go:116 call statistics {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_PXnyYgAL3QA5", "traceID": "50586e795967414c", "room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "twilioCallSID": "CA770971ca6004c79e28071eeaf2a9a9bf", "stats": {"port":{"streams":0,"packets":0,"packets_ignored":0,"packets_input":0,"mux_packets":0,"mux_bytes":0,"audio_packets":0,"audio_bytes":0,"audio_in_frames":0,"audio_in_samples":0,"audio_out_frames":462,"audio_out_samples":73920,"audio_rx":0,"audio_tx":5368.320161993872,"dtmf_packets":0,"dtmf_bytes":0,"closed":true},"room":{"input_packets":97,"input_bytes":7294,"dtmf_packets":0,"published_frames":0,"published_samples":0,"publish_tx":0,"mixer_samples":93120,"mixer_frames":97,"output_samples":660480,"output_frames":688,"closed":true},"mixer":{"tracks":0,"tracks_total":1,"restarts":11,"timing_resets":0,"mixes":688,"mixes_timed":688,"mixes_jump":0,"mixes_zero":0,"mixes_negative":0,"input_samples":93120,"input_frames":97,"mixed_samples":91200,"mixed_frames":95,"output_samples":660480,"output_frames":688,"write_errors":0,"blocked_mixes":0},"closed":true}, "durMin": 0, "sip_rx_ppm": -1000000, "sip_tx_ppm": -888159.9966251277, "lk_publish_ppm": -1000000, "expected_pcm_hz": 48000} codec 2025-12-22T072233.958Z INFO sip sip/media_port.go:574 using codecs {"nodeID": "NE_nfjVbVrm6hTV", "sipTrunk": "ST_p9rVLLmUkc9E", "callID": "SCL_PXnyYgAL3QA5", "traceID": "50586e795967414c", "room": "dispatch-audio-call-bb2882a3-f4f8-4bee-83ac-daa05e92bc8a", "participant": "+16263141017", "participantName": "", "fromHost": "", "fromUser": "+18444671810", "toHost": "aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", "toUser": "+16263141017", "jitterBuf": false, "audio-codec": "PCMU/8000", "audio-rtp": 0, "dtmf-rtp": 101, "srtp": ""} 2025-12-22 072225.944999 eth0 Out IP (tos 0x0, ttl 255, id 63937, offset 0, flags [DF], proto UDP (17), length 76) 10.0.30.179.16340 > 169.254.169.123.123: [bad udp cksum 0x7c76 -> 0x86e8!] NTPv4, Client, length 48 Leap indicator: (0), Stratum 0 (unspecified), poll 4 (16s), precision 32 Root Delay: 0.000000, Root dispersion: 0.000000, Reference-ID: (unspec) Reference Timestamp: 0.000000000 Originator Timestamp: 0.000000000 Receive Timestamp: 0.000000000 Transmit Timestamp: 278418281.947544002 (1908-10-28T102441Z) Originator - Receive Timestamp: 0.000000000 Originator - Transmit Timestamp: 278418281.947544002 (1908-10-28T102441Z) 0x0000: 4500 004c f9c1 4000 ff11 05b2 0a00 1eb3 E..L..@......... 0x0010: a9fe a97b 3fd4 007b 0038 7c76 2300 0420 ...{?..{.8|v#... 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0040: 0000 0000 1098 5369 f292 3e65 ......Si..>e 2025-12-22 072225.945179 eth0 In IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 76) 169.254.169.123.123 > 10.0.30.179.16340: [udp sum ok] NTPv4, Server, length 48 Leap indicator: (0), Stratum 3 (secondary reference), poll 4 (16s), precision -18 Root Delay: 0.000228, Root dispersion: 0.000289, Reference-ID: 0xa9fea97a Reference Timestamp: 3975376938.143479629 (2025-12-22T072218Z) Originator Timestamp: 278418281.947544002 (1908-10-28T102441Z) Receive Timestamp: 3975376945.945065831 (2025-12-22T072225Z) Transmit Timestamp: 3975376945.945082001 (2025-12-22T072225Z) Originator - Receive Timestamp: +3696958663.997521829 Originator - Transmit Timestamp: +3696958663.997537999 0x0000: 4500 004c 0000 4000 ff11 ff73 a9fe a97b E..L..@....s...{ 0x0010: 0a00 1eb3 007b 3fd4 0038 423c 2403 04ee .....{?..8B<$... 0x0020: 0000 000f 0000 0013 a9fe a97a ecf3 702a ...........z..p* 0x0030: 24bb 14be 1098 5369 f292 3e65 ecf3 7031 $.....Si..>e..p1 0x0040: f1ef d599 ecf3 7031 f1f0 e4e2 ......p1....
t
Thanks — you’ve provided the key data. Short summary of what I see and the focused next steps. Summary • RTP is flowing on the wire both directions between SIP server and LiveKit node. • SIP call stats still show zero inbound audio for the SIP port (packets: 0, audio_in_frames: 0). • SIP-side codec logged as PCMU/8000 (G.711 µ-law). LiveKit shows the SIP participant published as audio/opus in the room. That indicates RTP arrives, but LiveKit isn’t associating/decoding it as the SIP participant’s inbound audio — likely a codec/SDP mismatch or SIP-server-side RTP mapping issue (payload type/SSRC or SDP addresses/ports used for media). What I need to confirm (paste these three items from one failing call) 1. The SIP SDP (INVITE and 200 OK) as received by the SIP server and as forwarded to LiveKit — the full m= and a= lines. 2. The LiveKit SIP call stats JSON for that call (you provided some — give the block for the most recent failing call). 3. A short tcpdump converted to readable RTP lines for 10 packets toward LiveKit port: ◦ sudo tcpdump -nn -r /tmp/call.pcap | head -n 30 (so I can inspect RTP payload type/marker/SSRC bytes) Exact likely fixes to try now • If the SIP SDP shows PCMU only: configure the SIP server/trunk to offer/enable Opus or configure the SIP gateway to transcode PCMU→Opus. Allowing LiveKit to receive PCMU directly requires the SIP gateway to map PCMU to an RTP payload LiveKit will accept (LiveKit SIP supports PCMU, but payload types must align). • If the SIP SDP shows PCMU but packet payload types in tcpdump are not matching the SDP mapping (wrong PT or missing RTP header fields), fix the SIP server RTP forwarding so it sends the same payload type negotiated in SDP and preserves SSRC/RTP headers. • Ensure LiveKit’s RTP range and advertised IP remain correct (you already expanded port range and advertise_ip looks correct). If you paste the three items above I will: • Confirm whether this is a codec negotiation mismatch, a payload-type mismatch, or SSRC/header mapping issue, and • Give the single exact change (SDP config line or SIP server transcoding setting or the one LiveKit parameter to change) to restore caller→LiveKit audio.
m
what should I search to get those logs
t
Good question — here are exact search terms and commands to collect the three items I need (SDP, SIP call stats, and readable RTP packet lines). Run these on the hosts/pods that handled the failing call and paste the results (redact sensitive tokens). 1) SIP SDP (INVITE / 200 OK) as seen by your SIP server • Search logs for the callID or traceID from the failing call: ◦ grep -R "SCL_<callID>" /var/log | grep -i "INVITE\|200 OK\|a=\|m=" ◦ or: journalctl -u <sip-service> | grep -E "SCL_<callID>|m=audio|a=rtpmap|a=rtcp" • Look for lines containing
m=audio
,
a=rtpmap
,
a=fmtp
,
c=
and paste the m= / a= blocks from INVITE and 200 OK. 2) LiveKit SIP call stats JSON for that call • Search LiveKit SIP logs for the callID: ◦ grep -R "SCL_<callID>" /path/to/livekit/logs | grep -i "call statistics" ◦ or: kubectl logs <livekit-pod> | grep "SCL_<callID>" -n • Paste the full
call statistics
JSON-like block you find (it contains
port
,
packets
,
mixer
, etc). 3) Readable RTP packet lines from tcpdump • On the LiveKit node capture 20 packets for the media port logged for that call (replace iface and port): ◦ sudo tcpdump -nn -i <iface> udp and port <media_port> -c 20 -w /tmp/call.pcap ◦ tcpdump -nn -r /tmp/call.pcap | head -n 40 • From the output, paste the first ~30 lines. That shows source/dest/IP:port and a hex preview of RTP payload/header so I can inspect payload type & SSRC. If any of these logs are large, paste only the relevant sections for the same timestamp/traceID. I’ll use them to determine whether the issue is codec negotiation (PCMU vs OPUS), payload-type mapping, or SSRC/header mismatch and give the single config change to fix it.
m
there are no a lines or m lines or invite logs
t
Thanks — since there are no SDP (
m=
/
a=
) lines in your SIP logs, the SIP server isn’t currently logging or exposing the signaling payload we need to confirm payload-type mapping. That’s fine — here are the precise next diagnostics and short fixes you can run now to confirm and resolve caller→LiveKit audio. Quick diagnostics (pick any you can run now) 1) Capture SIP signaling (INVITE / 200 OK) with tcpdump • Run on the SIP server host (captures SDP in the SIP messages): sudo tcpdump -n -s 0 -A -i <iface> udp port 5060 -c 50 > /tmp/sip_signaling.txt • Reproduce a failing call, then paste the relevant INVITE/200OK blocks from /tmp/sip_signaling.txt. 2) If SIP traffic is TCP/TLS or via Kamailio, capture the TCP port (or TLS) instead: • UDP: sudo tcpdump -n -s 0 -A -i <iface> udp port 5060 -c 50 • TCP: sudo tcpdump -n -s 0 -A -i <iface> tcp port 5060 -c 50 • If SIP over TLS (5061) or proxied, capture between Kamailio and SIP server. 3) Enable verbose RTP logging in SIP server (quick) • If using pjsip/pjsua/pjsua2, start with higher log level (e.g., --log-level 6) to capture SDP and RTP mapping. • If your SIP server has a debug flag, enable SIP/SDP logging temporarily. Checks using captured RTP (if you already have pcap) • Extract RTP payload-type and SSRC: tcpdump -nn -r /tmp/call.pcap | head -n 30 Look for RTP headers: payload type (PT) and SSRC. If PT != the PT advertised in SDP, payload-type mismatch exists. Immediate workarounds to try (no SDP needed) A) Allow LiveKit to accept G.711 directly • LiveKit supports PCMU; ensure LiveKit’s SIP config isn’t stripping PCMU. If your SIP server is negotiating PCMU, set LiveKit to accept it by ensuring the SIP gateway doesn’t require Opus only. (You already saw
audio-codec: PCMU/8000
in the SIP logs — make sure LiveKit is not configured to drop PCMU.) B) Temporarily widen LiveKit RTP port range (you already expanded) and restart pods • Confirm LiveKit is now listening across 10000–60000: sudo ss -lunp | grep <livekit-process> or grep for port range in pod logs. • Restart LiveKit pod after changes so bind takes effect. C) Enable a jitter buffer / accept silent inputs on SIP server • If the SIP client sends PCMU but with unexpected PT mapping, enabling a jitter buffer or allowing the SIP server to transcode (PCMU→Opus) will restore audio quickly. If you can’t capture SDP or prefer I keep guiding: • Run tcpdump on SIP signaling (step 1) and paste the INVITE/200OK text. I’ll read the
m=
and
a=rtpmap
lines and tell you the single config change (either change the negotiated codec mapping or enable transcoding) to repair inbound audio. If you want, tell me which capture you can run now and I’ll give the exact command to run and exactly what lines to paste.
m
there are invite logs on kamailio though 4(9) DEBUG: <core> [core/udp_server.c718] udp_rcv_loop(): received on udp socket: (106/100/407) [[INVITE sip:100@100.49.69.85 SIP/2.0 0D 0A Via: SIP/2.0/UDP 185.243.5.77:5072;branch=z9hG4bK-466655300;rpo]] 4(9) DEBUG: <core> [core/parser/parse_fline.c249] parse_first_line(): first line type 1 (request) flags 1 4(9) DEBUG: <core> [core/parser/msg_parser.c725] parse_msg(): SIP Request: 4(9) DEBUG: <core> [core/parser/msg_parser.c726] parse_msg(): method: <INVITE> 4(9) DEBUG: <core> [core/parser/msg_parser.c728] parse_msg(): uri: sip:100@100.49.69.85 4(9) DEBUG: <core> [core/parser/msg_parser.c730] parse_msg(): version: <SIP/2.0> 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [Via] type 1 4(9) DEBUG: <core> [core/parser/parse_via.c1311] parse_via_param(): Found param type 232, <branch> = <z9hG4bK-466655300>; state=6 4(9) DEBUG: <core> [core/parser/parse_via.c1311] parse_via_param(): Found param type 235, <rport> = <n/a>; state=17 4(9) DEBUG: <core> [core/parser/parse_via.c2665] parse_via(): end of header reached, state=5 4(9) DEBUG: <core> [core/parser/msg_parser.c595] parse_headers(): Via found, flags=2 4(9) DEBUG: <core> [core/parser/msg_parser.c597] parse_headers(): this is the first via 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [Content-Length] type 12 4(9) DEBUG: <core> [core/parser/msg_parser.c191] get_hdr_field(): content_length=0 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [From] type 4 4(9) DEBUG: <core> [core/parser/parse_addr_spec.c187] parse_to_param(): add param: tag=3634333134353535313363340132363435333134303632 4(9) DEBUG: <core> [core/parser/parse_addr_spec.c906] parse_addr_spec(): end of header reached, state=29 4(9) DEBUG: <core> [core/parser/msg_parser.c164] get_hdr_field(): <From> [82]; uri=[sip:100@1.1.1.1] 4(9) DEBUG: <core> [core/parser/msg_parser.c166] get_hdr_field(): from body (29)["sipvicious"sip:100@1.1.1.1], from tag (46)[3634333134353535313363340132363435333134303632] 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [Accept] type 23 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [User-Agent] type 28 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [To] type 3 4(9) DEBUG: <core> [core/parser/parse_addr_spec.c906] parse_addr_spec(): end of header reached, state=10 4(9) DEBUG: <core> [core/parser/msg_parser.c176] get_hdr_field(): <To> [31]; uri=[sip:100@1.1.1.1] 4(9) DEBUG: <core> [core/parser/msg_parser.c178] get_hdr_field(): to body (31)["sipvicious"sip:100@1.1.1.1 ], to tag (0)[] 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [Contact] type 7 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [CSeq] type 5 4(9) DEBUG: <core> [core/parser/msg_parser.c154] get_hdr_field(): cseq <CSeq>: <1> <INVITE> 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [Call-ID] type 6 4(9) DEBUG: <core> [core/receive.c394] receive_msg(): --- received sip message - request - call-id: [52122535593592257951525] - cseq: [1 INVITE] 4(9) DEBUG: <core> [core/parser/parse_hname2.c317] parse_sip_header_name(): parsed header name [Max-Forwards] type 8 4(9) DEBUG: <core> [core/parser/msg_parser.c93] get_hdr_field(): found end of header 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/receive.c265] ksr_evrt_pre_routing(): event route core:pre-routing not defined 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/receive.c476] receive_msg(): preparing to run routing scripts... 4(9) INFO: {1 1 INVITE 52122535593592257951525} <script>: Incoming INVITE from 185.243.5.77:5072 to sip:100@100.49.69.85 4(9) INFO: {1 1 INVITE 52122535593592257951525} <script>: Blocking scanner: friendly-scanner from 185.243.5.77 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/receive.c533] receive_msg(): request-route executed in: 35 usec 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/usr_avp.c656] destroy_avp_list(): destroying list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/usr_avp.c656] destroy_avp_list(): destroying list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/usr_avp.c656] destroy_avp_list(): destroying list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/usr_avp.c656] destroy_avp_list(): destroying list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/usr_avp.c656] destroy_avp_list(): destroying list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/usr_avp.c656] destroy_avp_list(): destroying list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/xavp.c630] xavp_destroy_list(): destroying xavp list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/xavp.c630] xavp_destroy_list(): destroying xavp list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/xavp.c630] xavp_destroy_list(): destroying xavp list (nil) 4(9) DEBUG: {1 1 INVITE 52122535593592257951525} <core> [core/receive.c637] receive_msg(): cleaning up
t
Thanks — the Kamailio logs show an INVITE (but that specific INVITE was a scanner your script blocked). To debug actual failing calls I need the INVITE/200OK SDP for a real call (so we can confirm codecs, media IP/ports, and payload-type mapping). Please capture a real call’s SIP signaling (only SIP signaling/SDP) with one of these exact tcpdump commands run on the Kamailio/SIP-server host, then place the INVITE and the 200 OK blocks here: If SIP over UDP (most common) sudo tcpdump -s 0 -A -i <iface> udp port 5060 and host <caller_ip_or_trunk_host> -c 100 > /tmp/sip_signaling.txt If SIP over TCP sudo tcpdump -s 0 -A -i <iface> tcp port 5060 and host <caller_ip_or_trunk_host> -c 100 > /tmp/sip_signaling.txt If using Twilio (capture by trunk host/CIDR) — replace <twilio_ip> with the Twilio peer IP seen in your SIP logs: sudo tcpdump -s 0 -A -i <iface> udp port 5060 and host <twilio_ip> -c 100 > /tmp/sip_signaling.txt If you know the failing Call-ID, filter by it: sudo tcpdump -s 0 -A -i <iface> udp port 5060 -c 200 | sed -n '/<Call-ID: <CALL_ID>/,/<\/INVITE>/p' > /tmp/sip_invite.txt Notes: • Use the host/interface where Kamailio or the SIP server actually receives the INVITE. • Reproduce one failing call while the capture is running. • Paste the INVITE and the 200 OK (the sections containing m=audio and a=rtpmap / a=fmtp lines). Redact phone numbers if you want. Also confirm: • Which IP to use for <caller_ip_or_trunk_host> (your trunk host or the Twilio IP). If you’re using Twilio, I can provide Twilio’s IP ranges to capture. • Whether Kamailio is proxying SIP to the SIP server over UDP or TCP. If it’s proxied, capture on the hop that carries the SDP (Kamailio→SIP server). If Kamailio isn’t logging SDP for legitimate calls, run the UDP tcpdump above (it will capture SDP even if Kamailio doesn’t log it). Paste the captured INVITE/200OK and I’ll tell you the exact single change to fix the inbound audio (codec mapping or payload/SSRC handling).
m
the kamailio logs are from the recent most call
t
Thanks — you’re very close. To finish this I need one last set of artifacts from the same failing call so I can match SDP <-> RTP on the wire and tell you the single config change. Please run these three commands while you place one failing phone call (run on the host where Kamailio/SIP server sees the INVITE, and on the LiveKit node for the media capture). Paste the three outputs here: 1) Capture SIP signaling (INVITE + 200 OK SDP) on the Kamailio/SIP host: sudo tcpdump -s 0 -A -i <iface> udp port 5060 and host <trunk_ip> -c 200 > /tmp/sip_signaling.txt then: sed -n '/INVITE/,/$/p' /tmp/sip_signaling.txt sed -n '/200 OK/,/$/p' /tmp/sip_signaling.txt 2) Capture RTP arriving at LiveKit for the call port (replace <media_port> with the port shown in the SIP log
addr
): sudo tcpdump -nn -i <iface> udp and port <media_port> -c 40 -w /tmp/call.pcap tcpdump -nn -r /tmp/call.pcap | head -n 40 3) Capture outbound RTP from the SIP server to the LiveKit addr (run on SIP server): sudo tcpdump -nn -i <iface> host <livekit_advertised_ip> and udp and port <media_port> -c 40 If you cannot run tcpdump on UDP/5060 (TLS or permissions), run step (2) + (3) only — the pcap will still show payload type and SSRC which is enough. Post the INVITE/200OK m= and a= lines and the first ~30 lines of the two tcpdump outputs and I’ll identify exactly whether it’s a payload-type (PT) mismatch, codec mismatch (PCMU vs Opus), or SSRC/header mapping issue and give the single exact config change to fix two‑way audio.
m
tcp dump from livekit 074932.778051 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 86 074932.798123 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 91 074933.197772 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 86 074933.206069 IP 10.0.30.179.43693 > 44.201.180.119.46406: UDP, length 48 074933.206141 IP 44.201.180.119.43693 > 10.0.30.179.46406: UDP, length 48 074933.217858 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 91 074933.248472 IP 10.0.30.179.57099 > 52.5.117.242.8762: UDP, length 34 074933.253734 IP 10.0.30.179.46406 > 44.201.180.119.43693: UDP, length 40 074933.253805 IP 44.201.180.119.46406 > 10.0.30.179.43693: UDP, length 40 074933.253990 IP 10.0.30.179.43693 > 44.201.180.119.46406: UDP, length 44 074933.254055 IP 44.201.180.119.43693 > 10.0.30.179.46406: UDP, length 44 074933.263473 IP 10.0.30.179.43693 > 44.201.180.119.46406: UDP, length 112 074933.263544 IP 44.201.180.119.43693 > 10.0.30.179.46406: UDP, length 112 074933.263661 IP 10.0.30.179.46406 > 44.201.180.119.43693: UDP, length 64 074933.263696 IP 10.0.30.179.46406 > 44.201.180.119.43693: UDP, length 112 074933.263727 IP 44.201.180.119.46406 > 10.0.30.179.43693: UDP, length 64 074933.263757 IP 44.201.180.119.46406 > 10.0.30.179.43693: UDP, length 112 074933.263868 IP 10.0.30.179.43693 > 44.201.180.119.46406: UDP, length 64 074933.263923 IP 44.201.180.119.43693 > 10.0.30.179.46406: UDP, length 64 074933.264049 IP 10.0.30.179.46406 > 44.201.180.119.43693: UDP, length 112 074933.264104 IP 44.201.180.119.46406 > 10.0.30.179.43693: UDP, length 112 074933.264187 IP 10.0.30.179.43693 > 44.201.180.119.46406: UDP, length 64 074933.264244 IP 44.201.180.119.43693 > 10.0.30.179.46406: UDP, length 64 074933.448448 IP 10.0.30.179.57099 > 52.5.117.242.8762: UDP, length 100 074933.449310 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 64 074933.617525 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 86 074933.617725 IP 10.0.30.179.57099 > 52.5.117.242.8762: UDP, length 46 074933.620010 IP 10.0.30.179.54264 > 52.5.117.242.58972: UDP, length 100 074933.620787 IP 52.5.117.242.58972 > 10.0.30.179.54264: UDP, length 64 074933.637593 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 91 074933.684914 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 112 074933.685065 IP 10.0.30.179.57099 > 52.5.117.242.8762: UDP, length 64 074933.685088 IP 10.0.30.179.57099 > 52.5.117.242.8762: UDP, length 100 074933.685847 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 64 074934.037285 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 86 074934.057337 IP 52.5.117.242.8762 > 10.0.30.179.57099: UDP, length 91 074934.206000 IP 10.0.30.179.43693 > 44.201.180.119.46406: UDP, length 48 074934.206077 IP 44.201.180.119.43693 > 10.0.30.179.46406: UDP, length 48 074934.248456 IP 10.0.30.179.57099 > 52.5.117.242.8762: UDP, length 34 074934.253711 IP 10.0.30.179.46406 > 44.201.180.119.43693: UDP, length 40 tcpdump: Unable to write output: Broken pipe 074937.799141 IP ec2-54-172-60-0.compute-1.amazonaws.com.5060 > sip-server-sandbox-gbnnk.5060: SIP: SIP/2.0 200 OK E.......}...6.<. ...........SIP/2.0 200 OK CSeq: 2 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>;tag=95705617_c3356d0b_073efd4f-76b6-4ce4-8378-c2a312721195 Via: SIP/2.0/UDP 44.201.180.119:5060;rport=3068;alias;branch=z9hG4bK.3RRHTTV3RS8nTdN9 Record-Route: sip:54.172.60.0;lr;twnat=sip:44.201.180.119:3068 Server: Twilio Contact: sip:172.25.17.80:5060 Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY Content-Type: application/sdp X-Twilio-CallSid: CA5cf1a6adb13bcb821ff4275ecf981db4 Content-Length: 279 074948.728159 IP sip-server-sandbox-gbnnk.5060 > ec2-54-172-60-0.compute-1.amazonaws.com.5060: SIP: SIP/2.0 200 OK E..M!.@...Dk ...6.<......9..SIP/2.0 200 OK Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bK48e7.ebaf20e366448ab5fa4c9763d551f794.0 Via: SIP/2.0/UDP 172.25.17.80:5060;rport=5060;received=34.230.31.12;branch=z9hG4bK073efd4f-76b6-4ce4-8378-c2a312721195_c3356d0b_617-8858141498357295280 From: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>;tag=95705617_c3356d0b_073efd4f-76b6-4ce4-8378-c2a312721195 To: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB CSeq: 1 BYE Content-Length: 0 074921.376110 IP sip-server-sandbox-gbnnk.5060 > ec2-54-172-60-1.compute-1.amazonaws.com.5060: SIP: INVITE sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com SIP/2.0 E.....@..... ...6.<......y..INVITE sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com SIP/2.0 Via: SIP/2.0/UDP 44.201.180.119:5060;branch=z9hG4bK.oHYRyBOq2jv2wbx4;alias CSeq: 1 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB Content-Length: 290 To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com> From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS Contact: sip:44.201.180.119:5060 Content-Type: application/sdp Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Max-Forwards: 70 CSeq: 1 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com> From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS Server: Twilio Gateway Content-Length: 0 CSeq: 1 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>;tag=95467524_c3356d0b_ee31fd50-bef6-4930-b335-6054250859d0 Via: SIP/2.0/UDP 44.201.180.119:5060;rport=13941;branch=z9hG4bK.oHYRyBOq2jv2wbx4;alias Server: Twilio Contact: sip:172.25.32.19:5060 Proxy-Authenticate: Digest realm="sip.twilio.com",qop="auth",nonce="kJaBDFb8412Ave_uQgnXrzLAuysbTEAgFPTfCQ6gmLY-GezB",opaque="f91b454ba1edd655d438a35cca4d0595" Content-Length: 0 074921.420950 IP sip-server-sandbox-gbnnk.5060 > ec2-54-172-60-0.compute-1.amazonaws.com.5060: SIP: INVITE sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com SIP/2.0 E....i@...J. ...6.<.........INVITE sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com SIP/2.0 Via: SIP/2.0/UDP 44.201.180.119:5060;alias;branch=z9hG4bK.3RRHTTV3RS8nTdN9 CSeq: 2 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB Content-Length: 290 To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com> From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS Contact: sip:44.201.180.119:5060 Content-Type: application/sdp Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Proxy-Authorization: Digest username="+18444671810-392e7fa292634ef", realm="sip.twilio.com", nonce="kJaBDFb8412Ave_uQgnXrzLAuysbTEAgFPTfCQ6gmLY-GezB", uri="sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com", cnonce="a352529fa12bf5e3", opaque="f91b454ba1edd655d438a35cca4d0595", qop=auth, nc=00000001, response="b539a24f27dc04b77a88ff9d0fa03255" Max-Forwards: 70 CSeq: 2 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com> From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS Server: Twilio Gateway Content-Length: 0 CSeq: 2 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>;tag=95705617_c3356d0b_073efd4f-76b6-4ce4-8378-c2a312721195 Via: SIP/2.0/UDP 44.201.180.119:5060;rport=3068;alias;branch=z9hG4bK.3RRHTTV3RS8nTdN9 Record-Route: sip:54.172.60.0;lr;twnat=sip:44.201.180.119:3068 Server: Twilio Contact: sip:172.25.17.80:5060 X-Twilio-CallSid: CA5cf1a6adb13bcb821ff4275ecf981db4 Content-Length: 0 CSeq: 2 INVITE Call-ID: WzTXie80pZIlFwydlkfaePZnnrNB From: "+18444671810" sip:+18444671810@44.201.180.119:5060;tag=SCL_NtTP9MvezEVS To: <sip:+16263141017@aca76c8d146425686fbb66ea700e77ac4c-feather-trunk.pstn.twilio.com>;tag=95705617_c3356d0b_073efd4f-76b6-4ce4-8378-c2a312721195 Via: SIP/2.0/UDP 44.201.180.119:5060;rport=3068;alias;branch=z9hG4bK.3RRHTTV3RS8nTdN9 Record-Route: sip:54.172.60.0;lr;twnat=sip:44.201.180.119:3068 Server: Twilio Contact: sip:172.25.17.80:5060 Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY Content-Type: application/sdp X-Twilio-CallSid: CA5cf1a6adb13bcb821ff4275ecf981db4 Content-Length: 279
t
Thanks — you’re very close. To finish this I need the INVITE and 200 OK SDP blocks plus a short readable RTP extract from the same failing call so I can confirm payload-type/SSRC mapping. If you can run one capture now, please run these three commands and paste the three small outputs here (redact any phone numbers): 1) SIP signaling (INVITE + 200 OK) on Kamailio/SIP host: sudo tcpdump -s 0 -A -i <iface> udp port 5060 and host <trunk_ip> -c 200 > /tmp/sip_signaling.txt Then paste the INVITE SDP block (lines from the INVITE including all m= and a= lines) and the 200 OK SDP block. 2) RTP arriving at LiveKit for the call port (replace <media_port>): sudo tcpdump -nn -i <iface> udp and port <media_port> -c 40 -w /tmp/call.pcap tcpdump -nn -r /tmp/call.pcap | head -n 40 Paste the first ~30 lines (they show PT/SSRC info). 3) LiveKit SIP call statistics for that call (from LiveKit logs): grep -R "SCL_<callID>" /path/to/livekit/logs | grep -i "call statistics" -n Paste the JSON-like call statistics block. If you cannot capture SIP on Kamailio, run step (2) + step (3) only — the pcap will still let me check payload type and SSRC. Tell me which commands you can run now and I’ll adapt if needed.
m
here the tcpdump for the rtp
here the tcpdump for the rtp
t
Thanks — you’re nearly there. I didn’t receive the RTP pcap text you intended to paste. To finish diagnosing why caller→LiveKit audio isn’t processed I need one of the following from a single failing call (pick whichever you can run now): A — Best (full view: SIP + RTP) 1. Capture SIP INVITE and 200 OK (SDP) on the Kamailio/SIP host: sudo tcpdump -s 0 -A -i <iface> udp port 5060 and host <trunk_ip> -c 200 > /tmp/sip_signaling.txt Then paste the INVITE and 200 OK blocks (the lines containing m=audio and a=rtpmap / a=fmtp). 1. Capture RTP arriving at LiveKit for the media port shown in SIP logs: sudo tcpdump -nn -i <iface> udp and port <media_port> -c 40 -w /tmp/call.pcap tcpdump -nn -r /tmp/call.pcap | head -n 40 Paste the first ~30 lines. B — If you cannot capture SIP, do RTP only 1. On LiveKit node: sudo tcpdump -nn -i <iface> udp and port <media_port> -c 40 -w /tmp/call.pcap tcpdump -nn -r /tmp/call.pcap | head -n 40 1. On SIP server: sudo tcpdump -nn -i <iface> host <livekit_advertised_ip> and udp and port <media_port> -c 40 What I’ll look for when you paste outputs • SDP m=/a= lines to confirm negotiated codecs and payload-type mappings. • RTP packet lines to check RTP payload type (PT) and SSRC — to see if packets on the wire match the SDP mapping LiveKit expects. • LiveKit call stats (if you paste them) to correlate packet counts. If you prefer, run the captures now and paste the exact tcpdump output blocks — I’ll analyze PT/SSRC and tell you the single config change (transcode/codec mapping or payload/advertise fix) to restore caller→LiveKit audio.
m
how do I capture the RTP? also the call could be mapped to any port and since there will be only one call we can assume the data is from our failing call
t
Thanks — here are exact, simple steps to capture the RTP for your single failing call. I’ll assume only one call is active so any RTP we capture in the port range is from that call. Run these on the LiveKit node (where LiveKit listens) — replace <iface> with the network interface (e.g., eth0) if needed. 1) Capture RTP across the full port range to a pcap: sudo tcpdump -nn -i <iface> udp portrange 10000-60000 -w /tmp/call.pcap 2) While that command is running, place the failing phone call and keep it connected ~10–15s, then stop tcpdump (Ctrl+C). 3) Extract readable packet lines: sudo tcpdump -nn -r /tmp/call.pcap | head -n 200 Paste the output here. Important lines will show src_ip:src_port -> dst_ip:dst_port and packet lengths — I’ll use those to identify the media port, PT/SSRC, and whether packets arrive. Optional targeted capture (if you prefer to capture only once you know the media port from SIP logs): sudo tcpdump -nn -i <iface> udp and port <media_port> -w /tmp/call.pcap If you also want SIP signaling (SDP) from Kamailio/SIP server, run on that host while making the same call: sudo tcpdump -s 0 -A -i <iface> udp port 5060 -c 200 > /tmp/sip_signaling.txt Then paste the INVITE and 200 OK sections (m= and a= lines). Do the first three steps now and paste the tcpdump text — I’ll analyze payload type, SSRC, and confirm exactly why caller→LiveKit audio isn’t processed.
m
Untitled
t
I didn’t receive the tcpdump output — do you want me to walk through the capture steps again or paste the output when ready?
m
080014.866214 IP 52.5.117.242.8611 > 10.0.30.179.21048: UDP, length 69 080014.866274 IP 52.5.117.242.8611 > 10.0.30.179.21048: UDP, length 69 080014.866330 IP 10.0.30.179.21048 > 52.5.117.242.8611: UDP, length 65 080015.057203 IP 10.0.30.179.21048 > 52.5.117.242.8611: UDP, length 100 080015.058111 IP 52.5.117.242.8611 > 10.0.30.179.21048: UDP, length 64 080015.285470 IP 52.5.117.242.8611 > 10.0.30.179.21048: UDP, length 108 080015.285594 IP 10.0.30.179.21048 > 52.5.117.242.8611: UDP, length 64 080015.686997 IP 10.0.22.222.58774 > 10.0.217.65.53: 45610+ [1au] AAAA? server.lk-sandbox.featherhq.com.default.svc.cluster.local. (86) 080015.687013 IP 10.0.22.222.33793 > 10.0.217.65.53: 37672+ [1au] A? server.lk-sandbox.featherhq.com.default.svc.cluster.local. (86) 080015.687797 IP 10.0.217.65.53 > 10.0.22.222.58774: 45610 NXDomain*- 0/1/1 (179) 080015.687854 IP 10.0.217.65.53 > 10.0.22.222.33793: 37672 NXDomain*- 0/1/1 (179) 080015.688017 IP 10.0.22.222.42464 > 10.0.167.171.53: 52372+ [1au] AAAA? server.lk-sandbox.featherhq.com.svc.cluster.local. (78) 080015.688056 IP 10.0.22.222.38537 > 10.0.217.65.53: 19221+ [1au] A? server.lk-sandbox.featherhq.com.svc.cluster.local. (78) 080015.688793 IP 10.0.217.65.53 > 10.0.22.222.38537: 19221 NXDomain*- 0/1/1 (171) 080015.688812 IP 10.0.167.171.53 > 10.0.22.222.42464: 52372 NXDomain*- 0/1/1 (171) 080015.688938 IP 10.0.22.222.49671 > 10.0.217.65.53: 2294+ [1au] AAAA? server.lk-sandbox.featherhq.com.cluster.local. (74) 080015.688943 IP 10.0.22.222.46894 > 10.0.167.171.53: 53394+ [1au] A? server.lk-sandbox.featherhq.com.cluster.local. (74) 080015.689595 IP 10.0.217.65.53 > 10.0.22.222.49671: 2294 NXDomain*- 0/1/1 (167) 080015.689667 IP 10.0.167.171.53 > 10.0.22.222.46894: 53394 NXDomain*- 0/1/1 (167) 080015.689782 IP 10.0.22.222.39008 > 10.0.167.171.53: 61742+ [1au] AAAA? server.lk-sandbox.featherhq.com.ec2.internal. (73) 080015.689800 IP 10.0.22.222.42473 > 10.0.217.65.53: 16985+ [1au] A? server.lk-sandbox.featherhq.com.ec2.internal. (73) 080015.691401 IP 10.0.167.171.53 > 10.0.22.222.39008: 61742 NXDomain 0/1/1 (158) 080015.691701 IP 10.0.217.65.53 > 10.0.22.222.42473: 16985 NXDomain 0/1/1 (158) 080015.691813 IP 10.0.22.222.36193 > 10.0.217.65.53: 25170+ [1au] AAAA? server.lk-sandbox.featherhq.com. (60) 080015.691823 IP 10.0.22.222.37283 > 10.0.167.171.53: 56912+ [1au] A? server.lk-sandbox.featherhq.com. (60) 080015.695643 IP 10.0.217.65.53 > 10.0.22.222.36193: 25170 1/1/1 CNAME k8s-default-livekits-f318b3f399-573623362.us-east-1.elb.amazonaws.com. (286) 080015.697329 IP 10.0.167.171.53 > 10.0.22.222.37283: 56912 4/0/1 CNAME k8s-default-livekits-f318b3f399-573623362.us-east-1.elb.amazonaws.com., A 18.205.230.189, A 54.243.237.219, A 35.169.56.18 (429) 080015.719738 IP 10.0.22.222.40363 > 10.0.217.65.53: 25677+ [1au] A? turn.lk-sandbox.featherhq.com.default.svc.cluster.local. (84) 080015.719918 IP 10.0.22.222.35497 > 10.0.217.65.53: 14351+ [1au] A? turn.lk-sandbox.featherhq.com.default.svc.cluster.local. (84) 080015.719947 IP 10.0.30.179.7340 > 44.201.180.119.31010: UDP, length 112 080015.719976 IP 10.0.22.222.46922 > 10.0.167.171.53: 46548+ [1au] A? global.stun.twilio.com.default.svc.cluster.local. (77) 080015.720006 IP 44.201.180.119.7340 > 10.0.30.179.31010: UDP, length 112 080015.720043 IP 10.0.30.179.7340 > 44.201.180.119.31010: UDP, length 112 080015.720047 IP 10.0.22.222.42012 > 10.0.167.171.53: 20200+ [1au] A? stun.l.google.com.default.svc.cluster.local. (72) 080015.720102 IP 44.201.180.119.7340 > 10.0.30.179.31010: UDP, length 112 080015.720108 IP 10.0.22.222.34162 > 10.0.217.65.53: 29972+ [1au] AAAA? global.stun.twilio.com.default.svc.cluster.local. (77) 080015.720112 IP 10.0.22.222.40530 > 10.0.217.65.53: 26683+ [1au] AAAA? turn.lk-sandbox.featherhq.com.default.svc.cluster.local. (84) 080015.720174 IP 10.0.22.222.47879 > 10.0.167.171.53: 53313+ [1au] AAAA? stun.l.google.com.default.svc.cluster.local. (72) 080015.720184 IP 10.0.22.222.33563 > 10.0.217.65.53: 13639+ [1au] A? stun1.l.google.com.default.svc.cluster.local. (73) 080015.720573 IP 10.0.217.65.53 > 10.0.22.222.35497: 14351 NXDomain*- 0/1/1 (177) 080015.720611 IP 10.0.217.65.53 > 10.0.22.222.40363: 25677 NXDomain*- 0/1/1 (177) 080015.720661 IP 10.0.217.65.53 > 10.0.22.222.34162: 29972 NXDomain*- 0/1/1 (170) 080015.720686 IP 10.0.22.222.47992 > 10.0.167.171.53: 64035+ [1au] AAAA? stun1.l.google.com.svc.cluster.local. (65) 080015.720739 IP 10.0.217.65.53 > 10.0.22.222.33563: 13639 NXDomain*- 0/1/1 (166) 080015.720752 IP 10.0.22.222.48662 > 10.0.217.65.53: 35464+ [1au] A? turn.lk-sandbox.featherhq.com.svc.cluster.local. (76) 080015.720787 IP 10.0.22.222.39365 > 10.0.217.65.53: 4732+ [1au] AAAA? global.stun.twilio.com.svc.cluster.local. (69) 080015.720864 IP 10.0.22.222.34565 > 10.0.167.171.53: 2475+ [1au] A? turn.lk-sandbox.featherhq.com.svc.cluster.local. (76) 080015.720966 IP 10.0.22.222.38957 > 10.0.167.171.53: 16018+ [1au] A? stun1.l.google.com.svc.cluster.local. (65) 080015.721178 IP 10.0.30.179.31010 > 44.201.180.119.7340: UDP, length 64 080015.721202 IP 10.0.167.171.53 > 10.0.22.222.42012: 20200 NXDomain*- 0/1/1 (165) 080015.721238 IP 44.201.180.119.31010 > 10.0.30.179.7340: UDP, length 64 080015.721256 IP 10.0.167.171.53 > 10.0.22.222.47992: 64035 NXDomain*- 0/1/1 (158) 080015.721302 IP 10.0.30.179.31010 > 44.201.180.119.7340: UDP, length 112 080015.721305 IP 10.0.167.171.53 > 10.0.22.222.46922: 46548 NXDomain*- 0/1/1 (170) 080015.721313 IP 10.0.217.65.53 > 10.0.22.222.40530: 26683 NXDomain*- 0/1/1 (177) 080015.721333 IP 10.0.30.179.48177 > 44.201.180.119.7340: UDP, length 112 080015.721334 IP 10.0.22.222.33962 > 10.0.167.171.53: 58393+ [1au] A? stun.l.google.com.svc.cluster.local. (64) 080015.721350 IP 44.201.180.119.31010 > 10.0.30.179.7340: UDP, length 112 080015.721364 IP 10.0.30.179.48068 > 44.201.180.119.7340: UDP, length 112 080015.721402 IP 10.0.22.222.41706 > 10.0.217.65.53: 20158+ [1au] A? global.stun.twilio.com.svc.cluster.local. (69) 080015.721438 IP 10.0.30.179.31010 > 44.201.180.119.7340: UDP, length 64 080015.721460 IP 10.0.22.222.52137 > 10.0.217.65.53: 20089+ [1au] AAAA? stun1.l.google.com.cluster.local. (61) 080015.721465 IP 10.0.30.179.7340 > 44.201.180.119.31010: UDP, length 64 080015.721467 IP 44.201.180.119.48177 > 10.0.30.179.7340: UDP, length 112 080015.721467 IP 10.0.167.171.53 > 10.0.22.222.38957: 16018 NXDomain*- 0/1/1 (158) 080015.721468 IP 44.201.180.119.48068 > 10.0.30.179.7340: UDP, length 112 080015.721474 IP 10.0.167.171.53 > 10.0.22.222.47879: 53313 NXDomain*- 0/1/1 (165) 080015.721481 IP 10.0.30.179.31010 > 44.201.180.119.7340: UDP, length 112 080015.721489 IP 44.201.180.119.31010 > 10.0.30.179.7340: UDP, length 64 080015.721509 IP 10.0.30.179.48177 > 44.201.180.119.7340: UDP, length 112 080015.721518 IP 44.201.180.119.7340 > 10.0.30.179.31010: UDP, length 64 080015.721522 IP 10.0.30.179.7340 > 44.201.180.119.31010: UDP, length 112 080015.721527 IP 10.0.217.65.53 > 10.0.22.222.39365: 4732 NXDomain*- 0/1/1 (162) 080015.721535 IP 44.201.180.119.31010 > 10.0.30.179.7340: UDP, length 112 080015.721547 IP 10.0.30.179.48068 > 44.201.180.119.7340: UDP, length 112 080015.721565 IP 10.0.22.222.45535 > 10.0.167.171.53: 11388+ [1au] AAAA? turn.lk-sandbox.featherhq.com.svc.cluster.local. (76) 080015.721575 IP 44.201.180.119.7340 > 10.0.30.179.31010: UDP, length 112 080015.721589 IP 10.0.167.171.53 > 10.0.22.222.34565: 2475 NXDomain*- 0/1/1 (169) 080015.721590 IP 10.0.217.65.53 > 10.0.22.222.48662: 35464 NXDomain*- 0/1/1 (169) 080015.721595 IP 44.201.180.119.48177 > 10.0.30.179.7340: UDP, length 112 080015.721599 IP 10.0.167.171.53 > 10.0.22.222.33962: 58393 NXDomain*- 0/1/1 (157) 080015.721639 IP 10.0.30.179.31010 > 44.201.180.119.7340: UDP, length 64 080015.721650 IP 44.201.180.119.48068 > 10.0.30.179.7340: UDP, length 112 080015.721675 IP 10.0.22.222.49023 > 10.0.217.65.53: 43805+ [1au] AAAA? global.stun.twilio.com.cluster.local. (65) 080015.721691 IP 44.201.180.119.31010 > 10.0.30.179.7340: UDP, length 64 080015.721725 IP 10.0.22.222.58204 > 10.0.167.171.53: 2222+ [1au] A? stun1.l.google.com.cluster.local. (61) 080015.721728 IP 10.0.22.222.54678 > 10.0.167.171.53: 53493+ [1au] AAAA? stun.l.google.com.svc.cluster.local. (64) 080015.721797 IP 10.0.22.222.49071 > 10.0.167.171.53: 25446+ [1au] A? turn.lk-sandbox.featherhq.com.cluster.local. (72) 080015.721812 IP 10.0.22.222.53392 > 10.0.217.65.53: 55692+ [1au] A? stun.l.google.com.cluster.local. (60) 080015.721857 IP 10.0.22.222.58030 > 10.0.167.171.53: 27031+ [1au] A? turn.lk-sandbox.featherhq.com.cluster.local. (72) 080015.721858 IP 10.0.30.179.7340 > 44.201.180.119.31010: UDP, length 64 080015.721886 IP 10.0.30.179.7340 > 44.201.180.119.31010: UDP, length 112 080015.721905 IP 10.0.167.171.53 > 10.0.22.222.45535: 11388 NXDomain*- 0/1/1 (169) 080015.721915 IP 44.201.180.119.7340 > 10.0.30.179.31010: UDP, length 64 080015.721935 IP 44.201.180.119.7340 > 10.0.30.179.31010: UDP, length 112 080015.722018 IP 10.0.167.171.53 > 10.0.22.222.49071: 25446 NXDomain*- 0/1/1 (165) 080015.722024 IP 10.0.22.222.53673 > 10.0.217.65.53: 50655+ [1au] AAAA? turn.lk-sandbox.featherhq.com.cluster.local. (72) 080015.722078 IP 10.0.22.222.35761 > 10.0.217.65.53: 39101+ [1au] A? turn.lk-sandbox.featherhq.com.ec2.internal. (71) 080015.722083 IP 10.0.167.171.53 > 10.0.22.222.58030: 27031 NXDomain*- 0/1/1 (165) 080015.722115 IP 10.0.167.171.53 > 10.0.22.222.58204: 2222 NXDomain*- 0/1/1 (154) 080015.722165 IP 10.0.167.171.53 > 10.0.22.222.54678: 53493 NXDomain*- 0/1/1 (157) 080015.722180 IP 10.0.22.222.52249 > 10.0.217.65.53: 15431+ [1au] A? turn.lk-sandbox.featherhq.com.ec2.internal. (71) 080015.722204 IP 10.0.217.65.53 > 10.0.22.222.41706: 20158 NXDomain*- 0/1/1 (162) 080015.722247 IP 10.0.22.222.37602 > 10.0.217.65.53: 65217+ [1au] AAAA? stun.l.google.com.cluster.local. (60) 080015.722268 IP 10.0.22.222.59162 > 10.0.217.65.53: 44925+ [1au] A? stun1.l.google.com.ec2.internal. (60) 080015.722311 IP 10.0.22.222.41757 > 10.0.167.171.53: 33715+ [1au] A? global.stun.twilio.com.cluster.local. (65) 080015.7223
t
Thanks — the latest tcpdump has a lot of DNS/STUN/ICE traffic and some RTP-like packets, but I can’t clearly see the SIP-side RTP packets tied to the failing call. To finish this quickly, please do one of these two simple captures while you place one failing phone call: Option A — capture by SIP server IP and full RTP range (recommended) 1. On the LiveKit node run: sudo tcpdump -nn -i <iface> host <SIP_SERVER_PUBLIC_IP> and udp portrange 10000-60000 -w /tmp/call.pcap 1. Make the failing call for ~10s, then stop tcpdump. 2. Extract readable lines: sudo tcpdump -nn -r /tmp/call.pcap | head -n 200 Paste the output. Option B — capture using the exact media addr from SIP logs 1. From your SIP logs, copy the
addr
value for the failing call (e.g., "168.86.138.224:19392"). 2. On the LiveKit node: sudo tcpdump -nn -i <iface> host 168.86.138.224 and udp and port 19392 -c 200 -w /tmp/call.pcap 1. Make the call, stop capture, then: sudo tcpdump -nn -r /tmp/call.pcap | head -n 200 Paste the output. Also paste the SIP log line that contains
"setting media destination"
for that same call so I can correlate IP/port with the capture. Do one short capture now and paste the first ~50 lines — I’ll analyze PT/SSRC and tell you the exact single config change to restore inbound audio.
m
1 080646 080646.697225 eth0 In IP 10.0.217.65.53 > 10.0.22.222.56835: 47919 NXDomain 0/1/1 (145) 1 080646 080646.697238 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.56835: 47919 NXDomain 0/1/1 (145) 1 080646 080646.697312 eth0 In IP 10.0.217.65.53 > 10.0.22.222.36662: 6439 NXDomain 0/1/1 (149) 1 080646 080646.697316 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.36662: 6439 NXDomain 0/1/1 (149) 1 080646 080646.697332 eth0 In IP 10.0.217.65.53 > 10.0.22.222.49244: 4967 NXDomain 0/1/1 (156) 1 080646 080646.697337 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49244: 4967 NXDomain 0/1/1 (156) 1 080646 080646.697447 eth0 In IP 10.0.217.65.53 > 10.0.22.222.56645: 4310 NXDomain 0/1/1 (156) 1 080646 080646.697455 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.56645: 4310 NXDomain 0/1/1 (156) 1 080646 080646.697761 eth0 In IP 10.0.217.65.53 > 10.0.22.222.40827: 20424 NXDomain 0/1/1 (144) 1 080646 080646.697766 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.40827: 20424 NXDomain 0/1/1 (144) 1 080646 080646.698010 eth0 In IP 10.0.217.65.53 > 10.0.22.222.57132: 64647 NXDomain 0/1/1 (145) 1 080646 080646.698019 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57132: 64647 NXDomain 0/1/1 (145) 1 080646 080646.698394 eni1b43ce3db73 In IP 10.0.22.222.51576 > 10.0.30.179.58247: UDP, length 552 1 080646 080646.700162 eni1b43ce3db73 Out IP 10.0.30.179.58247 > 10.0.22.222.51576: UDP, length 125 1 080646 080646.700237 eth0 In IP 10.0.167.171.53 > 10.0.22.222.39078: 24049 1/1/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com. (291) 1 080646 080646.700251 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.39078: 24049 1/1/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com. (291) 1 080646 080646.700530 eth0 In IP 10.0.217.65.53 > 10.0.22.222.54129: 23354 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.700543 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.54129: 23354 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.702805 eth0 In IP 10.0.167.171.53 > 10.0.22.222.59940: 28128 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.702816 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.59940: 28128 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.706239 eth0 In IP 10.0.217.65.53 > 10.0.22.222.57175: 30354 2/0/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com., A 34.203.251.194 (187) 1 080646 080646.706247 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57175: 30354 2/0/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com., A 34.203.251.194 (187) 1 080646 080646.706884 eth0 In IP 10.0.217.65.53 > 10.0.22.222.58999: 24524 1/1/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com. (225) 1 080646 080646.706895 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.58999: 24524 1/1/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com. (225) 1 080646 080646.710046 eth0 In IP 10.0.167.171.53 > 10.0.22.222.38332: 3784 NXDomain*- 0/1/1 (177) 1 080646 080646.710060 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.38332: 3784 NXDomain*- 0/1/1 (177) 1 080646 080646.710529 eth0 In IP 10.0.167.171.53 > 10.0.22.222.49570: 8034 NXDomain*- 0/1/1 (169) 1 080646 080646.710545 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49570: 8034 NXDomain*- 0/1/1 (169) 1 080646 080646.710924 eth0 In IP 10.0.167.171.53 > 10.0.22.222.40410: 36927 NXDomain*- 0/1/1 (165) 1 080646 080646.710936 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.40410: 36927 NXDomain*- 0/1/1 (165) 1 080646 080646.711335 eth0 In IP 10.0.167.171.53 > 10.0.22.222.48288: 36678 NXDomain* 0/1/1 (156) 1 080646 080646.711343 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.48288: 36678 NXDomain* 0/1/1 (156) 1 080646 080646.711785 eth0 In IP 10.0.167.171.53 > 10.0.22.222.37114: 2890* 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.711794 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.37114: 2890* 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.713965 eth0 In IP 10.0.217.65.53 > 10.0.22.222.57562: 65069 NXDomain*- 0/1/1 (212) 1 080646 080646.713971 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57562: 65069 NXDomain*- 0/1/1 (212) 1 080646 080646.714408 eth0 In IP 10.0.167.171.53 > 10.0.22.222.41722: 30359 NXDomain*- 0/1/1 (204) 1 080646 080646.714419 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.41722: 30359 NXDomain*- 0/1/1 (204) 1 080646 080646.714763 eth0 In IP 10.0.217.65.53 > 10.0.22.222.36129: 52295 NXDomain*- 0/1/1 (204) 1 080646 080646.714772 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.36129: 52295 NXDomain*- 0/1/1 (204) 1 080646 080646.715218 eth0 In IP 10.0.167.171.53 > 10.0.22.222.59215: 34691 NXDomain*- 0/1/1 (200) 1 080646 080646.715230 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.59215: 34691 NXDomain*- 0/1/1 (200) 1 080646 080646.715547 eth0 In IP 10.0.217.65.53 > 10.0.22.222.34530: 4500 NXDomain*- 0/1/1 (200) 1 080646 080646.715558 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.34530: 4500 NXDomain*- 0/1/1 (200) 1 080646 080646.717471 eth0 In IP 10.0.217.65.53 > 10.0.22.222.45623: 32102 NXDomain 0/1/1 (191) 1 080646 080646.717483 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.45623: 32102 NXDomain 0/1/1 (191) 1 080646 080646.717602 eth0 In IP 10.0.217.65.53 > 10.0.22.222.39380: 39994 NXDomain 0/1/1 (191) 1 080646 080646.717615 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.39380: 39994 NXDomain 0/1/1 (191) 1 080646 080646.723913 eth0 In IP 10.0.167.171.53 > 10.0.22.222.50192: 58598 NXDomain*- 0/1/1 (177) 1 080646 080646.723929 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.50192: 58598 NXDomain*- 0/1/1 (177) 1 080646 080646.723949 eth0 In IP 10.0.167.171.53 > 10.0.22.222.44842: 5271 NXDomain*- 0/1/1 (177) 1 080646 080646.723953 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.44842: 5271 NXDomain*- 0/1/1 (177) 1 080646 080646.724027 eth0 In IP 10.0.167.171.53 > 10.0.22.222.57799: 4763 NXDomain*- 0/1/1 (165) 1 080646 080646.724038 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57799: 4763 NXDomain*- 0/1/1 (165) 1 080646 080646.724042 eth0 In IP 10.0.167.171.53 > 10.0.22.222.42174: 40249 NXDomain*- 0/1/1 (170) 1 080646 080646.724053 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.42174: 40249 NXDomain*- 0/1/1 (170) 1 080646 080646.724071 eth0 In IP 10.0.167.171.53 > 10.0.22.222.37269: 50535 NXDomain*- 0/1/1 (170) 1 080646 080646.724079 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.37269: 50535 NXDomain*- 0/1/1 (170) 1 080646 080646.724286 eth0 In IP 10.0.217.65.53 > 10.0.22.222.49556: 36393 NXDomain*- 0/1/1 (177) 1 080646 080646.724287 eth0 In IP 10.0.217.65.53 > 10.0.22.222.35350: 41680 NXDomain*- 0/1/1 (166) 1 080646 080646.724296 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49556: 36393 NXDomain*- 0/1/1 (177) 1 080646 080646.724298 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.35350: 41680 NXDomain*- 0/1/1 (166) 1 080646 080646.724315 eth0 In IP 10.0.217.65.53 > 10.0.22.222.35671: 16225 NXDomain*- 0/1/1 (166) 1 080646 080646.724318 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.35671: 16225 NXDomain*- 0/1/1 (166) 1 080646 080646.724372 eth0 In IP 10.0.217.65.53 > 10.0.22.222.46908: 46101 NXDomain*- 0/1/1 (165) 1 080646 080646.724378 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.46908: 46101 NXDomain*- 0/1/1 (165) 1 080646 080646.724521 eth0 In IP 10.0.167.171.53 > 10.0.22.222.45241: 62582 NXDomain*- 0/1/1 (169) 1 080646 080646.724530 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.45241: 62582 NXDomain*- 0/1/1 (169) 1 080646 080646.724627 eth0 In IP 10.0.167.171.53 > 10.0.22.222.36394: 32843 NXDomain*- 0/1/1 (158) 1 080646 080646.724634 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.36394: 32843 NXDomain*- 0/1/1 (158) 1 080646 080646.724669 eth0 In IP 10.0.167.171.53 > 10.0.22.222.49676: 19158 NXDomain*- 0/1/1 (157) 1 080646 080646.724681 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49676: 19158 NXDomain*- 0/1/1 (157) 1 080646 080646.724772 eth0 In IP 10.0.167.171.53 > 10.0.22.222.57655: 20110 NXDomain*- 0/1/1 (158) 1 080646 080646.724780 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57655: 20110 NXDomain*- 0/1/1 (158) 1 080646 080646.724816 eth0 In IP 10.0.167.171.53 > 10.0.22.222.53977: 23996 NXDomain*- 0/1/1 (157) 1 080646 080646.724835 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.53977: 23996 NXDomain*- 0/1/1 (157) 1 080646 080646.724837 eth0 In IP 10.0.217.65.53 > 10.0.22.222.42883: 38161 NXDomain*- 0/1/1 (162) 1 080646 080646.724845 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.42883: 38161 NXDomain*- 0/1/1 (162) 1 080646 080646.724864 eth0 In IP 10.0.217.65.53 > 10.0.22.222.38923: 39425 NXDomain*- 0/1/1 (169) 1 080646 080646.724869 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.38923: 39425 NXDomain*- 0/1/1 (169) 1 080646 080646.725038 eth0 In IP 10.0.167.171.53 > 10.0.22.222.59799: 42517 NXDomain*- 0/1/1 (154) 1 080646 080646.725050 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.59799: 42517 NXDomain*- 0/1/1 (154)
this should be enough information for the network flow try to find the issue
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
m
This is the dump of the rtp packet 1 080646 080646.697225 eth0 In IP 10.0.217.65.53 > 10.0.22.222.56835: 47919 NXDomain 0/1/1 (145) 1 080646 080646.697238 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.56835: 47919 NXDomain 0/1/1 (145) 1 080646 080646.697312 eth0 In IP 10.0.217.65.53 > 10.0.22.222.36662: 6439 NXDomain 0/1/1 (149) 1 080646 080646.697316 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.36662: 6439 NXDomain 0/1/1 (149) 1 080646 080646.697332 eth0 In IP 10.0.217.65.53 > 10.0.22.222.49244: 4967 NXDomain 0/1/1 (156) 1 080646 080646.697337 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49244: 4967 NXDomain 0/1/1 (156) 1 080646 080646.697447 eth0 In IP 10.0.217.65.53 > 10.0.22.222.56645: 4310 NXDomain 0/1/1 (156) 1 080646 080646.697455 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.56645: 4310 NXDomain 0/1/1 (156) 1 080646 080646.697761 eth0 In IP 10.0.217.65.53 > 10.0.22.222.40827: 20424 NXDomain 0/1/1 (144) 1 080646 080646.697766 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.40827: 20424 NXDomain 0/1/1 (144) 1 080646 080646.698010 eth0 In IP 10.0.217.65.53 > 10.0.22.222.57132: 64647 NXDomain 0/1/1 (145) 1 080646 080646.698019 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57132: 64647 NXDomain 0/1/1 (145) 1 080646 080646.698394 eni1b43ce3db73 In IP 10.0.22.222.51576 > 10.0.30.179.58247: UDP, length 552 1 080646 080646.700162 eni1b43ce3db73 Out IP 10.0.30.179.58247 > 10.0.22.222.51576: UDP, length 125 1 080646 080646.700237 eth0 In IP 10.0.167.171.53 > 10.0.22.222.39078: 24049 1/1/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com. (291) 1 080646 080646.700251 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.39078: 24049 1/1/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com. (291) 1 080646 080646.700530 eth0 In IP 10.0.217.65.53 > 10.0.22.222.54129: 23354 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.700543 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.54129: 23354 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.702805 eth0 In IP 10.0.167.171.53 > 10.0.22.222.59940: 28128 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.702816 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.59940: 28128 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.706239 eth0 In IP 10.0.217.65.53 > 10.0.22.222.57175: 30354 2/0/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com., A 34.203.251.194 (187) 1 080646 080646.706247 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57175: 30354 2/0/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com., A 34.203.251.194 (187) 1 080646 080646.706884 eth0 In IP 10.0.217.65.53 > 10.0.22.222.58999: 24524 1/1/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com. (225) 1 080646 080646.706895 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.58999: 24524 1/1/1 CNAME ec2-34-203-251-194.compute-1.amazonaws.com. (225) 1 080646 080646.710046 eth0 In IP 10.0.167.171.53 > 10.0.22.222.38332: 3784 NXDomain*- 0/1/1 (177) 1 080646 080646.710060 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.38332: 3784 NXDomain*- 0/1/1 (177) 1 080646 080646.710529 eth0 In IP 10.0.167.171.53 > 10.0.22.222.49570: 8034 NXDomain*- 0/1/1 (169) 1 080646 080646.710545 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49570: 8034 NXDomain*- 0/1/1 (169) 1 080646 080646.710924 eth0 In IP 10.0.167.171.53 > 10.0.22.222.40410: 36927 NXDomain*- 0/1/1 (165) 1 080646 080646.710936 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.40410: 36927 NXDomain*- 0/1/1 (165) 1 080646 080646.711335 eth0 In IP 10.0.167.171.53 > 10.0.22.222.48288: 36678 NXDomain* 0/1/1 (156) 1 080646 080646.711343 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.48288: 36678 NXDomain* 0/1/1 (156) 1 080646 080646.711785 eth0 In IP 10.0.167.171.53 > 10.0.22.222.37114: 2890* 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.711794 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.37114: 2890* 2/0/1 CNAME k8s-default-livekits-adb31c69a3-a7f42f19095d45e8.elb.us-east-1.amazonaws.com., A 100.31.18.43 (269) 1 080646 080646.713965 eth0 In IP 10.0.217.65.53 > 10.0.22.222.57562: 65069 NXDomain*- 0/1/1 (212) 1 080646 080646.713971 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57562: 65069 NXDomain*- 0/1/1 (212) 1 080646 080646.714408 eth0 In IP 10.0.167.171.53 > 10.0.22.222.41722: 30359 NXDomain*- 0/1/1 (204) 1 080646 080646.714419 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.41722: 30359 NXDomain*- 0/1/1 (204) 1 080646 080646.714763 eth0 In IP 10.0.217.65.53 > 10.0.22.222.36129: 52295 NXDomain*- 0/1/1 (204) 1 080646 080646.714772 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.36129: 52295 NXDomain*- 0/1/1 (204) 1 080646 080646.715218 eth0 In IP 10.0.167.171.53 > 10.0.22.222.59215: 34691 NXDomain*- 0/1/1 (200) 1 080646 080646.715230 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.59215: 34691 NXDomain*- 0/1/1 (200) 1 080646 080646.715547 eth0 In IP 10.0.217.65.53 > 10.0.22.222.34530: 4500 NXDomain*- 0/1/1 (200) 1 080646 080646.715558 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.34530: 4500 NXDomain*- 0/1/1 (200) 1 080646 080646.717471 eth0 In IP 10.0.217.65.53 > 10.0.22.222.45623: 32102 NXDomain 0/1/1 (191) 1 080646 080646.717483 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.45623: 32102 NXDomain 0/1/1 (191) 1 080646 080646.717602 eth0 In IP 10.0.217.65.53 > 10.0.22.222.39380: 39994 NXDomain 0/1/1 (191) 1 080646 080646.717615 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.39380: 39994 NXDomain 0/1/1 (191) 1 080646 080646.723913 eth0 In IP 10.0.167.171.53 > 10.0.22.222.50192: 58598 NXDomain*- 0/1/1 (177) 1 080646 080646.723929 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.50192: 58598 NXDomain*- 0/1/1 (177) 1 080646 080646.723949 eth0 In IP 10.0.167.171.53 > 10.0.22.222.44842: 5271 NXDomain*- 0/1/1 (177) 1 080646 080646.723953 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.44842: 5271 NXDomain*- 0/1/1 (177) 1 080646 080646.724027 eth0 In IP 10.0.167.171.53 > 10.0.22.222.57799: 4763 NXDomain*- 0/1/1 (165) 1 080646 080646.724038 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57799: 4763 NXDomain*- 0/1/1 (165) 1 080646 080646.724042 eth0 In IP 10.0.167.171.53 > 10.0.22.222.42174: 40249 NXDomain*- 0/1/1 (170) 1 080646 080646.724053 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.42174: 40249 NXDomain*- 0/1/1 (170) 1 080646 080646.724071 eth0 In IP 10.0.167.171.53 > 10.0.22.222.37269: 50535 NXDomain*- 0/1/1 (170) 1 080646 080646.724079 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.37269: 50535 NXDomain*- 0/1/1 (170) 1 080646 080646.724286 eth0 In IP 10.0.217.65.53 > 10.0.22.222.49556: 36393 NXDomain*- 0/1/1 (177) 1 080646 080646.724287 eth0 In IP 10.0.217.65.53 > 10.0.22.222.35350: 41680 NXDomain*- 0/1/1 (166) 1 080646 080646.724296 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49556: 36393 NXDomain*- 0/1/1 (177) 1 080646 080646.724298 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.35350: 41680 NXDomain*- 0/1/1 (166) 1 080646 080646.724315 eth0 In IP 10.0.217.65.53 > 10.0.22.222.35671: 16225 NXDomain*- 0/1/1 (166) 1 080646 080646.724318 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.35671: 16225 NXDomain*- 0/1/1 (166) 1 080646 080646.724372 eth0 In IP 10.0.217.65.53 > 10.0.22.222.46908: 46101 NXDomain*- 0/1/1 (165) 1 080646 080646.724378 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.46908: 46101 NXDomain*- 0/1/1 (165) 1 080646 080646.724521 eth0 In IP 10.0.167.171.53 > 10.0.22.222.45241: 62582 NXDomain*- 0/1/1 (169) 1 080646 080646.724530 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.45241: 62582 NXDomain*- 0/1/1 (169) 1 080646 080646.724627 eth0 In IP 10.0.167.171.53 > 10.0.22.222.36394: 32843 NXDomain*- 0/1/1 (158) 1 080646 080646.724634 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.36394: 32843 NXDomain*- 0/1/1 (158) 1 080646 080646.724669 eth0 In IP 10.0.167.171.53 > 10.0.22.222.49676: 19158 NXDomain*- 0/1/1 (157) 1 080646 080646.724681 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.49676: 19158 NXDomain*- 0/1/1 (157) 1 080646 080646.724772 eth0 In IP 10.0.167.171.53 > 10.0.22.222.57655: 20110 NXDomain*- 0/1/1 (158) 1 080646 080646.724780 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.57655: 20110 NXDomain*- 0/1/1 (158) 1 080646 080646.724816 eth0 In IP 10.0.167.171.53 > 10.0.22.222.53977: 23996 NXDomain*- 0/1/1 (157) 1 080646 080646.724835 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.53977: 23996 NXDomain*- 0/1/1 (157) 1 080646 080646.724837 eth0 In IP 10.0.217.65.53 > 10.0.22.222.42883: 38161 NXDomain*- 0/1/1 (162) 1 080646 080646.724845 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.42883: 38161 NXDomain*- 0/1/1 (162) 1 080646 080646.724864 eth0 In IP 10.0.217.65.53 > 10.0.22.222.38923: 39425 NXDomain*- 0/1/1 (169) 1 080646 080646.724869 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.38923: 39425 NXDomain*- 0/1/1 (169) 1 080646 080646.725038 eth0 In IP 10.0.167.171.53 > 10.0.22.222.59799: 42517 NXDomain*- 0/1/1 (154) 1 080646 080646.725050 eni1b43ce3db73 Out IP 172.18.0.10.53 > 10.0.22.222.59799: 42517 NXDomain*- 0/1/1 (154)