I have a problem that when Asterisk is behind NAT, there is a problem with the voice, but when I connect to the public internet everything is fine.
You need to user media address or hostip correctly and either do the equivalent at that other end, or enable comedia at the Asterisk end.
Comedia requires that the other end know a port and IP address that will reach Asterisk on the correct port and internal IP address, so requires port forwarding at the Asterisk end, and almost certainly will require no translation of the port number for RTP ports. The source IP address and port must be ones that the remote router will correctly translate and forward to the remote device.
@david551, thank you for your respond.
This is how my configuration look like
[transport-udp]
type=transport
bind=10.0.116.11
local_net=10.0.116.0/24
external_media_address=ASTERISK_WAN_IP
external_signaling_address=ASTERISK_WAN_IP
;external_signaling_port=7065
[105]
type=auth
auth_type=userpass
username=105
password=**********************
[105]
type=aor
max_contacts=1
[105]
type=endpoint
transport=transport-udp
context=from-internal
disallow=all
allow=alaw,ulaw
auth=105
aors=105
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
ice_support=yes
RTP is sent to the correct client IP address, but the router does not forward it
That’s a problem with the clients’ router configuration. The router needs to either have port forwarding for the clients, or be SIP aware, so it can add temporary rules for the RTP.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.