Community discussions

MikroTik App
 
rajco
just joined
Topic Author
Posts: 9
Joined: Tue Sep 25, 2012 1:03 pm

One destination two path

Fri Mar 15, 2013 2:14 pm

Hi,
I have problem with VoIP provider. I have one Asterisk server and I need to register two numbers from different location.
Asterisk_3CX_Two_Route_resized.png
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
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
0 A S  172.16.0.180/32                       172.16.1.2              1
and this is working, problem is with second number. I am registering with destination port 5061 and on first router doing DST-Nat:
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 
than I mark traffic:
chain=prerouting action=mark-routing new-routing-mark=VoIP_Second_Number passthrough=no protocol=udp src-address=192.168.0.150 dst-port=5061
and than route:
 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
On second router I have this rule:
chain=srcnat action=src-nat to-addresses=172.16.2.2 to-ports=5060 protocol=udp src-port=5060
Now I can register and receive call but cannot dial.
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Amazon [Bot] and 71 guests