for my outbound SIP trunking because my provider (...
# ask-ai
b
for my outbound SIP trunking because my provider (Exotel) requires IP Whitelisting.
t
Thanks for reaching out, Latish. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I see you need to whitelist IPs for outbound SIP to work with Exotel. Quick facts: • LiveKit Cloud does not provide static IP addresses for SIP traffic, so you cannot supply fixed IPs for Exotel to whitelist. • Use SIP username/password (credential-based) authentication for your outbound trunk. • If Exotel requires IP-based filtering anyway, you can ask them to allow the full public range (
0.0.0.0/0
). LiveKit recommends this when static IPs are not available. To move forward, please tell me: 1. Are you configuring the trunk now in LiveKit or already configured it in Exotel? 2. Does Exotel allow credential-based auth (username/password or SIP digest) or only static-IP whitelisting? If you want, I can provide the exact LiveKit docs link and the recommended config steps for credential auth. Sources: SIP outbound trunk | LiveKit docs | SIP overview | LiveKit docs
b
Not yet configured, but exotel has asked for "*The Fully Qualified Domain Name (FQDN) and the destination protocol if you are utilizing dynamic IP addresses".* Exotel supports only static-IP whitelisting, (no username/password).
t
Thanks — I understand Exotel requires an FQDN + destination protocol and only accepts static IP whitelisting (no credential auth). Short answer: LiveKit Cloud cannot provide static IP addresses for SIP outbound. That means there is no fixed IP you can give Exotel to whitelist. Options you can take next: • Ask Exotel if they can accept an FQDN instead of IPs or support DNS-based allowlisting (some providers allow resolving an FQDN to permit traffic). If they do, provide them the LiveKit SIP domain you plan to use (I can confirm the exact FQDN you should supply if you tell me which LiveKit tenant/region or trunk name you’ll use). • Ask Exotel if they can allow the full public range (
0.0.0.0/0
) for your trunk while relying on other controls (they must accept this to route calls from LiveKit). • Use a SIP provider that supports credential-based auth or static outbound IPs if Exotel cannot change policy. Which would you like help with? • I can confirm the exact FQDN to give Exotel if you share your LiveKit tenant/region or desired trunk hostname. • Or I can draft wording you can send to Exotel asking whether they support FQDN/DNS allowlisting or a temporary
0.0.0.0/0
exception.
b
Mumbai region
t
Thanks — I see you’re configuring Exotel in the Mumbai region and they require an FQDN + protocol but only accept static-IP whitelisting. Direct answer: • LiveKit Cloud cannot provide static egress IPs for SIP. You cannot give Exotel a fixed IP range to whitelist. • Use the region-pinned FQDN format for Mumbai: <your-subdomain>.india.sip.livekit.cloud and specify the destination protocol (SIP/UDP or SIP/TCP/TLS) per your trunk settings. Recommended next steps (pick one and I can help): • Ask Exotel to accept DNS/FQDN-based allowlisting and give them the FQDN above plus the protocol you’ll use (e.g., SIP over TLS). I can draft the exact message for Exotel. • If Exotel refuses DNS/FQDN allowlisting, ask if they will temporarily allow the full public range (
0.0.0.0/0
) for the trunk while you validate calls — then tighten controls if possible. • Switch to a SIP provider that supports static IPs or credential-based auth if Exotel’s policy cannot change. Which option would you like me to help with? If you want the FQDN drafted for Exotel, tell me the subdomain you plan to use and the SIP transport (UDP/TCP/TLS). Sources: SIP outbound trunk | LiveKit docs | SIP cloud and region pinning | LiveKit docs
b
The SIP URI shown in LiveKit dashboard can it not be provided to the telephony provider for whitelisting?
t
You're asking whether the SIP URI shown in the LiveKit dashboard can be given to Exotel for IP whitelisting. Short answer: no — not for static IP whitelisting. Why: • The dashboard SIP URI (the FQDN) resolves to dynamic IPs. LiveKit Cloud does not provide fixed/static egress IP addresses for SIP traffic, so there aren't stable IPs Exotel can whitelist. What you can do next: • Provide Exotel the FQDN from your dashboard (for Mumbai: <your-subdomain>.india.sip.livekit.cloud) and ask if they support DNS/FQDN-based allowlisting instead of IPs. • If Exotel requires IP filtering only, ask them whether they can accept a broader CIDR (or temporary
0.0.0.0/0
) for the trunk while you validate calls. • If neither option is possible, consider using a SIP provider that offers static egress IPs or credential-based auth. If you want, tell me the exact SIP URI shown in your dashboard and the transport (UDP/TCP/TLS) and I’ll draft the exact message you can send to Exotel. Which would you prefer?
b
The sip URI that I see in dashboard is of the form <some-id>.sip.livekit.cloud, is this the one?
t
Yes — the URI you see (like <some-id>.sip.livekit.cloud) is the FQDN, but it cannot be used for static IP whitelisting because it resolves to dynamic IPs. What you can do now: • Give Exotel the region-pinned FQDN for Mumbai: <some-id>.india.sip.livekit.cloud and ask if they support DNS/FQDN allowlisting (preferred). • If Exotel insists on IP-only rules, ask them to temporarily allow the full public range (
0.0.0.0/0
) for the trunk — otherwise the trunk won’t be reachable from LiveKit. • If neither option is possible, you’ll need a SIP provider that offers static egress IPs or credential-based auth. If you want, tell me the exact subdomain shown in your dashboard and the transport (UDP/TCP/TLS) and I’ll draft the exact text you can send to Exotel.
b
How to decide UDP/TCP/TLS
t
Thanks — I’ll help you decide which SIP transport to use (UDP / TCP / TLS) and what to tell Exotel. Short guidance • Start with UDP for best latency and typical SIP behavior (port 5060). Use this if your network and Exotel allow UDP. • If INVITEs or signaling are dropped (firewall/NAT issues), switch to TCP (port 5060) — more reliable for traversal. • Use TLS (port 5061) only if you need encrypted SIP signaling or Exotel requires it. TLS requires certificate support on both sides and may need extra config. Practical steps 1. Ask Exotel which transports and ports they accept (UDP 5060, TCP 5060, TLS 5061). Confirm whether they can accept an FQDN (
<your-subdomain>.india.sip.livekit.cloud
) instead of IPs. 2. Test sequence: ◦ Configure LiveKit trunk with
SIP_TRANSPORT_AUTO
or
UDP
and test calls. ◦ If you see registration/INVITE failures, switch to
TCP
and retest. ◦ If you require encryption, enable
TLS
and verify certificates with Exotel. 1. If Exotel refuses FQDN/DNS allowlisting and only accepts static IP ranges, explain that LiveKit does not offer static egress IPs — you will need either Exotel to allow FQDN/DNS or a different SIP provider. If you want, tell me: • The exact subdomain shown in your dashboard and which transport you prefer to test first — I’ll draft the exact message to send to Exotel and provide the LiveKit transport config snippet. Sources: SIP outbound trunk | LiveKit docs | SIP APIs | LiveKit docs | Secure trunking | LiveKit docs | Create and configure a Plivo SIP trunk | LiveKit docs
b
My plan is low-end and I guess it does not support region pinning, this is the SIP URI from my dashboard: sip:5njt9qbiof7.sip.livekit.cloud I faintly recollect that Exotel support TCP/TLS only but not very sure, you can draft a message to exotel accordingly
t
Thanks — I’ll draft a concise message you can send to Exotel. I’ll include your dashboard SIP URI and ask about TCP/TLS plus FQDN/DNS allowlisting. Suggested message to Exotel: Hi Exotel team, I’m setting up an outbound SIP trunk and need IP/host allowlisting. My SIP URI is: sip:5njt9qbiof7.sip.livekit.cloud Please confirm: 1. Which SIP transport(s) and ports do you accept for outbound trunks from providers? (TCP 5060, TLS 5061, UDP 5060, or others) 2. Do you support allowlisting by FQDN/DNS (i.e., permit traffic from the hostname above) instead of static IP addresses? If so, please advise any required TTL/verification steps. 3. If FQDN allowlisting is not possible, can you accept a broader CIDR temporarily (for example 0.0.0.0/0) while we validate connectivity? If you require static IPs, please specify the exact IP ranges you need so we can evaluate alternatives. 4. Do you support SIP credential (username/password or SIP digest) authentication for trunks? If yes, please confirm how to supply credentials during trunk setup. We prefer TCP or TLS if available. Please let me know the exact transport and port you recommend so I can configure the trunk accordingly. Thanks, [Your name / Company] --- If you’d like, I can: • Swap “sip:5njt9qbiof7.sip.livekit.cloud” for the region-pinned FQDN if you upgrade to region pinning later (it would be
<subdomain>.india.sip.livekit.cloud
). • Shorten or localize the message for Exotel support channels (ticket, chat, or email). Which would you prefer?
b
shorten the message and maybe suggest UDP if that is preferred
t
Here’s a short message you can send to Exotel: Hi Exotel team — My outbound SIP URI is: sip:5njt9qbiof7.sip.livekit.cloud Please confirm: 1. Which transports/ports do you accept for provider trunks? (Preferred: UDP 5060; alternatives: TCP 5060, TLS 5061) 2. Can you allowlist by FQDN/DNS for the hostname above instead of static IPs? 3. If FQDN allowlisting is not possible, can you temporarily accept a broader CIDR (e.g., 0.0.0.0/0) while we validate connectivity? Thanks, [Your name / Company]
b
where in livekit to specify UDP/TCP/TLS
t
Good question — here’s the short, clear answer. Acknowledgement • You asked where in LiveKit to specify UDP/TCP/TLS for outbound SIP. Answer • You cannot explicitly set UDP/TCP/TLS in the LiveKit dashboard or API. LiveKit’s SIP stack chooses transport automatically (UDP first, falls back to TCP); TLS is not an exposed option for outbound trunks. What to do next • Tell Exotel we’ll prefer UDP (5060), but LiveKit may use TCP if UDP is blocked. Ask Exotel to accept the FQDN
5njt9qbiof7.sip.livekit.cloud
(or support FQDN/DNS allowlisting) and to permit UDP/TCP on port 5060 (and TLS 5061 if they require it). • Test with Exotel using UDP first; if signaling fails, try TCP. If Exotel insists on strict IP-only allowlisting, you’ll need a provider that supports static egress IPs or consider self-hosting. If you want, I’ll send a one-line message you can forward to Exotel now. Which transport do you want to state as preferred (UDP or TCP)? Sources: Making calls overview | LiveKit docs | Self-hosted SIP server | LiveKit docs | Agents telephony integration | LiveKit docs | Outbound Calling Script | LiveKit docs | Ports and firewall | LiveKit docs
b
While trying to set/configure SIP for exotel through JSON/console, what "address" to use?
t
Use Exotel’s SIP server domain as the
address
. For Exotel that is typically: sbc.exotel.com Example JSON for the outbound trunk (replace credentials as needed):
Copy code
{
  "outbound": {
    "address": "<http://sbc.exotel.com|sbc.exotel.com>"
  },
  "credentials": {
    "username": "your_exotel_username",
    "password": "your_exotel_password"
  }
}
Notes: • LiveKit does not let you force UDP/TCP/TLS; LiveKit will attempt UDP then fall back to TCP. Tell Exotel to accept UDP/TCP on port 5060 (and TLS 5061 if they require it). • Provide Exotel the FQDN from your dashboard (
5njt9qbiof7.sip.livekit.cloud
) and ask if they can allowlist by FQDN/DNS. If they insist on IP-only whitelisting, Exotel will need to confirm acceptable CIDR ranges or you’ll need a provider with static egress IPs. Sources: sip | livekit/livekit_composite | DeepWiki | Agents telephony integration | LiveKit docs | Ports and firewall | LiveKit docs
b
yes, they have allowlisted based on FQDN, but on trying to connect outbound call is not hitting exotel, So I am refining the Trunk configuration. What is sbc in exotel ? I have tried using pstn.in2.exotel.com in address and "address": "13.215.48.12", but both didn't work
t
Thanks — I’ll help debug this. Quick answers • SBC = Session Border Controller — Exotel’s SBC (e.g., sbc.exotel.com) is the SIP gateway that accepts signaling from providers like LiveKit. • Use the SBC FQDN (not a raw IP) in LiveKit’s
address
field:
<http://sbc.exotel.com|sbc.exotel.com>
. Steps to check and try (in order) 1. Set
address
to
<http://sbc.exotel.com|sbc.exotel.com>
(FQDN). Example JSON:
Copy code
{
  "outbound": {
    "address": "<http://sbc.exotel.com|sbc.exotel.com>"
  }
}
1. Confirm Exotel has explicitly allowlisted
5njt9qbiof7.sip.livekit.cloud
(the dashboard FQDN) — IPs may not match their FQDN rule if you used an IP earlier. 2. Ask Exotel to check their logs for incoming SIP INVITEs from your FQDN at the time you call (give them timestamp). If they see no INVITE, the request isn’t reaching Exotel. 3. From LiveKit side, verify DNS resolution and connectivity: ◦ Ensure LiveKit can resolve
<http://sbc.exotel.com|sbc.exotel.com>
. ◦ If you can run a traceroute or DNS lookup from an environment that mirrors LiveKit egress, verify the A records and that port 5060 (UDP/TCP) is reachable. 1. Confirm transport/port Exotel expects (UDP 5060 / TCP 5060 / TLS 5061). LiveKit will try UDP then TCP; TLS isn’t selectable from the dashboard. 2. Verify any credentials or SIP headers Exotel requires (auth username, realm, From/Contact formats). Wrong auth/headers can cause silent drops. 3. Check LiveKit outbound logs for the call attempt (include timestamps) and share relevant INVITE/response snippets if available. If you’d like, I can: • Draft a brief message for Exotel asking them to check for INVITEs (include timestamp) and confirm which transport/port and exact FQDN they expect. • Review any LiveKit logs/INVITE snippets you paste here and point out mismatches (transport, host, SIP headers). Which would you prefer? Sources: Agents telephony integration | LiveKit docs | Examples | livekit/livekit_composite | DeepWiki | Making calls overview | LiveKit docs | Outbound Calling Script | LiveKit docs
b
where to check livekit logs/invite snippets
t
Thanks — here’s exactly where and how to check LiveKit-side logs and INVITE info to debug the Exotel outage. 1) Agent logs (live run-time) • Stream your agent logs to see outbound SIP attempts and errors: ◦ CLI:
lk agent logs --log-type=deploy --id=<your-agent-id>
◦ Look for lines showing SIP INVITE attempts, DNS resolution, connection failures, or transport fallback messages and note timestamps. 2) Outbound trunk config • Verify your trunk is correct: ◦ CLI:
lk sip outbound list
(confirm
address
=
<http://sbc.exotel.com|sbc.exotel.com>
or
<http://pstn.in2.exotel.com|pstn.in2.exotel.com>
as Exotel advised) ◦ If you need the full config, paste it here and I’ll review. 3) API/Call errors (when creating calls) • If CreateSIPParticipantRequest fails, capture the exception metadata — it may include
sip_status
and provider error details. Example (pseudo):
Copy code
except TwirpError as e:
      print(e.metadata.get("sip_status_code"), e.metadata.get("sip_status"))
4) Webhooks (SIP call events) • Enable SIP webhooks in your project to receive
sip_call_initiated
and
sip_call_ended
events. These indicate whether LiveKit attempted the call and why it ended. 5) Exotel side (required) • Ask Exotel to search for INVITEs from your FQDN
5njt9qbiof7.sip.livekit.cloud
at the exact timestamps you saw in agent logs. If Exotel sees no INVITE, the request never reached them. 6) What to capture and share here • Timestamp of a failed call attempt (UTC) • Relevant agent log lines around that timestamp (copy/paste) • Any
sip_status
or error metadata from the API call • Current trunk
address
value you’re using If you paste the agent log snippets and the call timestamp, I’ll analyze them and draft the precise follow-up to Exotel (or recommend LiveKit-side fixes). Sources: sip | livekit/livekit_composite | DeepWiki | Building an Automated IVR Menu Caller | LiveKit docs | server-sdk-js | livekit/livekit_composite | DeepWiki | Agents telephony integration | LiveKit docs
Thanks — I reviewed the log and config you shared. What the log shows • The error means LiveKit attempted an SRV DNS lookup for _sip._udp.pstn.in2.exotel.com and failed to resolve it, so the target host couldn't be resolved/reached. Immediate checks to run 1. Confirm the trunk
address
matches the exact host Exotel expects. Your config shows
<http://sbc.exotel.com|sbc.exotel.com>
— keep that (do not use raw IP) unless Exotel tells you a different FQDN. 2. Ask Exotel whether inbound SIP to them requires SRV records (the lookup in the log is an SRV for _sip._udp...). If they do not publish SRV, LiveKit will try A/AAAA — Exotel should confirm supported hostnames and transports. 3. Have Exotel verify they have explicitly allowlisted the calling FQDN
5njt9qbiof7.sip.livekit.cloud
and that it will accept connections to their SBC (
<http://sbc.exotel.com|sbc.exotel.com>
) from LiveKit. 4. Provide Exotel a sample timestamp when you attempt a call and ask them to check for incoming INVITEs or blocked DNS/SIP attempts at that time. Useful tests (if you can run or ask Exotel to run) • From a network that mirrors LiveKit egress, run: ◦ dig SRV _sip._udp.pstn.in2.exotel.com ◦ dig A/AAAA sbc.exotel.com ◦ nc -v -u sbc.exotel.com 5060 (UDP) and nc -v sbc.exotel.com 5060 (TCP) to test reachability • Ask Exotel whether
<http://pstn.in2.exotel.com|pstn.in2.exotel.com>
is an alias that requires SRV or if
<http://sbc.exotel.com|sbc.exotel.com>
is the canonical SBC hostname. Config guidance for LiveKit • Use
address: "<http://sbc.exotel.com|sbc.exotel.com>"
in the trunk. • Ensure your outbound trunk numbers and any auth fields match Exotel’s required formats. • LiveKit performs SRV lookups; if Exotel requires clients to use a specific host/port without SRV, they must provide that FQDN or A record. If you want, I can: • Draft a short message for Exotel including the exact log line and a request to check for INVITEs at the provided timestamps. • Review any DNS/trace outputs you paste here and point out the next step. Which do you prefer? Sources: Self-hosted SIP server | LiveKit docs | sip | livekit/livekit_composite | DeepWiki | Deploy to a VM | LiveKit docs | Ports and firewall | LiveKit docs | Configuring firewalls | LiveKit docs
b
SCL_fw6emx4ctmrh_BZceDZMFImc0YxRYQKcjXyk9TOY.pcap
t
I didn’t receive any new details — how would you like to proceed? Options: • I can draft the short message to Exotel including the log line and timestamp. • I can review DNS/trace outputs or agent log snippets if you paste them here. • I can provide the exact LiveKit trunk JSON you should try (using
<http://sbc.exotel.com|sbc.exotel.com>
). Which one do you want?
Thanks — I see the error: "call was not authorized by trunk configuration" on an inbound call. What this means • The inbound call to the trunk was rejected because the called number or caller details don’t match the trunk's allowed configuration. Immediate checks and fixes 1. Confirm the called number is listed exactly in the trunk
numbers
array in E.164 format (e.g.,
+917969415087
). 2. Ensure there are no extra characters or formatting differences (spaces, brackets, tel: prefix) between Exotel’s dialed number and the trunk config. 3. If you expect multiple numbers on the trunk, add them all to the trunk
numbers
and save/update the trunk. How to update the trunk quickly • Via CLI/API: update the trunk JSON to include the exact E.164 numbers, for example:
Copy code
{
  "sipTrunkId": "ST_uLUcbqZ8HXS8",
  "name": "Exotel Inbound Trunk",
  "numbers": [
    "+917969415087",
    "+918766749695"
  ]
}
• After updating, retry the inbound call and note the timestamp. If the call still fails • Paste the exact trunk JSON you currently have (copy/paste) and one failed call timestamp (UTC). I’ll check for mismatches and draft a one-line request to Exotel to confirm what number they’re presenting as the destination.
Thanks — the logs show inbound INVITEs coming from a private IP (10.60.5.81), so LiveKit is rejecting them as "not authorized by trunk configuration." What to do next 1. Ask Exotel for the public static outbound IP(s) they use for SIP signaling (TCP/UDP 5060 or TLS 5061). Do NOT accept private IPs (10.x/172.16.x/192.168.x). 2. Update your inbound trunk
host
to Exotel’s public IP(s) (or have them confirm a public FQDN) and ensure the trunk
numbers
array includes the exact E.164 destination (e.g., "+917969415087"). 3. Confirm transport/port with Exotel — your logs show TCP on 5060; ensure Exotel will send INVITEs via TCP 5060 (or instruct if TLS 5061). 4. Retry a call and capture a timestamp + agent log snippet (run
lk agent logs --log-type=deploy --id=<agent-id>
) for the attempt. Quick message you can send to Exotel (paste as-is) Hi — our LiveKit inbound trunk is rejecting INVITEs because they appear from a private IP (10.60.5.81). Please provide the public static IP address(es) you use for outbound SIP signaling to external trunks and confirm the transport/port (TCP/UDP 5060 or TLS 5061). Also confirm which caller/destination numbers you present to upstream trunks. Example log line: fromUri: {host: "10.60.5.81", transport: "SIP_TRANSPORT_TCP"} Timestamp: [paste UTC timestamp of failed attempt] What I can do for you • Draft a shorter/longer message to Exotel. • Validate your updated trunk JSON if you paste it here. • Analyze agent log snippets/timestamps after you retry. Which would you like me to do now? Sources: SIP Lifecycle Management Agent | LiveKit docs | Accepting calls overview | LiveKit docs | sip | livekit/livekit_composite | DeepWiki