S
S
svtrimb2020-11-30 12:54:55
Asterisk
svtrimb, 2020-11-30 12:54:55

How to redirect traffic from astersik to another server?

Greetings to all,
I ask for help in setting up traffic forwarding in Mikrotik.

There is an asterisk server with ip 10.152.22.130 which has a provider's sip gateway with ip 10.152.22.129 (on the latter a sip trunk from the asterisk

is registered). The problem is that one of two things works: the sip trunk works if the provider's sip gateway is specified as the gateway; The sip user works if you assign Mikrotik (distributing Internet) as the gateway, while the sip trunk, respectively, falls off. Asking the sip provider to provide any assistance turned out to be pointless, so I decided to split the traffic with Mikrotik:

First, I specify Mikrotik's ip gateway to Asterisk, then I created a rule in IP-Firewall-NAT (for sip-user):
General:
chain: dstnat
dst.address *external ip Mikrotik*
protocol: 17(udp)

action:
action: dst-nat
To address: 10.152.22.130
Everything is fine here, the client registers on the asterisk without any problems.

I'm trying to "wrap" the sip trunk into the gateway of the sip provideras ip 10.152.22.129, and it doesn't work anymore. I'm doing it
right here, in NAT. (rule as in this thread Is it possible to redirect traffic in the local network to Mikrotik? )
General:
chain: dstnat
src. address 10.152.22.130
dst.address 10.152.22.129
protocol: 17(udp)

action:
action: dst-nat
To address: 10.152.22.129

But there is no registration, even packets do not go. What could be wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question