Having installed a working asterisk server on my LAN behind a NAT router I decided to move the the same asterisk server setup to AWS Litghtsail thinking it would be simple.
So far I have not been able to get sound between any extensions.
Details:
OS: Ubuntu 24.04.3 LTS x86_64
Asterisk Version: Asterisk 20.6.0~dfsg+~cs6.13.40431414-2build5
[transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
; NAT settings
local_net = [AWS Private internal IP]
local_net = 127.0.0.1/32
local_net = 192.168.0.0/16
external_media_address = [AWS Public IP]
external_signaling_address = [AWS Public IP]endpoint-internal-d70
type = endpoint
disallow = all
allow = ulaw
direct_media = no
transport = transport-udp-nat
media_address = [my LAN external IP]
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
trust_id_outbound = yes
device_state_busy_at = 1
dtmf_mode = rfc4733auth-userpass
type = auth
auth_type = userpassaor-single-reg
type = aor
max_contacts = 2
Incoming calls reach the IVR and the message option can be heard. The selected option rings the appropriate extension. When answering the extension there is no sound either way.
The extensions ring each other, but when answered there is no sound either way.
The AWS server has iptables opening the follow ports:
TRUSTED_ADDR=[AWS Public IP],[AWS Private internal IP],[my LAN external IP]
iptables -A INPUT -p tcp -m tcp -s $TRUSTED_ADDR --dport 4569:5069 -j ACCEPT
iptables -A INPUT -p udp -m udp -s $TRUSTED_ADDR --dport 4569:5069 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s $TRUSTED_ADDR --dport 5080 -j ACCEPT
iptables -A INPUT -p udp -m udp -s $TRUSTED_ADDR --dport 5080 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -s $TRUSTED_ADDR --dport 9999:20001 -j ACCEPT
iptables -A INPUT -p udp -m udp -s $TRUSTED_ADDR --dport 9999:20001 -j ACCEPT
The same ports are open on the AWS Lightsail control panel
The LAN router is Openwrt based and I have tried opening all ports to the AWS server public ip but there is still no sound between the extensions.
The console gives the following output when calling between extension:
[2025-10-11 21:30:34] SECURITY[3777]: res_security_log.c:114 security_event_stasis_cb: SecurityEvent=“SuccessfulAuth”,EventTV=“2025-10-11T21:30:34.644+0000”,Severity=“Informational”,Service=“PJSIP”,EventVersion=“1”,AccountID=“5413”,SessionID=“1_4176616945@192.168.16.122”,LocalAddress=“IPV4/UDP/[AWSPrivateIP]/5060”,RemoteAddress=“IPV4/UDP/[myLANPublicIP]/5060”,UsingPassword=“1”– Executing [5411@Long-Distance:1] NoOp(“PJSIP/5413-00000002”, “”) in new stack– Executing [5411@Long-Distance:2] Set(“PJSIP/5413-00000002”, “CDR_PROP(disable)=1”) in new stack– Executing [5411@Long-Distance:3] Goto(“PJSIP/5413-00000002”, “Internal-Main,5411,1”) in new stack– Goto (Internal-Main,5411,1)– Executing [5411@Internal-Main:1] Verbose(“PJSIP/5413-00000002”, “1, “User 5413 dialed 5411.””) in new stack“User 5413 dialed 5411.”– Executing [5411@Internal-Main:2] Set(“PJSIP/5413-00000002”, “SAC_DIALED_EXTEN=5411”) in new stack– Executing [5411@Internal-Main:3] GotoIf(“PJSIP/5413-00000002”, “0?dialed-BUSY,1:”) in new stack– Executing [5411@Internal-Main:4] Dial(“PJSIP/5413-00000002”, “PJSIP/5411,30,t,T”) in new stack– Called PJSIP/5411– PJSIP/5411-00000003 is ringing
0x737850295fd0 – Strict RTP learning after remote address set to: 192.168.16.188:7078– PJSIP/5411-00000003 answered PJSIP/5413-000000020x7378502bd150 – Strict RTP learning after remote address set to: 192.168.16.122:12760– Channel PJSIP/5411-00000003 joined ‘simple_bridge’ basic-bridge <96b185ed-7691-4bd5-a753-63ed3f1b1b84>– Channel PJSIP/5413-00000002 joined ‘simple_bridge’ basic-bridge <96b185ed-7691-4bd5-a753-63ed3f1b1b84>– Channel PJSIP/5411-00000003 left ‘simple_bridge’ basic-bridge <96b185ed-7691-4bd5-a753-63ed3f1b1b84>– Channel PJSIP/5413-00000002 left ‘simple_bridge’ basic-bridge <96b185ed-7691-4bd5-a753-63ed3f1b1b84>== Spawn extension (Internal-Main, 5411, 4) exited non-zero on ‘PJSIP/5413-00000002’– Executing [h@Internal-Main:1] Hangup(“PJSIP/5413-00000002”, “”) in new stack== Spawn extension (Internal-Main, h, 1) exited non-zero on ‘PJSIP/5413-00000002’
After around 30 seconds the call hangs up.
I clearly have something not configure correctly, but I cannot workout what it is so far.
Any pointers would be appreciated.