Hello everyone!
Perhaps someone has encountered such a problem, so I ask for help.
Mikrotik CCR1009-7G-1C-1S+ (ROS 7.14.2), freepbx 14.0.17, Asterisk 16.6.2
FreePBX has 3 numbers configured (respectively 3 trunks), one cable from the provider (WAN1) is plugged into the Mikrotik router. Three trunks are registered, the phone numbers are working, you can call these phones from the city and you can also get through from these phones. The sound works.
I plug a second cable from another provider (WAN2) into Mikrotik, both providers are in the Interface list (isp), I set up recursive routing so that I can connect to the office through both providers, but inside the office, all traffic goes through WAN1 in priority, WAN2 is a reserve. In NAT, I change only the port in the rules from the ether port to the group. All services in the office work, and if there are problems in the WAN1 network, Mikrotik switches to WAN2, as soon as Internet access is restored at WAN1, Mikrotik switches to WAN1. Everything seems to be fine, but I notice that one of the three numbers has lost sound in both directions. Registration is successful, the phone from/to the city(s) dials, but there is no dial tone, and if you pick up the phone, there is no voice. First of all, I contacted the telephone operator, but they sent a letter that they receive sip packets from us on one WAN, and RTP packets on the other. First of all, I thought about FreePBX, but there are minimal settings, NAT and Firewall are disabled, in the settings the external address is the WAN1 address, and routing within the VLAN network. Tracing to the SIP operator’s servers goes through WAN1.
On the Mikrtotik router, the following ports are forwarded to NAT:
add action=dst-nat chain=dstnat comment="SIP Trunk" dst-port=\
5060,5061,10000-20000 in-interface-list=isp protocol=udp src-address=\
95.167.42.116 to-addresses=10.1.1.2
I registered the same rule, only from the PBX to the provider’s server, but nothing changed. In general, to be honest, you can disable all SIP rules, then nothing will change - 2 numbers work perfectly, the 3rd number has no sound.
On all Mikrotik, SIP ALG is disabled, I turned it on, selected yes / no in directmedia - nothing changes. On the Mikrotik CRS326-24S-2Q-RM switch - there are no Firewall or NAT settings, only OSPF routing from the router. On the Mikrotik CRS326-24G-2S + RM switch there are no Firewall or NAT settings, only the management network routing.
When disabling the WAN2 port, the trunk of the 3rd number stops registering.
Was I mistaken in the MIkrotik settings? Or is there an error in the PBX settings? Thanks for any help!
Configuration and conditional diagram in the attachment.
config(mikrotik).txt (6.56 KB)
