[asterisk-commits] file: branch group/dns_pjsip r434213 - /team/group/dns_pjsip/res/res_pjsip/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 7 06:58:54 CDT 2015
Author: file
Date: Tue Apr 7 06:58:44 2015
New Revision: 434213
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434213
Log:
If an explicit transport is specified restrict the NAPTR records to it.
Modified:
team/group/dns_pjsip/res/res_pjsip/pjsip_resolver.c
Modified: team/group/dns_pjsip/res/res_pjsip/pjsip_resolver.c
URL: http://svnview.digium.com/svn/asterisk/team/group/dns_pjsip/res/res_pjsip/pjsip_resolver.c?view=diff&rev=434213&r1=434212&r2=434213
==============================================================================
--- team/group/dns_pjsip/res/res_pjsip/pjsip_resolver.c (original)
+++ team/group/dns_pjsip/res/res_pjsip/pjsip_resolver.c Tue Apr 7 06:58:44 2015
@@ -221,6 +221,7 @@
ast_debug(2, "[%p] NAPTR record received on target '%s'\n", resolve, ast_dns_query_get_name(query));
if (!strcasecmp(ast_dns_naptr_get_service(record), "sip+d2u") &&
+ (target->transport == PJSIP_TRANSPORT_UNSPECIFIED || target->transport == PJSIP_TRANSPORT_UDP) &&
(sip_available_transports[PJSIP_TRANSPORT_UDP] || sip_available_transports[PJSIP_TRANSPORT_UDP6])) {
if (!strcasecmp(ast_dns_naptr_get_flags(record), "s")) {
sip_resolve_add(resolve, ast_dns_naptr_get_replacement(record), ns_t_srv, ns_c_in,
@@ -239,6 +240,7 @@
resolve, ast_dns_naptr_get_flags(record));
}
} else if (!strcasecmp(ast_dns_naptr_get_service(record), "sip+d2t") &&
+ (target->transport == PJSIP_TRANSPORT_UNSPECIFIED || target->transport == PJSIP_TRANSPORT_TCP) &&
(sip_available_transports[PJSIP_TRANSPORT_TCP] || sip_available_transports[PJSIP_TRANSPORT_TCP6])) {
if (!strcasecmp(ast_dns_naptr_get_flags(record), "s")) {
sip_resolve_add(resolve, ast_dns_naptr_get_replacement(record), ns_t_srv, ns_c_in, PJSIP_TRANSPORT_TCP,
@@ -257,6 +259,7 @@
resolve, ast_dns_naptr_get_flags(record));
}
} else if (!strcasecmp(ast_dns_naptr_get_service(record), "sips+d2t") &&
+ (target->transport == PJSIP_TRANSPORT_UNSPECIFIED || target->transport == PJSIP_TRANSPORT_TLS) &&
(sip_available_transports[PJSIP_TRANSPORT_TLS] || sip_available_transports[PJSIP_TRANSPORT_TLS6])) {
if (!strcasecmp(ast_dns_naptr_get_flags(record), "s")) {
sip_resolve_add(resolve, ast_dns_naptr_get_replacement(record), ns_t_srv, ns_c_in, PJSIP_TRANSPORT_TLS,
More information about the asterisk-commits
mailing list