mammoth-beach-64868
02/25/2026, 11:04 AMtall-airline-16756
02/25/2026, 11:04 AMtall-airline-16756
02/25/2026, 11:04 AMmammoth-beach-64868
02/25/2026, 11:06 AMtall-airline-16756
02/25/2026, 11:06 AMfromHost is empty. Below are focused causes, step-by-step checks you can run, and a few targeted questions so I can narrow the root cause.
Why this happens (short)
• SIP 482 "Request merged" means two or more INVITEs arrived with the same Call-ID and From tag, so the server treated the new INVITE as a duplicate and merged it. That explains the immediate disconnects.
• An empty fromHost in your logs indicates the incoming INVITE’s From header is missing/malformed or is being stripped/altered before LiveKit’s SIP service parses it.
What to check now (priority order)
1. Capture a SIP trace
◦ Use tcpdump/Wireshark on the instance receiving the INVITE to capture the SIP packets. Confirm the initial INVITE’s full headers, especially Call-ID, From, and the From tag.
◦ Verify whether two INVITEs are arriving for the same call (look for identical Call-ID + From tag).
1. Validate the incoming INVITE headers
◦ Confirm the From: header exists and is well-formed (example: From: "Caller" sip:caller@provider.com;tag=xxx).
◦ If From or the tag is missing, the proxy/provider or some intermediary (LB, SBC) is altering headers.
1. Check intermediaries (provider, load balancer, SBC)
◦ Temporarily bypass load balancers, reverse proxies, or session border controllers to see if the issue persists when LiveKit receives the INVITE directly.
◦ Ensure no component is duplicating or retransmitting INVITEs, or stripping/rewriting headers.
1. Inspect retransmissions / provider retries
◦ Some SIP providers aggressively retransmit INVITEs. If a retransmission uses the same Call-ID and From tag, a downstream node may merge them.
◦ Ask your provider if they are sending multiple INVITEs or if any trunking element does retries. Reduce retry aggressiveness if configurable.
1. Verify NAT/Public IP and SIP_TCP/TLS config
◦ Ensure your server’s public IP is correctly used by the SIP provider and that SIP signaling is not being rewritten in a way that removes fromHost.
◦ Confirm TLS/TCP/UDP and ports are correctly open and mapped (and that any TLS termination preserves headers).
1. LiveKit SIP parsing / fromHost logging
◦ Reproduce the call while tailing LiveKit SIP logs at debug level to capture the moment the parser sees an empty fromHost.
◦ Share the log snippet around that event (sanitized of any sensitive tokens) if you want help interpreting it.
1. Test with a simple known-good SIP client
◦ Point a softphone (for example Linphone) directly at your LiveKit SIP endpoint and place an INVITE. If that works reliably, the issue is provider-side or an intermediary is the culprit.
1. Redis / state coordination
◦ Redis is used for state, but 482 is a SIP message-level issue. Still confirm Redis connectivity across LiveKit components so state tracking isn't failing concurrently.
Concrete reproduction/debug steps
1. On the SIP-facing instance run a capture:
◦ tcpdump -i <interface> -s 0 -w siptrace.pcap port 5060 or 5061
1. Place the failing call, then open the pcap in Wireshark and filter for sip and look for:
◦ Duplicate INVITEs (same Call-ID and From tag)
◦ Missing From header or empty host portion
1. Reproduce with a direct client (Linphone) to isolate provider vs server
2. If you see duplicates: check timestamps & source IPs — are they from the same peer or multiple peers?
Targeted questions to narrow this down
• Do the duplicate INVITEs (if present) come from the same source IP or from different IPs?
• Are you using any load balancer, SBC, or proxy in front of your LiveKit SIP service? If so, which product and how is it configured to handle SIP?
• Which transport are you using for SIP (UDP/TCP/TLS) and which ports are open/forwarded?
• Can you share (sanitized) the raw INVITE headers or a short debug log snippet showing the empty fromHost message?
If you share the SIP capture or the sanitized INVITE headers and the short LiveKit SIP log around the failure, I’ll inspect them and point to the exact header or network element causing the merge.
Sources: How to do call transfers with Five9 | LiveKit | sip | livekit/livekit_composite | DeepWiki | Understanding TLS in SIP | LiveKit | Server-side | livekit/livekit_composite | DeepWikimammoth-beach-64868
02/25/2026, 11:14 AMtall-airline-16756
02/25/2026, 11:14 AMfromHost fields and the subsequent negotiate start) and the ongoing 482 "Request merged" disconnects.
What the logs show
• LiveKit’s SIP service is receiving requests and creating ICE candidates, but fromHost is empty in both debug lines you pasted. That means LiveKit did not parse a host portion from the incoming SIP From header (or the header was removed/altered before parsing).
• An empty fromHost can lead to non-unique or malformed dialog identifiers (Call-ID + From tag + From host), which helps explain why downstream elements may see the INVITE as a duplicate and respond with 482 "Request merged".
Immediate checks you can run (quick, high-value)
1. Capture the raw SIP traffic on the SIP-facing instance
◦ Run tcpdump while reproducing the call:
tcpdump -i <iface> -s 0 -w sip.pcap port 5060 or 5061
• Open in Wireshark and inspect the INVITE headers. Verify From: contains a user and host (e.g., From: "Caller" sip:+91802@provider.com;tag=...)
• Confirm the From header is present before LiveKit receives it.
1. Check intermediary components for header rewriting
◦ If you have a load balancer, SBC, SIP proxy, or NAT in front of LiveKit, temporarily point a test SIP client (Linphone) directly at the LiveKit SIP endpoint to see if fromHost appears correctly when bypassing intermediaries.
◦ Many LBs or proxies strip or rewrite headers; ensure they preserve SIP URI hosts and tags.
1. Look for duplicate INVITEs
◦ In the pcap, search for multiple INVITEs with the same Call-ID and From tag. Note source IPs and timestamps — are duplicates from the same IP or multiple IPs?
◦ If duplicates exist, they are what trigger 482. If they are from the same source, the provider or proxy may be retransmitting; if from different sources, there’s a routing duplication.
1. Verify provider trunk / SIP transport settings
◦ Confirm the SIP provider isn’t performing aggressive INVITE retries or forking the INVITE to multiple endpoints with the same dialog identifiers.
◦ Check transport (UDP/TCP/TLS) used by the provider and that port mappings on AWS preserve source/headers properly.
Deeper debug steps (if the quick checks don’t reveal the cause)
1. Turn on more verbose SIP parsing logs in LiveKit and capture the full log around the initial INVITE parse and the moment fromHost is blank. Share a sanitized snippet if you want me to read it.
2. Reproduce with a known-good softphone directly to LiveKit. If that succeeds, the problem is upstream.
3. If you find duplicated INVITEs, capture which component is issuing the second INVITE and inspect its configuration (retransmit timers, fork settings, or multi-homing).
Targeted questions to narrow root cause
• When you inspect the raw INVITE (pcap/Wireshark), does the From: header include a host (e.g., sip:+91802@provider.com)? Or is it missing/empty in the raw packet?
• Are you using a load balancer, SBC, or a SIP proxy between your provider and LiveKit? If yes, which product and is it terminating SIP/TLS?
• Do the duplicate INVITEs (if present) come from the same source IP or from different IPs?
• Which SIP transport are you using (UDP/TCP/TLS) and which port are you forwarding from your provider to the LiveKit instance?
• Can you share a sanitized INVITE (headers only) or a short LiveKit debug log snippet around the parse failure?
If you can run the tcpdump and paste the sanitized INVITE headers or tell me whether direct softphone->LiveKit calls show a proper From, I’ll walk through the exact header fields to identify which component is stripping/rewriting fromHost and how to fix it.mammoth-beach-64868
02/25/2026, 11:15 AMtall-airline-16756
02/25/2026, 11:16 AMfromHost. Below are focused checks and steps specific to outbound calling from LiveKit, plus a few targeted questions so I can pinpoint the problem faster.
What to focus on for outbound calls
• An empty fromHost during outbound flow means LiveKit’s SIP INVITE either lacked or lost the host portion in the From URI before or during transmission. For outbound calls this can happen when LiveKit constructs the INVITE incorrectly or an intermediate network element rewrites/strips the URI host or tag.
• SIP 482 “Request merged” happens when a remote endpoint sees multiple INVITEs with the same dialog identifiers (Call-ID + From tag + From host). If fromHost is empty or inconsistent, other systems may treat INVITEs as duplicates or malformed and merge them.
Outbound-specific checks and fixes
1. Inspect the outbound INVITE LiveKit sends
◦ Capture packets on the LiveKit instance while placing an outbound call:
tcpdump -i <iface> -s 0 -w outbound_sip.pcap host <sip_provider_ip> and port <provider_port>
• In Wireshark, open the INVITE LiveKit sent and verify the From: header includes a host (for example: From: "LiveKit" sip:+91802@your-domain.com;tag=...). If the host is missing, LiveKit is constructing the URI without it.
1. Verify LiveKit SIP trunk configuration
◦ Confirm your SIP trunk settings in LiveKit include the correct outbound domain/host and credentials and that the configured `from`/`caller` identity includes a full SIP URI with host.
◦ Ensure the trunk’s outbound domain is not set to an empty string or IP-less user.
1. Check NAT and SIP host rewriting
◦ If LiveKit runs behind NAT or an ELB that rewrites SIP messages, ensure it preserves the From URI host and does not remove @domain or tags.
◦ Use direct routing (temporarily) from LiveKit to the provider to confirm whether the problem disappears without the intermediary.
1. Confirm transport and port mapping for outbound signaling
◦ Ensure the selected transport (UDP/TCP/TLS) is allowed to the provider and that your public IP/port mapping is consistent. Some SBCs/providers will alter or drop host portions if transport mismatch or improper NAT mapping occurs.
1. Check for duplicate INVITEs from LiveKit
◦ In the capture, search for more than one INVITE originating from your LiveKit node for the same call (same Call-ID). If LiveKit is sending duplicate INVITEs (e.g., retries without proper tags), that will provoke 482.
◦ If duplicates originate from LiveKit, collect the timestamps and stack/log lines around where LiveKit issues the INVITE so we can see why it retried.
1. Ensure proper Call-ID and From tag generation
◦ LiveKit should generate unique Call-IDs and From tags per outbound call. If something in your deployment causes repeated reuse (misconfiguration, restarted process reusing state), that can cause merges. Check logs for callID reuse across calls.
1. Redis/state coordination (outbound)
◦ Redis should be reachable by all LiveKit nodes to coordinate call state. If a node cannot persist state, it may reissue INVITEs thinking prior attempts failed. Confirm no transient Redis errors appear in logs around outbound call time.
Practical reproduction steps to isolate the root cause
1. Make a single outbound call and capture both sides:
◦ Capture on LiveKit (outbound_sip.pcap) and capture on the provider-facing interface (if possible).
1. Inspect the outbound INVITE headers:
◦ Check From: and its host, Call-ID, and From tag.
1. Look for any second INVITE with same Call-ID and From tag and note source IP of each INVITE.
2. Try a direct test: point a minimal SIP client (or a single LiveKit instance configured in a local lab) at the same trunk and confirm the INVITE contains a full host and does not trigger 482.
Targeted questions to narrow this immediately
• In your LiveKit trunk config, what is set as the From or outbound caller identity? Is it a full SIP URI including a host (e.g., <sip:+91802@your-domain.com>)?
• When you capture the outbound INVITE, does the From header shown in the pcap include a host? If it’s missing, please paste the sanitized From: header from the INVITE.
• Do duplicate INVITEs (same Call-ID + From tag) appear in the capture? If yes, are they from the same IP (LiveKit) or multiple IPs?
• Are you using any SBC, ELB, or proxy for outbound traffic that could be rewriting URIs?
• Do LiveKit logs show any Redis errors or retry messages around the outbound INVITE timestamps?
If you can paste the sanitized outbound INVITE headers (just the SIP headers, remove sensitive tokens) or attach the small pcap, I’ll inspect the exact fields and tell you whether LiveKit or an intermediary is at fault and what specific config to change.mammoth-beach-64868
02/26/2026, 4:53 AMtall-airline-16756
02/26/2026, 4:54 AMFrom: host and tag?
3) Compare behavior with LiveKit Cloud
• Compare trunk settings and the From identity between Cloud and EC2. Confirm the outbound caller identity on EC2 is a full SIP URI (e.g., sip:+91802@your-domain.com) and not empty or missing host.
4) Temporarily bypass any LB/SBC/proxy
• If you have an ALB/NLB, SBC, or other proxy in front of the SIP service, temporarily point the trunk directly at the EC2 instance (if safe to do) and retest. If duplication disappears, the intermediary is the likely cause.
5) Check for duplicate registrations / trunk endpoints
• Ensure no other LiveKit instance or SIP endpoint is registered using the same trunk or phone number. Provider-side routing to two endpoints will create duplicate legs.
6) Search LiveKit logs for repeated invite attempts
• Turn on debug logs for the SIP service and look for repeated SendInvite/InviteSent events, or logs showing create_sip_participant being invoked multiple times.
7) Validate Redis/state connectivity
• Confirm the LiveKit node on EC2 can reach Redis and is not losing state mid-call, which might lead it to reissue INVITEs.
Practical reproduction steps (sequence)
1. Start a clean environment with only one agent process on EC2.
2. Start tcpdump on EC2 and place an outbound call.
3. Inspect the pcap for:
◦ Number of INVITEs and their Call‑ID / From tag values.
◦ Source IPs: are both INVITEs coming from EC2 or one from provider?
1. If two INVITEs exist:
◦ If both from EC2 → agent/process is sending duplicates.
◦ If one from EC2 and one from provider/different IP → provider or intermediary is forking or misrouting.
Targeted questions for the next step
• When you capture the SIP traffic, do you see two INVITEs with identical Call‑ID and From tag? If yes, are both from your EC2 IP?
• Is there an ALB/NLB, SBC, or reverse proxy between your provider and the EC2 instance?
• Are you running more than one LiveKit SIP/agent process or container on EC2?
• In your LiveKit trunk configuration on EC2, what is the configured outbound From identity? Is it a full SIP URI including host?
• Do LiveKit logs show the create_sip_participant call twice (or any retry messages) at the same timestamp range?
If you can share (sanitized) answers to the questions above or paste the sanitized From: header from the outbound INVITE or a short pcap snippet, I’ll point to exactly which component is generating the second INVITE and the concrete config change to stop it.
Sources: SIP Lifecycle Management Agent | LiveKit Documentation | Agents telephony integration | LiveKit Documentation | Outbound Calling Script | LiveKit Documentation