Skip to content

LiveKit SIP + Asterisk: "Media Timeout" Error When Receiving Calls #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
haitham-ramadan opened this issue Apr 21, 2025 · 3 comments
Open

Comments

@haitham-ramadan
Copy link

📞 Issue with LiveKit SIP + Asterisk: "Media Timeout" Error When Receiving Calls

Hey everyone,

I’ve configured Asterisk and LiveKit SIP on my server (Docker version), and I'm currently facing a frustrating issue.

When I try to make a call to a LiveKit SIP endpoint:

  • The call reaches LiveKit (I see it coming in),
  • But the agent does not respond,
  • And after a few seconds, I get a Media Timeout error.

Here’s a log snippet from livekit_sip:

sip_1 | 2025-04-21T23:34:19.883Z   WARN    sip     sip/inbound.go:721      Closing inbound call with error {"nodeID": "NE_JKTvPFRB8F4C", "callID": "SCL_AnxXXHcbPbJx", "fromIP": "197.60.191.230", "toIP": "167.71.48.30:5060", "fromHost": "167.71.48.30", "fromUser": "123", "toHost": "167.71.48.30", "toUser": "15105550100", "sipTag": "as0a5b1942", "sipCallID": "[email protected]:5060", "sipRule": "SDR_wchirf4FN4DF", "room": "test_room", "participant": "sip_123", "participantName": "Phone 123", "reason": "media-timeout"}

🔍 I’ve looked through this related issue but haven’t had success:
👉 #231

I’ve double-checked:

  • SIP registration is correct
  • Asterisk and LiveKit are configured correctly
  • Room exists and credentials are right

Still can’t figure out why the media is not being negotiated or received. Any tips?

Thanks in advance 🙏
Image
Image

@dennwc
Copy link
Contributor

dennwc commented Apr 22, 2025

The problem is likely that something is blocking RTP traffic between the two services. Are these deployed on the same host?

@KTarun003
Copy link

I have the same issue , but I am using livekit cloud. I have verified that RTP packets from asterisk have been sent to the livekit server but i have no way of verifying it if have been recieved there and I am not getting any incoming traffic. I have checked this with Wireshark.

@KTarun003
Copy link

My issue has been resolved, my server was in a private network hence I had to add NAT rule and add externip in sip.conf.

Like this:

[general]
externip=<ip>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants