Page 1 of 1

Routing SIP to specific WAN

Posted: Thu Feb 14, 2019 6:11 pm
by marting
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

Re: Routing SIP to specific WAN

Posted: Tue Feb 19, 2019 10:22 am
by vklpt
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.

Re: Routing SIP to specific WAN

Posted: Tue Feb 19, 2019 8:14 pm
by pcunite
To add to what vklpt said, set the RTP range. You'll need at least two ports per simultaneous active phone call.