I am deploying Livekit SIP in an AWS EC2 VM. This ...
# ask-ai
b
I am deploying Livekit SIP in an AWS EC2 VM. This VM has a fixed ElasticIP assigned. While testing the integration with my telephony provider (Genesys), we observe that Genesys is not able to send media (RTP packets) to my VM, where the SIP Gateway is hosted. That's because the IP that Livekit SIP advertises in the Connection Address field of the 200 OK (INVITE) signaling message is the internal IP of the AWS EC2 instance, not the public one. Has anyone encountered this issue before? How has it been solved?
t
Thanks for reaching out, Albert. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm here to help you resolve the issue with LiveKit SIP Gateway advertising the internal IP address in the 200 OK INVITE signaling message. A great way to fix this is by configuring your SIP service to use the public Elastic IP of your AWS EC2 instance. Let me walk you through two friendly approaches: 1. Enable External IP Discovery: Simply set
use_external_ip: true
in your SIP configuration file. This lets the service automatically find and use your public IP address via STUN, making things easier for you. 2. Manually Specify the Public IP: If automatic discovery isn’t working perfectly, you can directly set your public Elastic IP using the
nat_1_to_1_ip
field in the configuration file. For example:
nat_1_to_1_ip: "YOUR_ELASTIC_IP"
Just a quick note: make sure to use only one of these options since they can’t be used together. Also, double-check that your SIP signaling port (default 5060) and media port range (default 10000–20000) are open and accessible on your EC2 instance. If you’d like a hand with any part of this setup or have more questions, please don’t hesitate to reach out. I’m here to support you! Sources: pkg/sip/inbound.go | Self-hosted SIP server | LiveKit Docs | Self-hosting the Ingress Service | LiveKit Docs
b
for the record, option 1 worked perfectly
t
I'm so happy to hear that enabling
use_external_ip: true
helped resolve the issue! If you have any more questions or need a hand with anything else, please don't hesitate to reach out. We're here to support you every step of the way!