[asterisk-dev] SIP listen on multiple ports
Olle E. Johansson
oej at edvina.net
Tue Jan 10 02:44:41 CST 2012
10 jan 2012 kl. 08:33 skrev Alistair Cunningham:
> 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.
That hack makes it possible to receive on the port, but not send from the port, which may cause issues.
/O
More information about the asterisk-dev
mailing list