[Home]

Summary:ASTERISK-13669: [patch] 'autodomain' doesn't work
Reporter:pj (pj)Labels:
Date Opened:2009-03-01 04:34:10.000-0600Date Closed:2009-09-03 09:49:38
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sip-internip-autodomain1.diff
Description:I haven't any special options for setting network parameters in sip.conf and according to sip.conf.sample it shouln't be needed for 'autodomain' to work, so I think this is bug in asterisk.

[Mar  1 11:18:56] NOTICE[5689]: chan_sip.c:23832 reload_config: Can't add wildcard IP address to domain list, please add IP address to domain manually.

from 'sip.conf.sample':
;autodomain=yes ; Turn this on to have Asterisk add local host
;name and local IP to domain list.


****** ADDITIONAL INFORMATION ******

'sip show settings' from my asterisk:

Network Settings:
---------------------------
 SIP address remapping:  Disabled, no localnet list
 Externhost:             <none>
 Externip:               0.0.0.0:0
 Externrefresh:          10
 Internal IP:            192.168.24.148:5060
 STUN server:            0.0.0.0:0
Comments:By: Leif Madsen (lmadsen) 2009-05-15 09:34:42

What are you expecting to happen here? From what I can see, everything is working as expected.

When you add a domain, you can view it under:  sip show domains

The 'sip show settings' that you are describing have really nothing to do with SIP domain support. You are just describing what the Internal and External IP settings are. I would expect those to be changed with externip and localnet settings, but not autodomain.

When I do this, I get this with 'sip show domains':

*CLI> sip show domains
Our local SIP domains:                   Context              Set by          
development                              (default)            [Automatic]

The NOTICE you're getting I also get. I'm pretty confident this is because it is trying to add 127.0.0.1, which is the wildcard address and Asterisk is ignoring it (as it probably should).

I don't believe there is any bug here.

By: pj (pj) 2009-05-15 09:51:17

I'm expecting, that 'autodomain=yes' adds asterisk server hostname and _ip address_ to domain list, as is writen in sip.conf.sample,
but it doesn't work, instead it generates notice:
[May 15 16:45:06] NOTICE[2031]: chan_sip.c:24552 reload_config: Can't add wildcard IP address to domain list, please add IP address to domain manually.

If I need to add asterisk server "ip adress" into sip domain list, I must manually it configure in sip.conf ie. domain=xx.xx.xx.xx

sip show domains
Our local SIP domains:                   Context              Set by
192.168.1.1                             (default)            [Configured]  <=== must be manually configured in sip.conf
asterisk.foo.bar                                (default)            [Automatic] <<=== hostname is added automatically

By: Matthew Nicholson (mnicholson) 2009-08-14 17:04:58

You are getting that warning message because udpbindaddr is set to '0.0.0.0'.  If you set udpbindaddr to '192.168.1.1', autodomain will add it automatically.

By: Leif Madsen (lmadsen) 2009-08-17 08:11:49

I'm closing this as it is appearing as though this is not really a bug, but perhaps a nuance of how this feature works.

By: pj (pj) 2009-08-17 10:22:16

sorry for reopening, but perhaps some notice about autodomain feature will not work correctly, if default tcp/udp bindaddr (0.0.0.0) is used, should be put into sip.conf.sample to avoid confusing asterisk users.

By: Matthew Nicholson (mnicholson) 2009-08-17 11:15:54

I investigated this a little further.  It should be possible to automatically add the system's IP address to the autodomains list.  If you run 'sip show settings' the ip address for the system is listed in the 'Internal IP' field.  I don't know if there were specific reasons for not automatically adding the internal ip to the domains list.  The external ip is already automatically added.

By: Matthew Nicholson (mnicholson) 2009-08-17 11:32:09

Test with the patch I just uploaded and see if it fixes your issue.

By: Leif Madsen (lmadsen) 2009-08-31 13:32:30

Ping!

Just pinging this issue to see if the original reporter can test this issue so we can get this closed out.

Thanks!

By: pj (pj) 2009-09-01 12:17:48

hello, sorry for delay, due to vacation...
I tested supplied patch right now, it seems is works,
IP of asterisk server is automatically added into sip domain list,
but notice message is still displayed...

[Sep  1 19:13:55] NOTICE[18510]: chan_sip.c:25004 reload_config: Can't add wildcard IP address to domain list, please add IP address to domain manually.

By: Leif Madsen (lmadsen) 2009-09-01 15:09:17

Status changed to assigned while waiting for feedback from the developer.

By: Olle Johansson (oej) 2009-09-03 07:48:11

Hmm. Reassigned by mistake. Anyway - I think the "internip" variable has a poor name, but the patch is fine if you move it up a few lines. Since I assigned it, I will commit it.

By: Digium Subversion (svnbot) 2009-09-03 08:03:27

Repository: asterisk
Revision: 215891

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r215891 | oej | 2009-09-03 08:03:26 -0500 (Thu, 03 Sep 2009) | 10 lines

Add known internal IP address when autodomain=yes

(closes issue ASTERISK-13669)
Reported by: pj
Patches:
     sip-internip-autodomain1.diff uploaded by mnicholson (license 96)
modified by oej
Tested by: pj


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=215891

By: Digium Subversion (svnbot) 2009-09-03 09:22:14

Repository: asterisk
Revision: 215929

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r215929 | oej | 2009-09-03 09:22:13 -0500 (Thu, 03 Sep 2009) | 18 lines

Merged revisions 215891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r215891 | oej | 2009-09-03 15:02:41 +0200 (Tor, 03 Sep 2009) | 10 lines

Add known internal IP address when autodomain=yes

(closes issue ASTERISK-13669)
Reported by: pj
Patches:
     sip-internip-autodomain1.diff uploaded by mnicholson (license 96)
modified by oej
Tested by: pj


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=215929

By: Olle Johansson (oej) 2009-09-03 09:46:40

Btw. I'm the original developer for the domain support. At the time, the insideip did not exist ;-)

By: Digium Subversion (svnbot) 2009-09-03 09:49:37

Repository: asterisk
Revision: 215932

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_sip.c

------------------------------------------------------------------------
r215932 | oej | 2009-09-03 09:49:37 -0500 (Thu, 03 Sep 2009) | 18 lines

Merged revisions 215891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r215891 | oej | 2009-09-03 15:02:41 +0200 (Tor, 03 Sep 2009) | 10 lines

Add known internal IP address when autodomain=yes

(closes issue ASTERISK-13669)
Reported by: pj
Patches:
     sip-internip-autodomain1.diff uploaded by mnicholson (license 96)
modified by oej
Tested by: pj


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=215932