# Self Hosted SIP Latency Issue

**URL:** <https://community.livekit.io/t/self-hosted-sip-latency-issue/302>\
**Category:** Self Hosting\
**Tags:** agent-deployment, sip-other-provider, google, sip-trunking\
**Created:** [February 14, 2026, 8:37am UTC](https://community.livekit.io/t/self-hosted-sip-latency-issue/302 "2026-02-14T08:37:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zelalem\_Gizachew](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/zelalem_gizachew/32/307_2.png) [@Zelalem\_Gizachew](https://community.livekit.io/u/Zelalem_Gizachew)\
**Post date:** [February 14, 2026, 8:37am UTC](https://community.livekit.io/t/self-hosted-sip-latency-issue/302/1 "2026-02-14T08:37:11Z")

</div>

Hello 👋

I was working on Livekit telephony directly connected to IMS through my SIP url. I’ve deployed all Livekit services [Server, SIP, Agent] on prem. Also created the inbound trunk as well as the dispatch rule. I’ve also a short-code allocated just for this.  
I’ve used Google Realtime model and separate STT, LLM, TTS models as well but I’m experiencing a delay (\>30s) on the generation of the audio from my Agent. The IMS has a configuration to timeout in 30s of inactivity But my Agent has supposed to be generating the audio before that.  
I had 3 successful calls so far, which the agent responded between 7 - 10s after the call get’s picked up. I’ve added many logs to exactly track in which stage it’s failing but even though the call is ended after 30s of inactivity I see the agent logs generating the audio after 10-20 sec after the call has ended.

What could be the issue and how do I resolve this? I’ve asked on ask-ai channel but couldn’t figured it out.

---

<div class="post-metadata">

**Author:** ![legano7997](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@legano7997](https://community.livekit.io/u/legano7997)\
**Post date:** [March 12, 2026, 9:56am UTC](https://community.livekit.io/t/self-hosted-sip-latency-issue/302/2 "2026-03-12T09:56:06Z")

</div>

Yes, I was experiencing the same issue with the SIP trunk.

---

<div class="post-metadata">

**Author:** ![Zelalem\_Gizachew](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/zelalem_gizachew/32/307_2.png) [@Zelalem\_Gizachew](https://community.livekit.io/u/Zelalem_Gizachew)\
**Post date:** [March 12, 2026, 10:54am UTC](https://community.livekit.io/t/self-hosted-sip-latency-issue/302/3 "2026-03-12T10:54:59Z")

</div>

Bro, let me save you the trouble. In my case, it was all the firewall problem. The RTP ports were not configured as they were expected.

---

<div class="post-metadata">

**Author:** ![legano7997](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@legano7997](https://community.livekit.io/u/legano7997)\
**Post date:** [March 12, 2026, 10:58am UTC](https://community.livekit.io/t/self-hosted-sip-latency-issue/302/4 "2026-03-12T10:58:16Z")

</div>

I am receiving RTP on both sides and the required ports are open, but I am still experiencing the same issue.

---

<div class="post-metadata">

**Author:** ![Zelalem\_Gizachew](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/zelalem_gizachew/32/307_2.png) [@Zelalem\_Gizachew](https://community.livekit.io/u/Zelalem_Gizachew)\
**Post date:** [March 13, 2026, 7:29am UTC](https://community.livekit.io/t/self-hosted-sip-latency-issue/302/5 "2026-03-13T07:29:28Z")

</div>

That’s Weird. Maybe use the livekit events for more debugging logs and try to see at which stage it’s delaying.
