Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-23 Thread Jaap Winius
On Sat, 23 Mar 2013 00:49:31 +, Jaap Winius wrote:

 There is a file, called /etc/sysctl.d/bindv6only.conf, on my system that
 sets /proc/sys/net/ipv6/bindv6only to 1 and it's been there since June
 2010 when I installed Debian squeeze on my server machine (while squeeze
 was still in its testing phase). I currently have squeeze running on
 almost a dozen other machines, but this file exists on only two of them.
 The rest all have bindv6only set to 0. I have no idea how this file got
 installed on these three machines; dpkg can find no record of it, so
 some package must have created it.

The mystery of /etc/sysctl.d/bindv6only.conf has also been solved. This 
file was created by the postinstall script of the netbase package between 
v4.38 (6 Dec 2009) and v4.42 (25 Jun 2010). Apparently those earlier 
versions of netbase were in Debian squeeze during its testing phase (when 
I installed those three machines), but luckily never made it to the 
squeeze release version. Of course, it would have been even better if the 
later versions of netbase had actively changed or deleted bindv6only.conf 
(if present and unmodified) to remove its potential to cause problems.

Cheers,

Jaap


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-22 Thread Jakob Hirsch
Jaap Winius, 21.03.2013 17:47:
 support IPv6. However, it seems that I can't get it to support both IPv4 
 and IPv6 at the same time. For example, if in sip.conf I set the bindaddr 
 variable to '::' it will only listen on IPv6 and none of my IPv4-only 
 friends and peers will be able to connect to it. On the other hand, if I 
 set it to '0.0.0.0' then it will not listen on IPv6.

This is well explained here: http://serverfault.com/a/39561

In short: In Linux, binding to :: means bind to both ipv6 and ipv4.
Setting /proc/sys/net/ipv6/bindv6only to 1 changes this behaviour, and
Debian has this by default (since squeeze, AFAIK).

So this is a system issue, not an Asterisk. At least unless one
considers Asterisk's shortcoming of not being able to use more than one
socket an issue.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-22 Thread Rob van der Putten

Hi there


Jakob Hirsch wrote:


This is well explained here: http://serverfault.com/a/39561

In short: In Linux, binding to :: means bind to both ipv6 and ipv4.
Setting /proc/sys/net/ipv6/bindv6only to 1 changes this behaviour, and
Debian has this by default (since squeeze, AFAIK).


On my Squeeze box it's '0'.
Having this set to '1' explains a lot.


So this is a system issue, not an Asterisk. At least unless one
considers Asterisk's shortcoming of not being able to use more than one
socket an issue.



Regards,
Rob


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-22 Thread Jaap Winius
On Fri, 22 Mar 2013 10:07:57 +0100, Jakob Hirsch wrote:

 This is well explained here: http://serverfault.com/a/39561

Indeed, that's the solution!

There is a file, called /etc/sysctl.d/bindv6only.conf, on my system that 
sets /proc/sys/net/ipv6/bindv6only to 1 and it's been there since June 
2010 when I installed Debian squeeze on my server machine (while squeeze 
was still in its testing phase). I currently have squeeze running on 
almost a dozen other machines, but this file exists on only two of them. 
The rest all have bindv6only set to 0. I have no idea how this file got 
installed on these three machines; dpkg can find no record of it, so some 
package must have created it.

However, until now it's never been a problem. I never noticed that any of 
the other IPv6-capable server software packages that I've been running 
were affected by it, until I started testing this version of Asterisk. 
So, why is this file here at all? It contains this comment:

  When IPV6_V6ONLY is enabled, daemons interested in both IPv4
  and IPv6 connections must open two listening sockets. This is
  the default behaviour of almost all modern operating systems.

If that's true, then I guess Asterisk's behavior in this case is a little 
out of date. But, with bindv6only set to 0, at least now when I set 
'bindaddr=::' in sip.conf Asterisk will support both IPv4 and IPv6 
instead of only the latter.

Thanks, Jakob!

Cheers,

Jaap


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Asghar Mohammad
please see,

http://lists.digium.com/pipermail/asterisk-users/2013-March/278130.html

On Thu, Mar 21, 2013 at 5:47 PM, Jaap Winius jwin...@umrk.nl wrote:

 Hi folks,

 Following an upgrade to Debian wheezy, I'm now running Asterisk 1.8.13.1.
 As opposed to Asterisk 1.6.2.9 that I ran with squeeze, this version can
 support IPv6. However, it seems that I can't get it to support both IPv4
 and IPv6 at the same time. For example, if in sip.conf I set the bindaddr
 variable to '::' it will only listen on IPv6 and none of my IPv4-only
 friends and peers will be able to connect to it. On the other hand, if I
 set it to '0.0.0.0' then it will not listen on IPv6.

 Is this a bug, or is this simply a limitation of Asterisk 1.8.13.1, or is
 there some other way to configure it for dual-stack support?

 Thanks,

 Jaap


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Michael L. Young
- Original Message -
 From: Jaap Winius jwin...@umrk.nl
 To: asterisk-users@lists.digium.com
 Sent: Thursday, March 21, 2013 12:47:57 PM
 Subject: [asterisk-users] Asterisk 1.8 and dual stack support
 
 Hi folks,
 
 Following an upgrade to Debian wheezy, I'm now running Asterisk
 1.8.13.1.
 As opposed to Asterisk 1.6.2.9 that I ran with squeeze, this version
 can
 support IPv6. However, it seems that I can't get it to support both
 IPv4
 and IPv6 at the same time. For example, if in sip.conf I set the
 bindaddr
 variable to '::' it will only listen on IPv6 and none of my IPv4-only
 friends and peers will be able to connect to it. On the other hand,
 if I
 set it to '0.0.0.0' then it will not listen on IPv6.

How are you determining that it is not listening on IPv4?

bindaddr=:: should allow you to support dual stack.

Michael


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Rob van der Putten

Hi there


Michael L. Young wrote:


How are you determining that it is not listening on IPv4?

bindaddr=:: should allow you to support dual stack.


Which is the way it works with 1:1.8.11.1-1digium1~squeeze.
I even use Asterisk as a RTP audio IPv4 - IPv6 proxy.

Regards,
Rob


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Jaap Winius
On Thu, 21 Mar 2013 12:21:44 -0700, Michael L. Young wrote:

 How are you determining that it is not listening on IPv4?
 
 bindaddr=:: should allow you to support dual stack.

That's what I thought would happen. When I set bindaddr=:: and use 
'netstat -lpn |grep 5060' it shows:

  udp6 0   0 :::5060   :::* 9898/asterisk

Services like this usually also support IPv4 and as much is suggested by 
this comment in the sip.conf that comes with my Asterisk package:

  ; (Note that using bindaddr=:: will show only a single
  ; IPv6 socket in netstat. IPv4 is supported at the same
  ; time using IPv4-mapped IPv6 addresses.)

However, the moment I reload my sip.conf with bindaddr=::, my entire list 
of IPv4-only peers loses contact with Asterisk with warnings about the 
network being unreachable. So, it would appear that the version of 
Asterisk that I'm using is operating with a single stack socket.

Cheers,

Jaap


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Asghar Mohammad
:)

On Thu, Mar 21, 2013 at 10:27 PM, Jaap Winius jwin...@umrk.nl wrote:

 On Thu, 21 Mar 2013 12:21:44 -0700, Michael L. Young wrote:

  How are you determining that it is not listening on IPv4?
 
  bindaddr=:: should allow you to support dual stack.

 That's what I thought would happen. When I set bindaddr=:: and use
 'netstat -lpn |grep 5060' it shows:

   udp6 0   0 :::5060   :::* 9898/asterisk

 Services like this usually also support IPv4 and as much is suggested by
 this comment in the sip.conf that comes with my Asterisk package:

   ; (Note that using bindaddr=:: will show only a single
   ; IPv6 socket in netstat. IPv4 is supported at the same
   ; time using IPv4-mapped IPv6 addresses.)

 However, the moment I reload my sip.conf with bindaddr=::, my entire list
 of IPv4-only peers loses contact with Asterisk with warnings about the
 network being unreachable. So, it would appear that the version of
 Asterisk that I'm using is operating with a single stack socket.

 Cheers,

 Jaap


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Michael L. Young
- Original Message -
 From: Jaap Winius jwin...@umrk.nl
 To: asterisk-users@lists.digium.com
 Sent: Thursday, March 21, 2013 5:27:37 PM
 Subject: Re: [asterisk-users] Asterisk 1.8 and dual stack support
 
 That's what I thought would happen. When I set bindaddr=:: and use
 'netstat -lpn |grep 5060' it shows:
 
   udp6 0   0 :::5060   :::* 9898/asterisk
 
 Services like this usually also support IPv4 and as much is suggested
 by
 this comment in the sip.conf that comes with my Asterisk package:
 
   ; (Note that using bindaddr=:: will show only a single
   ; IPv6 socket in netstat. IPv4 is supported at the same
   ; time using IPv4-mapped IPv6 addresses.)
 
 However, the moment I reload my sip.conf with bindaddr=::, my entire
 list
 of IPv4-only peers loses contact with Asterisk with warnings about
 the
 network being unreachable. So, it would appear that the version of
 Asterisk that I'm using is operating with a single stack socket.

Let me try to understand this.  With bindaddr set as bindaddr=::, upon 
starting Asterisk, you are fine and all your IPv4 peers connect properly.  
Therefore, dual stack is working at this point.  Upon issuing a sip reload, 
your peers lose their ability to communicate with Asterisk?  Is that correct?  
What does netstat -lpn |grep 5060 show after the reload?

These network unreachable warnings are from Asterisk or your peers?

What version of Asterisk are you using?

Asterisk 1.8.0 had IPv6 support in it.  Therefore, every minor version released 
since would still have IPv6 support in it.

Michael

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8 and dual stack support

2013-03-21 Thread Jaap Winius
On Thu, 21 Mar 2013 16:02:17 -0700, Michael L. Young wrote:

 Let me try to understand this.  With bindaddr set as bindaddr=::, upon
 starting Asterisk, you are fine and all your IPv4 peers connect
 properly. Therefore, dual stack is working at this point. ...

You minunderstand. When I start Asterisk with bindaddr=::, the netstat 
output shows that it's using udp6, which usually means that the service 
is running in dual stack mode, but this is apparently not the case. On my 
system, it really is only listening on IPv6. That's why I said that, 
despite appearances, as soon as I reload SIP (or restart Asterisk) with 
this setting, I lose contact with my entire list of IPv4-only peers, 
while Asterisk gives warnings about the network being unreachable (the 
IPv4 network).

I've also tried using multiple bindaddr lines with a mix of IPv4 and IPv6 
addresses, but then the service ends up binding only to the last address. 
Therefore, it looks to me like the version of Asterisk that I'm running 
is only capable of running in single stack mode, supporting either IPv4 
or IPv6, but not both at the same time.

 Upon issuing a sip reload, your peers lose their ability
 to communicate with Asterisk? Is that correct?

That's right.

 What does netstat -lpn |grep 5060 show after the reload?

  udp6 0   0 :::5060   :::* 9898/asterisk

 These network unreachable warnings are from Asterisk or your peers?

From Asterisk. They look like this for two of my IPv4 SIP devices:

[Mar 21 23:24:18] NOTICE[9931]: chan_sip.c:26242 sip_poke_noanswer: Peer 
'1000' is now UNREACHABLE!  Last qualify: 110
[Mar 21 23:24:18] NOTICE[9931]: chan_sip.c:26242 sip_poke_noanswer: Peer 
'patton' is now UNREACHABLE!  Last qualify: 20

I also get errors for connections to SIP servers for which I have 
register entries in the [general] section of sip.conf. The errors for 
one of them, sip.xs4all.nl, which is IPv4 only, look like this:

[Mar 21 23:24:14] ERROR[9931]: netsock2.c:263 ast_sockaddr_resolve: 
getaddrinfo(sip.xs4all.nl, (null), ...): No address associated with 
hostname
[Mar 21 23:24:14] WARNING[9931]: acl.c:582 resolve_first: Unable to 
lookup 'sip.xs4all.nl'

Anyway, as soon as I reload sip without bindaddr=::, these errors stop.

 What version of Asterisk are you using?

Version 1.8.13.1.
 
 Asterisk 1.8.0 had IPv6 support in it.  Therefore, every minor version
 released since would still have IPv6 support in it.

That's good to know, so maybe it's just my minor version that has a bug 
that prevents it from running in dual stack mode. That's what my question 
was about in the first place.

Cheers,

Jaap


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users