res_pjsip: Add external PJSIP resolver implementation using core DNS API.
authorJoshua Colp <jcolp@digium.com>
Mon, 13 Apr 2015 13:47:01 +0000 (10:47 -0300)
committerJoshua Colp <jcolp@digium.com>
Wed, 15 Apr 2015 13:47:53 +0000 (10:47 -0300)
commita3cec44a0a415e803057a11ab11d80e4f93e10cf
tree550c4a127eae12504f06ae3c7a96927173b0bbb6
parent60d1911482c1dcf44d34e30f252857d75f5d5d77
res_pjsip: Add external PJSIP resolver implementation using core DNS API.

This change adds the following:

1. A query set implementation. This is an API that allows queries to be executed in parallel and once all have completed a callback is invoked.
2. Unit tests for the query set implementation.
3. An external PJSIP resolver which uses the DNS core API to do NAPTR, SRV, AAAA, and A lookups.

For the resolver it will do NAPTR, SRV, and AAAA/A lookups in parallel. If NAPTR or SRV
are available it will then do more queries. And so on. Preference is NAPTR > SRV > AAAA/A,
with IPv6 preferred over IPv4. For transport it will prefer TLS > TCP > UDP if no explicit
transport has been provided. Configured transports on the system are taken into account to
eliminate resolved addresses which have no hope of completing.

ASTERISK-24947 #close
Reported by: Joshua Colp

Change-Id: I56cb03ce4f9d3d600776f36928e0b3e379b5d71e
13 files changed:
CHANGES
configure
configure.ac
include/asterisk/autoconfig.h.in
include/asterisk/dns_core.h
include/asterisk/dns_internal.h
include/asterisk/dns_query_set.h
main/dns_core.c
main/dns_query_set.c
res/res_pjsip.c
res/res_pjsip/include/res_pjsip_private.h
res/res_pjsip/pjsip_resolver.c [new file with mode: 0644]
tests/test_dns_query_set.c [new file with mode: 0644]