I accidentally ran into an unusual problem because I have a VIP address for Asterisk on the server. SIP packets are correctly sent via the VIP IP, but RTP packets are sent from the network card’s source address. I have configured the transports, but for some reason, it doesn’t work.
[10.10.3.10-udp]
type=transport
protocol=udp
bind=10.10.3.10:5060
external_media_address=10.10.3.10
external_signaling_address=10.10.3.10
allow_reload=yes
tos=cs3
cos=3
local_net=10.10.3.0/24 ← Network Asterisk Server
local_net=10.20.1.0/24 ← Network VoIP Phone
sudo asterisk -rx “rtp show settings”
General Settings:
Port start: 10000
Port end: 20000
Checksums: Yes
DTMF Timeout: 1200
Strict RTP: Yes
Probation: 4 frames
Replay Protect: Yes
ICE support: Yes
STUN address: 0.0.0.0:0
The routing is fine because I’m using a separate table, and all incoming traffic to the VIP should go out via the VIP address. This works for SIP. However, RTP packets are sent from the network card’s address, not the VIP. The RTP packets are going out with the address 10.10.3.12.
The network card has two IP addresses:
10.10.3.10 ← VIP
10.10.3.12 ← network card’s address