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

Andrew Latham lathama at gmail.com
Wed May 4 08:20:34 CDT 2011


On Wed, May 4, 2011 at 9:12 AM, Simon Perreault
<simon.perreault at viagenie.ca> wrote:
> On 2011-05-04 04:47, Benny Amorsen wrote:
>> That would certainly solve the problem. So something like
>> Dial(SIP/foobar/p&SIP/1.2.3.4/i&SIP/for.bar.baz/h) ?
>>
>> p for "peer", which would then only do lookups among peers, i for "ip"
>> which would only accept IP (IPv4 or IPv6, currently) addresses, h for
>> "hostname" which would do a proper DNS lookup ignoring the peer list,
>> and so on?
>
> That would work.
>
> But I see only two categories needed:
> - a peer name
> - something you resolve with getaddrinfo()
>
> I don't think it is useful to disambiguate between an IP address and a
> host name.
>
> Simon
> --
> DTN made easy, lean, and smart --> http://postellation.viagenie.ca
> NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
> STUN/TURN server               --> http://numb.viagenie.ca
>

I must pipe in.  An IP address could be used as a internal domain name
(very unlikley).  Is there some direction in the SIP or other
standards about parsing order? Otherwise the "Host" specification
would be required as I fear that the "peer" would be the default an
thus have no modifier.

-- 
~~~ Andrew "lathama" Latham lathama at gmail.com ~~~



More information about the asterisk-dev mailing list