[asterisk-dev] [Code Review] Add getnameinfo() to ast_sockaddr_resolve ()

Paul Belanger pabelanger at digium.com
Thu May 5 15:57:00 CDT 2011


On 11-05-05 04:34 PM, Benny Amorsen wrote:
> Simon Perreault<simon.perreault at viagenie.ca>  writes:
>
>> If the user specifies "1050" with "this is *not* a peer", then the
>> reasonable course of action is to interpret this as an IP address.
>
> It could also be an unqualified host name. If your search path is
> example.com, that could turn into 1050.example.com which might have SRV
> or A records.
>
> It might not be worth worrying about though.
>
Well, in the example of SIP/1050, which the original issue report is 
against.  The reporter actually has a configuration issue in sip.conf, 
1050 _should_ be a peer, but is not defined.

The original issue is, this worked in Asterisk 1.4, meaning 
Dial(SIP/1050) would return an error right away because 1050 was not a 
defined peer, but in Asterisk 1.8 it does not, we send a SIP INVITE to a 
bogus IP address.

So, should we make Asterisk 1.8 behave as 1.4, return a failed dial 
attempt if SIP/1050 is not defined in sip.conf?  And then create a new 
sip.conf option were we don't care what getaddrinfo() resolves?

-- 
Paul Belanger
Digium, Inc. | Software Developer
twitter: pabelanger | IRC: pabelanger (Freenode)
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list