-Thu Jul 9 19:40:57 CDT 2009
+Thu Jul 9 19:41:40 CDT 2009
port=$(./portbind $v6flag $((port + 1))) down=$port
port=$(./portbind $v6flag $((port + 1))) bind=$port
port=$(./portbind $v6flag $((port + 1))) contact=$port
+port=$(./portbind $v6flag $((port + 1))) sips=$port
# Disable IPv6 resolver for now
if false && eval $ipv6 ; then
A 127.0.0.1
_sip._udp SRV 1 100 $contact me
-_sips._tcp SRV 3 100 $contact me
+_sips._tcp SRV 3 100 $sips me
_sip._tcp SRV 2 100 $contact me
_sip._udp.srv SRV 1 100 $contact a
-_sips._tcp.srv SRV 3 100 $contact a
+_sips._tcp.srv SRV 3 100 $sips a
_sip._tcp.srv SRV 2 100 $contact $aaaa
_sip._udp.srv2 SRV 1 200 $contact c
nona NAPTR 20 15 "S" "ZIP+D2U" "" a2
_sip._udp.nona SRV 1 10 $contact ip4
-; No SIP SRV match
+; First SIP SRV is not found
nosrv NAPTR 20 1 "s" "SIP+D2U" "" _sip._udp.nosrv
- NAPTR 20 2 "s" "SIP+D2U" "" _sip._udp.srv
+ NAPTR 20 2 "s" "SIP+D2T" "" _sip._tcp.nosrv
+ NAPTR 20 3 "s" "SIP+D2U" "" _sip._udp.srv
+ NAPTR 20 4 "s" "SIP+D2T" "" _sip._tcp.srv
+
+; Redirect with TLS
+
; This fails (and we get 503)
a2 A 127.0.0.2
sink=$sink down=$down \
ipv6=$ipv6 \
SIPCONTACT="sip:*:$contact;comp=sigcomp" \
+ SIPSCONTACT="sips:*:$sips;comp=sigcomp" \
+ TEST_NTA_CERTDIR=$srcdir/../tport/ \
$VALGRIND ./test_nta "$@" - $resolvfile
exit=$?
kill $(cat $pidfile)
#define NONE ((void *)-1)
-int expensive_checks;
+int expensive_checks, test_nta_sips;
#define EXPENSIVE_CHECKS (expensive_checks)
TAG_END());
TEST_1(ag->ag_agent);
+ contact = getenv("SIPSCONTACT");
+ if (contact) {
+ if (nta_agent_add_tport(ag->ag_agent, URL_STRING_MAKE(contact),
+ TPTAG_CERTIFICATE(getenv("TEST_NTA_CERTDIR")),
+ TPTAG_TLS_VERIFY_POLICY(TPTLS_VERIFY_NONE),
+ TAG_END()) == 0)
+ test_nta_sips = 1;
+ }
+
{
/* Initialize our headers */
sip_from_t from[1];
url->url_params = NULL;
}
+ if (test_nta_sips) {
+ /* Test 1.8 - Send a message to sips:example.org
+ *
+ * Tests sf.net bug #1292657 (SIPS resolving with NAPTR).
+ */
+ client_t ctx[1] = {{ ag, "Test 1.8" }};
+ ag->ag_expect_leg = ag->ag_default_leg;
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
+ ag->ag_obp,
+ SIP_METHOD_MESSAGE,
+ (url_string_t *)"sips:example.org",
+ SIPTAG_SUBJECT_STR(ctx->c_name),
+ SIPTAG_FROM(ag->ag_alice),
+ SIPTAG_TO(ag->ag_bob),
+ SIPTAG_CONTACT(ag->ag_m_alice),
+ TAG_END());
+ TEST_1(!client_run(ctx, 200));
+ TEST_P(ag->ag_latest_leg, ag->ag_default_leg);
+ }
+
nta_agent_set_params(ag->ag_agent,
NTATAG_SIP_T1(500),
NTATAG_SIP_T1X64(64 * 500),