NAT overload or something else

Snom 300 IP phones are configured to use:

  1. reserved IP addresses each
  2. SIP Network identity (port): 50000 + (10 increment for each other phone)
  3. RTP/RTCP: start port - end port (60000-60099 + 100 increment for each other)

All phones are connected to switch (16 port) → router RB750 → Broadbend provider modem (1 public IP).

Nothing else exists on this network, but even then there is a problem with audio:
…from phone log…
[5] 26/8/2011 16:18:03:Dialog -4/2 going to early
[5] 26/8/2011 16:18:33:Dialog -4/2 going to confirmed
[5] 26/8/2011 16:18:36:Dialog -4/2 going to terminated

and at this particular point of time there is a missed call (not all times, but often).

Question:

  1. Do mikrotik changes ports numbers in NAT when he does its translations? Because, it is not necessary to do it when every single phone has different port.
  2. If answer is yes, then, is it possible to somehow overload NAT to force it to use manual written port mapping?
    For example:
    /ip firewall nat
    add action=accept chain=srcnat out-interface=P1-cable protocol=udp src-port=50020
    add action=masquerade chain=srcnat out-interface=P1-cable
    add action=dst-nat chain=dstnat dst-port=50020,60300-60399 in-interface=P1-cable protocol=udp to-addresses=192.168.30.154

We have done these NAT rules and phone on address 192.168.30.154 works, but there is no bytes written in Bytes column of Winbox, so we are not sure…

Thanks

Disclaimer: this is an ‘as far as I know’ thing, I don’t run VoIP through any Linux or RouterOS NAT devices.

  1. Do mikrotik changes ports numbers in NAT when he does its translations? Because, it is not necessary to do it when every single phone has different port.

‘masquerade’ does. It uses port heuristics as inherited from the iptables code.

  1. If answer is yes, then, is it possible to somehow overload NAT to force it to use manual written port mapping?

Yes, but you’ll have to make one entry per phone. Your destination NAT code is spot on, you’ll to duplicate that for the srcnat chain and use an action of ‘src-nat’ with the correct to-address and to-ports.