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
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.