Routing SIP to specific WAN

Hi,

I have two WAN ports: pppoe-internet and pppoe-voip.
All SIP phones connect to a fixed IP, 172.16.10.1; I route these SIP packets with a mangle rule based on dst-address(-list) and routing marks. Works fine.
Problem are the RTP packets. Their dst-address is generally unkown. Of course I can do a packtet dump each time I don´t hear voice and add those new addresses or subnets to my addresslist and at some time I will get all subnets but there may be more at any time.

The first packet to RTP endpoint comes from the SIP phone, so I can not add those addresses to list by Incoming interface. Also those SIP phones are not really phones but also Fritz Boxes etc, so there are not only SIP connections and I can not add dst-address by SIP-phone-source.

Is there any chance with SIP helper/ALG?

Cheers
Martin

Many SIP devices have RTP port range in settings, so you can set that range and match RTP packets by range.
Other way there may be setting in SIP devices to mark packets with DSCP so you can use those markings in mangle.

To add to what vklpt said, set the RTP range. You’ll need at least two ports per simultaneous active phone call.