I've a PBX behind my mikrotik RB4011iGS+. My ISP gave me a private subnet for VOIP traffic and a public IP for my internet traffic. So I set up a 1:1 NAT between my PBX private address and my ISP VOIP subnet address for all the traffic except NTP (which is routed to internet subnet).
The problem is: I can register the PBX to my ISP VOIP server, I can receive and place calls, but the voice of the call come only from external to internal and not from my phone to external (to be honest I hear an echo of my voice from my side). The strange thing is that when I enable torch tool on the outgoing inerface or on the PBX interface, traffic flows right both inward and outward and I don't hear the echo anymore from my phone. I really don't know what to think and what to do.
Code: Select all
add address=172.29.0.1/24 comment="IP VOIP network" interface=ether2 network=172.29.0.0
/ip firewall filter
add action=accept chain=forward dst-address=172.29.0.1 in-interface-list=VOIP log=yes log-prefix=PBX out-interface-list=LAN
add action=accept chain=forward comment=PBX dst-address=192.168.1.246 in-interface-list=VOIP out-interface-list=LAN
add action=accept chain=forward in-interface-list=LAN log=yes log-prefix=PBX out-interface-list=VOIP src-address=192.168.1.246
add action=accept chain=forward comment=PBX in-interface-list=LAN out-interface-list=VOIP src-address=172.29.0.1
add action=accept chain=forward comment=PBX routing-mark=voip-out
/ip firewall mangle
add action=mark-routing chain=prerouting comment="PBX NTP" disabled=yes dst-address=193.204.114.232 new-routing-mark=main passthrough=yes src-address=192.168.1.246
add action=mark-routing chain=prerouting comment="PBX VOIP out mark" log=yes log-prefix="MARK PBX" new-routing-mark=voip-out passthrough=yes src-address=192.168.1.246
add action=mark-routing chain=output comment="PBX VOIP OUT" new-routing-mark=voip-out passthrough=yes src-address=192.168.1.246
/ip firewall nat
add action=dst-nat chain=dstnat comment="NAT 1:1 PBX" dst-address=172.29.0.1 in-interface-list=VOIP log=yes log-prefix=DST-NAT-PBX to-addresses=192.168.1.246
add action=src-nat chain=srcnat comment="PBX 1:1 NAT" log=yes log-prefix=SRC_NAT_PBX routing-mark=voip-out src-address=192.168.1.246 to-addresses=172.29.0.1
/ip route
add comment="gateway route out VOIP PBX" distance=1 gateway=172.29.0.254 routing-mark=voip-out
172.29.0.1: assigned IP from my ISP for my PBX
Thank you