I have problem with VoIP provider. I have one Asterisk server and I need to register two numbers from different location. Destination port must be 5060 and source IP address must be address on provider interface for that number (for the first phone it is 172.16.1.2, and for the second phone is 172.168.2.2). How to divide traffic for this two number? I tried to register first with default port 5060 and I have route
Code: Select all
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 172.16.0.180/32 172.16.1.2 1
Code: Select all
chain=dstnat action=dst-nat to-addresses= to-ports=5060 protocol=udp src-address=192.168.0.150 dst-address=172.16.0.180 dst-port=5061
Code: Select all
chain=prerouting action=mark-routing new-routing-mark=VoIP_Second_Number passthrough=no protocol=udp src-address=192.168.0.150 dst-port=5061
Code: Select all
0 A S dst-address=172.16.0.180/32 gateway=10.10.20.242 gateway-status=10.10.20.242 routing-mark=VoIP_Second_Number
Code: Select all
chain=srcnat action=src-nat to-addresses=172.16.2.2 to-ports=5060 protocol=udp src-port=5060