https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi, I need help with inbound calls on
# ❓・ai-evy-support
j
Hi, I need help with inbound calls on Custom SIP trunking (LiveKit). My setup: Self-hosted Kamailio SBC → my carrier (Etisalat, UAE). My outbound works perfectly (Retell → my SBC → carrier → supplier). I'm now trying to get inbound working (customer calls my number → my Retell AI agent answers). The problem: When a call comes in, my SBC forwards the INVITE to my-number@sip.retellai.com. Confirmed via tcpdump that it reaches your IP 18.98.16.120 — but Retell/LiveKit never responds (no 407, no 401, no 200 — just silence, then my side times out with 487). No inbound call appears in my Retell dashboard logs either. What I've already tried: Both sip.retellai.com and the LiveKit host 5t4n6j0wnrl.sip.livekit.cloud Both UDP and TCP transport Added SIP digest auth on my side (but no 401/407 challenge ever comes back from Retell) My number is imported via "Connect to your number via SIP trunking" with an inbound agent assigned. My questions: For inbound by phone number from a self-hosted Kamailio SBC, do you need to whitelist/provision my SBC's public IP on your LiveKit inbound trunk side? Or does my setup require Method 2 (Register Phone Call API + call_id / middleware)? Is there any way to make inbound work with my existing carrier number without middleware? I need to keep my existing carrier number (I can't switch to Twilio/Telnyx). Thank you!
b
@AI Evy Answer this
a
Thanks for tagging me @Brian @ Testzilla.ai. I'll look through relevant sources and get back to you shortly.
### Answer For your inbound setup with a self-hosted Kamailio SBC, here's what you need to know: IP Whitelisting for Inbound Traffic Retell's SIP server expects traffic from specific IP ranges. You can use the IP block
18.98.16.120/30
(All regions) ,
3.42.144.0/23
(All regions) ,
143.223.88.0/21
(certain United States traffic) ,
161.115.160.0/19
(certain United States traffic) to whitelist traffic to Retell's SIP server [(1) ]() . However, this is for outbound traffic from Retell to your infrastructure, not for whitelisting your SBC's IP for inbound calls. The 200 OK Issue with LiveKit There's a known behavior with LiveKit: the
200 OK
will not come from the same IP number as the one you sent the
INVITE
to. If you have a firewall configured, it will block the inbound
200 OK
from LiveKit [(2) ]() . This could explain why you're seeing silence after your INVITE reaches
18.98.16.120
. Your Setup Options Based on the documentation, you have two methods for custom telephony [(1) ]() : Method 1: Elastic SIP Trunking - This is what you're attempting. For inbound calls with this method, your origination settings in your SIP trunking provider need to be correctly configured to route to
sip.retellai.com
. The transport methods supported are TCP (Recommended) , UDP, TLS, and mTLS . Method 2: Dial to SIP URI - If elastic SIP trunking doesn't work with your setup, you would need to use the Register Phone Call API to obtain a
call_id
, then dial to
sip:{call_id}@sip.retellai.com
. You must dial the call to the SIP URI within 5 minutes of calling Register Phone Call . Recommendations 1. Check your firewall rules to ensure the
200 OK
response from LiveKit
(potentially from a different IP) isn't being blocked 2. Verify your SIP transport is set correctly - TCP is recommended 3. Review your origination settings in your SIP trunk configuration 4. If Method 1 continues to fail, consider implementing Method 2 with the Register Phone Call API as middleware For deeper LiveKit traces and SIP-level debugging, you may need to contact Retell support at the [Customer Support Portal]() or support@retellai.com with your call details .
​ To learn more, see the sources I considered: [[1] Connect Retell voice agents to custom telephony](https://docs.retellai.com/deploy/custom-telephony) [[2] Custom Telephony: Livekit never sending 200 but the AI connects on an empty line](https://discord.com/channels/1186424376300679209/1388233797018980382) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.