Sun Jun 17, 2018 3:13 pm
When doing src-nat, Mikrotik seems to prefer to keep the original port unchanged where possible; where possible means that no connection already exists with the same remote socket address and using the same local public socket address (socket address = ip.add.re.ss:port). Since the source port of your Asterisk gets replaced to 1024, I assume some other SIP device behind the G router also connects to router O's public address and port 5060. So G delivers any packet from O:5060 to G:5060 to that other device, and thus the connection initiated by the Asterisk had to get another port on the public address.
The remedy should be to use a dst-nat rule forwarding packets coming to G:5060 to the Asterisk, thus "reserving" port 5060 for the Asterisk and forcing the connections of other device(s), presumably phones registering to the PBX behind O, to get the different port.
Or you may create an IPsec tunnel between O and G and bypass the NAT issues completely.