[asterisk-dev] SIP listen on multiple ports
Benny Amorsen
benny+usenet at amorsen.dk
Tue Jan 10 05:36:53 CST 2012
"Olle E. Johansson" <oej at edvina.net> writes:
> That hack makes it possible to receive on the port, but not send from the port, which may cause issues.
This is almost but not completely true.
Imagine we are trying to get around an ISP blocking UDP port 5060.
Client: 1.2.3.4, sends SIP with source port 6000, destination port 7000
Server: 5.6.7.8, listens on 5060 but has a DNAT passing port 7000 to
port 5060.
The client sends a SIP packet, it starts out as src 6000 dst 7000, gets
translated to src 6000 dst 5060. Asterisk, depending on NAT setting,
hopefully sends a reply src 5060 dst 6000. The Linux kernel will
intercept that packet and change it to src 7000 dst 6000, because it
matches an existing connection. *poof* now no port 5060 traffic hits the
wire.
However, other outbound packets from Asterisk to the same IP with
different source or destination ports will not get translated.
/Benny
More information about the asterisk-dev
mailing list