[asterisk-dev] SIP listen on multiple ports

Alistair Cunningham acunningham at integrics.com
Tue Jan 10 01:33:00 CST 2012


On 10/01/12 09:06, Johan Wilfer wrote:
> As a work around for ipv4 you can use iptables with a dnat rule, to
> listen to multiple ports, but you will still only have binded to one of
> them.
>
> iptables -t nat -A PREROUTING -d 123.456.789.123 -p udp --dport 5061 -j
> DNAT --to-destination 123.456.789.123:5060
>
> Maybe you have already considered this..

Yes, I've been using this and it works most of the time. The problem is 
that when you're testing new code and things are not working, is it 
because your code is not working, or is it because the iptables hack is 
not working? It's easy to waste lots of time finding out.

Alistair Cunningham
+1 888 468 3111
+44 20 799 39 799
http://integrics.com/



More information about the asterisk-dev mailing list