[Asterisk-Dev] IAX2 Native Transfer + NAT
Steven Critchfield
critch at basesys.com
Mon Feb 9 07:58:37 MST 2004
On Mon, 2004-02-09 at 08:45, Steven Sokol wrote:
> Over the weekend I discovered that IAX2 calls are not able to establish
> native audio bridging when two clients are behind the same NAT screen. It
> seems that my Linksys router is not smart enough to "pinwheel" packets
> between two clients behind the screen, so all traffic has to go out through
> the router, to the cable provider's router, back to the Asterisk box (on a
> separate routable IP address but on the same cable modem) then back the same
> path to the router and to the destination client.
>
> Would it be possible for chan_iax2 to discern that both parties to a call
> are behind the same NAT screen and using inside IP addresses 192.168.1.X and
> 192.168.1.Y, then direct the clients to communicate on the appropriate ports
> on their "inside" addresses? Or to try (TXCNT/TXREJ) before forcing the
> conversation to pass through several additional switching/routing points
> (most of which are not TOS-aware)?
>
> Anybody have a guess as to how hard that would be?
How do you propose you would figure out that you are behind the same nat
screen? You mentioned in your example that you came in via a separate IP
address. As far as asterisk could be concerned, that may well have been
your neighbors nat it was connecting to. You can't go by the inside
addresses as it is likely for people behind nats to have the same
private address space.
So 2 simple solutions to this is to either get a better router that can
"pinwheel" your traffic, or make your dialplan such that it doesn't go
outside of the network unless it needs to.
--
Steven Critchfield <critch at basesys.com>
More information about the asterisk-dev
mailing list