acoustic-tiger-29188
03/28/2025, 4:08 AMtall-airline-16756
03/28/2025, 4:08 AMtall-airline-16756
03/28/2025, 4:08 AM<http://pstn.twilio.com|pstn.twilio.com>
.
2. Create an origination URL that points to your self-hosted SIP server using the following command: twilio api trunking v1 trunks origination-urls create \
--trunk-sid <twilio_trunk_sid> \
--friendly-name "LiveKit SIP URI" \
--sip-url "sip:<your_sip_host>;transport=tcp" \
--weight 1 --priority 1 --enabled
3. Associate a Twilio phone number with your trunk using this command: twilio api trunking v1 trunks phone-numbers create \
--trunk-sid <twilio_trunk_sid> \
--phone-number-sid <twilio_phone_number_sid>
For the self-hosted SIP server, you can use Docker Compose. Ensure that both the SIP signaling port (5060) and media port range (10000-20000) are accessible from the Internet for proper functionality.
For more details, you can refer to the documentation: LiveKit SIP Documentation.
Sources: Create and configure a Twilio SIP trunk | LiveKit Docs | Self-hosted SIP server | LiveKit Docsacoustic-tiger-29188
03/28/2025, 4:10 AMtall-airline-16756
03/28/2025, 4:10 AMacoustic-tiger-29188
03/28/2025, 4:11 AMtall-airline-16756
03/28/2025, 4:11 AMdocker-compose.yaml
file from the LiveKit repository using the following commands:
wget <https://raw.githubusercontent.com/livekit/sip/main/docker-compose.yaml>
docker compose up
While the exact content of the docker-compose.yaml
file is not provided in the sources, you may need to modify it to include your public IP address or domain name if required. Ensure that your network and firewall settings allow external access to the necessary ports.
For further details, you can refer to the documentation: LiveKit SIP Documentation.
Sources: Self-hosted SIP server | LiveKit Docsacoustic-tiger-29188
03/28/2025, 4:12 AMtall-airline-16756
03/28/2025, 4:13 AMconfig.yaml
file for your SIP server to match these port configurations: sip_port: 5060
rtp_port: 10000-20000
3. Test the connectivity to these ports from an external network to confirm they are accessible.
For more details, you can refer to the documentation: LiveKit SIP Documentation.
Sources: Self-hosted SIP server | LiveKit Docs | Ports and Firewall | LiveKit Docsacoustic-tiger-29188
03/28/2025, 4:13 AMtall-airline-16756
03/28/2025, 4:14 AMsudo ufw reload
4. Verify the updated rules: `sudo ufw status`Ensure that the required ports are listed as "ALLOW" in the output.
Additionally, ensure that your router or ISP is not blocking these ports. You may need to configure port forwarding on your router if the SIP server is behind NAT.acoustic-tiger-29188
03/28/2025, 4:15 AMtall-airline-16756
03/28/2025, 4:15 AMtelnet
command from an external network to test connectivity to your public IP and the specific ports.
1. Configure port forwarding on your router:
◦ Log in to your router's admin interface (usually accessible via a web browser).
◦ Locate the port forwarding section (this may be under "Advanced Settings" or "NAT Settings").
◦ Add rules to forward traffic on ports 5060 (TCP/UDP) and 10000-20000 (UDP) to the internal IP address of your SIP server.
◦ Save the changes and restart your router if necessary.
1. Contact your ISP:
◦ If the ports remain inaccessible, contact your ISP to confirm that they are not blocking these ports. Some ISPs block certain ports by default for security reasons.
After completing these steps, test the connectivity again to ensure the ports are accessible from the Internet.acoustic-tiger-29188
03/28/2025, 4:19 AMtall-airline-16756
03/28/2025, 4:19 AMuse_external_ip
to true
in the configuration. This allows LiveKit to use STUN to automatically discover your server's public IP address and advertise it to clients.
Here is an example configuration snippet:
use_external_ip: true
This setting is recommended for most cloud environments or any setup where the host has a public IP address but is not directly exposed to the process. If you are running the SIP server in an environment where STUN cannot determine the public IP, you may need to manually specify the external IP address.
For more details, you can refer to the documentation: LiveKit SIP Docker Hub.
Sources: Self-hosted SIP server | LiveKit Docs | Deploying LiveKit | LiveKit Docsacoustic-tiger-29188
03/28/2025, 3:21 PMsip-1 | 2025-03-28T15:16:38.478Z DEBUG sip sip/inbound.go:413 Rejecting inbound flood
tall-airline-16756
03/28/2025, 3:21 PMRejecting inbound flood
indicates that the SIP server is rejecting incoming requests due to a potential flood of traffic. This could happen if the server detects too many requests in a short period of time, which might be interpreted as an attack or misconfiguration.
To troubleshoot this issue:
1. Check the configuration of your SIP server to see if there are any rate-limiting or flood protection settings that might be causing this behavior.
2. Verify that your Twilio SIP trunk is correctly configured and not sending an excessive number of requests to the server.
3. Review the server logs for additional details about the rejected requests to identify the source and reason for the flood detection.
4. Ensure that your network and firewall settings are not causing unintended traffic loops or retries.
If the issue persists, you may need to adjust the flood protection settings on your SIP server or investigate further into the traffic patterns from your Twilio SIP trunk.acoustic-tiger-29188
03/28/2025, 3:23 PMtall-airline-16756
03/28/2025, 3:23 PMacoustic-tiger-29188
03/28/2025, 3:39 PM