[Home]

Summary:ASTERISK-24371: res_pjsip: DNS resolution on pulls SRV records for UDP transport even when DNS has entries for other transport types
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-09-29 15:43:15Date Closed:2015-04-21 04:59:13
Priority:MajorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip Resources/res_pjsip
Versions:12.6.0 13.0.0-beta2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) log.txt
Description:Given the following DNS entry:

{noformat}
digium@digium-test-03 /var/log/asterisk $ dig @127.0.1.1 foo.bar.sipit.net ANY

; <<>> DiG 9.9.5-3-Ubuntu <<>> @127.0.1.1 foo.bar.sipit.net ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56585
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 1, ADDITIONAL: 12

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;foo.bar.sipit.net. IN ANY

;; ANSWER SECTION:
foo.bar.sipit.net. 600 IN NAPTR 1 0 "s" "SIPS+D2T" "" _sips._tcp.foo.bar.sipit.net.
foo.bar.sipit.net. 600 IN NAPTR 2 0 "s" "SIP+D2T" "" _sip._tcp.foo.bar.sipit.net.
foo.bar.sipit.net. 600 IN NAPTR 3 0 "s" "SIP+D2U" "" _sip._udp.foo.bar.sipit.net.

;; AUTHORITY SECTION:
pexip.sipit.net. 600 IN NS ns.sipit.net.

;; ADDITIONAL SECTION:
foo1.bar.sipit.net. 600 IN A 132.177.253.37
foo1.bar.sipit.net. 600 IN AAAA 2606:4100:3880:2520::8:3
foo2.bar.sipit.net. 600 IN A 132.177.253.38
foo2.bar.sipit.net. 600 IN AAAA 2606:4100:3880:2520::8:4
ns.sipit.net. 3600 IN A 132.177.252.2
_sips._tcp.foo.bar.sipit.net. 43200 IN SRV 0 50 5061 foo2.bar.sipit.net.
_sips._tcp.foo.bar.sipit.net. 43200 IN SRV 0 50 5061 foo1.bar.sipit.net.
_sip._tcp.foo.bar.sipit.net. 43200 IN SRV 0 50 5060 foo2.bar.sipit.net.
_sip._tcp.foo.bar.sipit.net. 43200 IN SRV 0 50 5060 foo1.bar.sipit.net.
_sip._udp.foo.bar.sipit.net. 43200 IN SRV 0 50 5060 foo1.bar.sipit.net.
_sip._udp.foo.bar.sipit.net. 43200 IN SRV 0 50 5060 foo2.bar.sipit.net.

;; Query time: 7 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Mon Sep 29 15:34:33 CDT 2014
;; MSG SIZE  rcvd: 607
{noformat}

pjproject will currently fail to use the TCP or TLS SRV entries. Instead, it uses UDP only. If UDP fails, the INVITE message will fail, and the other transports will not be attempted.

Comments: