on asterisk server, can i open a port 5160, instea...
# ask-ai
b
on asterisk server, can i open a port 5160, instead of 5060? to avoid sip scanner.
t
Thanks for reaching out, Jura. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about using port 5160 instead of 5060 on an Asterisk server to avoid SIP scanners. Yes—you can run SIP on port 5160 instead of the default 5060. Changing the port gives only obscurity, not real security, so pair this with strong auth, ACLs, and intrusion-prevention tools (e.g., fail2ban). Two common ways to change the port: • For PJSIP (recommended) — edit
pjsip.conf
and set the transport bind:
Copy code
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5160
• For chan_sip (legacy) — edit `sip.conf`:
Copy code
[general]
port=5160
bindaddr=0.0.0.0
After editing, restart Asterisk:
Copy code
asterisk -rx "core restart now"
Also: • Open/forward UDP (and TCP if used) port 5160 in your firewall/NAT. • Update any SIP peers/devices and SBCs to use port 5160. • Keep standard security: strong passwords, IP allowlists, rate-limiting, and monitoring. Would you like help editing your config or checking firewall rules for your setup? Sources: Ports and firewall | LiveKit docs
b
how does livekit knoow that it should use 5160 instead of 5060
t
You're asking how LiveKit knows to use port 5160 instead of 5060 — yes, LiveKit uses the SIP port configured in its server config. • LiveKit reads the
sip_port
setting in its configuration (for example in
livekit.yaml
). • By default it listens on 5060; to use 5160 set:
Copy code
sip_port: 5160
• Ensure any `rtp_port`/media ranges and your firewall/NAT/load balancer are updated to allow traffic to the new port. • After changing the config, restart the LiveKit server so it begins listening on 5160. Would you like the exact location of the config file or a short restart command for your environment? Sources: Self-hosted SIP server | LiveKit docs
b
can i set
sip_port: 5160
on livekit cloud?
t
You're asking whether you can set
sip_port: 5160
on LiveKit Cloud — short answer: no. LiveKit Cloud uses fixed SIP ports: • SIP (UDP/TCP): 5060 • SIP over TLS: 5061 You cannot change those ports on LiveKit Cloud. If you need a custom SIP port like 5160, you would need to self-host LiveKit (there you can set
sip_port: 5160
in the config) and update your firewall/NAT accordingly. Would you like help evaluating self-hosting options or a checklist of changes required if you move to a self-hosted setup? Sources: Ports and firewall | LiveKit docs | LiveKit Cloud | LiveKit Docs | Self-hosted SIP server | LiveKit docs