[asterisk-bugs] [Asterisk 0019325]: autodomain in sip.conf should be smart enough to detect alternate port from udpbindaddr or similar setting

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 19 14:38:42 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19325 
====================================================================== 
Reported By:                aeg
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19325
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.8.4 
JIRA:                       SWP-3482 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-19 03:14 CDT
Last Modified:              2011-05-19 14:38 CDT
====================================================================== 
Summary:                    autodomain in sip.conf should be smart enough to
detect alternate port from udpbindaddr or similar setting
Description: 
Hello,

today I spent almost 3-4 hrs trying to troubleshoot this issue for two
reasons:

a) I assumed that the setting "autodomain=yes" only works on usage of the
standard bind port. If one was to bind the SIP server on an alternate port
like 5062, it needs to be explicitly added to sip.conf config, like any
other peer i.e.

domain=<localIP>:<bindPort>

b) the message that one receives on the console was misleading as it kept
accepting the call but would say "NOTICE[1613]: chan_sip.c:21581
handle_request_invite: Call from 'boxA' to extension '2222' rejected
because extension not found in context 'Test'." when the extension WAS in
fact present in the given context.

So for the longest time I kept focussing on that when it has NOTHING to do
with the extensions file or the configuration of contexts or anything else.

I only figured it out when I turned on debug and went through the log file
and saw the message: 

[May 19 11:21:58] DEBUG[1613] chan_sip.c: Got SIP INVITE to non-local
domain '10.0.3.6:5062'; refusing request.

when I added this to domain= keyword, it worked

So I reckon two things need to be fixed. 

a) autodomain should be smart-er
b) the message being printed on the console should be what was printed in
the log file as opposed to sending someone on a wild goose chase of
contexts and extensions :)

Kind Regards
====================================================================== 

---------------------------------------------------------------------- 
 (0135171) aeg (reporter) - 2011-05-19 14:38
 https://issues.asterisk.org/view.php?id=19325#c135171 
---------------------------------------------------------------------- 
Sorry, I created that ticket at 3am, so everything in it sounds confusing.
So just wanted to clarify the following points

a) I assumed that setting "autodomain=yes" would include all IPs and Ports
that are being listened on for SIP connections, UDP/TCP/TLS etc. and be
added to the internal ACL, which they're not...only the standard port is.
So autodomain=yes could be made smarter to know ALL IPs and Ports the
Asterisk server is binding/listening to for connections

b) Perhaps even more important is the message that's printed on the
Console. If this message was the message that was in fact printed in the
debug log, point a) is less important as one could simply just make the
configuration change (or in this case manually add the IP and alternate
ports to the domain= setting) and be on their way. But accepting the call
and then talking about a context and extensions totally threw a novice like
me on a wild goose chase of dialplans and extensions :(

Thanks 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-19 14:38 aeg            Note Added: 0135171                          
======================================================================




More information about the asterisk-bugs mailing list