Summary:ASTERISK-16542: [patch] IPv6: SIp show settings doesn't show dual stack support
Reporter:Olle Johansson (oej)Labels:
Date Opened:2010-08-11 04:50:35Date Closed:2010-09-07 16:21:51
Versions:Frequency of
Environment:Attachments:( 0) 17831-v6wildcardbind.diff
Description:build*CLI> sip show settings

Global Settings:
 UDP Bindaddress:        [::]:5060

I suggest that we actually show that we also listen to Ipv4 in "sip show settings" to clarify. This only on systems that actually do this (there was an exception in OpenBSD if I understood Simon correctly)
Comments:By: Simon Perreault (sperreault) 2010-08-11 08:18:44

I disagree.

- IPv4-mapped addresses can also be disabled on at least Linux with a sysctl.
- It would be trying to outsmart the user, which would be a disservice.

By: Olle Johansson (oej) 2010-08-11 08:22:53

Simon, I don't think informing people can ever be a disservice.

Is there any way we can check that sysctl from inside. I really want "sip show settings" to show exactly what we're up to in the Asterisk SIP channel. Currently it's wrong.

By: Olle Johansson (oej) 2010-08-11 09:31:39

Been trying to find that sysctl  - can you give me a pointer, I'm lost!

Thanks, Simon.

By: Simon Perreault (sperreault) 2010-08-11 09:45:36

Look for a variable named bindv6only.

By: Olle Johansson (oej) 2010-08-11 09:50:45

According to http://utcc.utoronto.ca/~cks/space/blog/linux/Bindv6onlyNote this only changes the default setting and applications may override it, so that setting does not prevent dual stack bindings like we do.

We need to tell the user the state of our socket.

By: Olle Johansson (oej) 2010-08-11 09:52:34

According to the IPv6 manual page on http://www.kernel.org/doc/man-pages/online/pages/man7/ipv6.7.html this is a setsockopt option - IPV6_V6ONLY.

By: Olle Johansson (oej) 2010-08-11 09:54:23

I don't find that we set this. On LINUX systems, we should propably set that option to ensure that Asterisk works as expected in the docs.

By: Simon Perreault (sperreault) 2010-08-11 09:56:55

I don't think we should override the user's choice. We should obey the bindv6only setting.

By: Olle Johansson (oej) 2010-08-11 10:01:58

If so,
a) We need to document that, otherwise it will be a support issue soon
b) Need to fix sip show settings to show proper status

By: Jason Parker (jparker) 2010-08-26 14:50:47

Is b) possible?  Is there some way for us to ask the kernel whether this is enabled or not?

By: Marc Blanchet (blanchet) 2010-08-26 14:58:33

I think we should be careful to go deep into the kernel info. I would suggest to add an informative message within the sip show settings such as:

build*CLI> sip show settings

Global Settings:
 UDP Bindaddress: [::]:5060

** Additional Info:
[::]  means that IPv4 and IPv6 are both used if the underlying OS is enabled for both address family.

By: Jason Parker (jparker) 2010-08-26 15:03:12

I definitely agree.  It probably would make sense to have something in sip show settings, but it should also be documented a little more in sip.conf (something that explains the sysctl or whatever).

I can make the changes, if everybody is in agreement here.

By: Simon Perreault (sperreault) 2010-08-26 15:04:11

I think it makes total sense.

By: Jason Parker (jparker) 2010-09-01 17:25:31

I have to retract my earlier agreement.  Somebody would have to modify their sip.conf in order to bind to ::, which means they should have already read the comments in the sample config, regarding this.  Adding this text directly in 'sip show settings' would make the output less uniform and not be all that useful.

As for the sysctl, it appears from comments that there may be issues with using it.  Is it something we want to suggest using?

By: Olle Johansson (oej) 2010-09-06 03:25:29

Qwell, you are assuming that all asterisk users have our sample config file, which is not the case. Many use various forms of GUIs and have other distributions.
I strongly insist that we have a not in "sip show settings" so we at least have an extra way of communicating this. If they don't look at that. they just have to read the original docs.

By: Jason Parker (jparker) 2010-09-07 14:58:26

How's this then?

By: Olle Johansson (oej) 2010-09-07 15:56:28

That seems to be a good start. Thanks.

By: Digium Subversion (svnbot) 2010-09-07 15:58:35

Repository: asterisk
Revision: 285369

U   branches/1.8/channels/chan_sip.c

r285369 | qwell | 2010-09-07 15:58:34 -0500 (Tue, 07 Sep 2010) | 7 lines

Add note to 'sip show settings' regarding dual-stack support, and a :: bindaddress.

(closes issue ASTERISK-16542)
Reported by: oej
     17831-v6wildcardbind.diff uploaded by qwell (license 4)



By: Digium Subversion (svnbot) 2010-09-07 16:21:50

Repository: asterisk
Revision: 285394

_U  trunk/
U   trunk/channels/chan_sip.c

r285394 | qwell | 2010-09-07 16:21:50 -0500 (Tue, 07 Sep 2010) | 14 lines

Merged revisions 285369 via svnmerge from

 r285369 | qwell | 2010-09-07 15:58:34 -0500 (Tue, 07 Sep 2010) | 7 lines
 Add note to 'sip show settings' regarding dual-stack support, and a :: bindaddress.
 (closes issue ASTERISK-16542)
 Reported by: oej
       17831-v6wildcardbind.diff uploaded by qwell (license 4)