Wouter Schoot
2010-Aug-04 14:44 UTC
[asterisk-users] Asterisk (1.8-beta2) and SIP IPv4/IPv6 dual-stack possibilities
Dear list, I'm trying to get Asterisk to work dual-stack on Linux and I'm left with a question. Imagine that a user (on the road) connects to Asterisk from various places. Many of them probably don't have IPv6 support yet. However, his house and office do have IPv6 connectivity. I would like to make sure that whenever IPv6 is available, the connection will be made over IPv6, but offer IPv4 as a "fallback" option. The pitfall, in my opinion, is to create one sip.conf entry for that user which supports the voicecalls over IPv4 and IPv6. However, settings like nat=, directmedia= and/or canreinvite= seem to be addressfamily unrelated. I want to configure it in a way that when I connect using IPv6, no NAT options should be set and the mediapath (almost) always should be directly between the peers and not over the Asterisk server (so, "nat=no" and "canreinvite=yes"). But, when a user comes via IPv4, changes are that he's on NAT. When that happens obviously the connections should traverse the NAT using options like "nat=yes" and "canreinvite=no". There's little to no documentation available as far as my google-skills go. There's some in sip.conf, and I couldn't find anything on the website. Does anyone have some pointers for me, either for the configuration of the sip.conf entry or for more documentation on this? Best regards, Wouter Schoot
Ryan Wagoner
2010-Dec-11 03:55 UTC
[asterisk-users] Asterisk (1.8-beta2) and SIP IPv4/IPv6 dual-stack possibilities
On Wed, Aug 4, 2010 at 10:44 AM, Wouter Schoot <wouter at schoot.org> wrote:> Dear list, > > I'm trying to get Asterisk to work dual-stack on Linux and I'm left with > a question. > > Imagine that a user (on the road) connects to Asterisk from various > places. Many of them probably don't have IPv6 support yet. However, his > house and office do have IPv6 connectivity. I would like to make sure > that whenever IPv6 is available, the connection will be made over IPv6, > but offer IPv4 as a "fallback" option. > > The pitfall, in my opinion, is to create one sip.conf entry for that > user which supports the voicecalls over IPv4 and IPv6. However, settings > like nat=, directmedia= and/or canreinvite= seem to be addressfamily > unrelated. I want to configure it in a way that when I connect using > IPv6, no NAT options should be set and the mediapath (almost) always > should be directly between the peers and not over the Asterisk server > (so, "nat=no" and "canreinvite=yes"). > > But, when a user comes via IPv4, changes are that he's on NAT. When that > happens obviously the connections should traverse the NAT using options > like "nat=yes" and "canreinvite=no". > > There's little to no documentation available as far as my google-skills > go. There's some in sip.conf, and I couldn't find anything on the website. > > Does anyone have some pointers for me, either for the configuration of > the sip.conf entry or for more documentation on this? > > Best regards, > > Wouter Schoot >I'm interested in this as well. I tried binding Asterisk to both IPv4 and IPv6 addresses, but Asterisk keeps printing the following warnings WARNING[3542]: chan_sip.c:3183 ast_sip_ouraddrfor: Address remapping activated in sip.conf but we're using IPv6, which doesn't need it. Please remove "localnet" and/or "externaddr" settings. I need localnet and externaddr for IPv4 clients behind NAT. I also want IPv6 support for clients that support it. It seems that it is not possible to run Asterisk in a dual stack configuration and support clients behind NAT. Ryan