[asterisk-bugs] [JIRA] (ASTERISK-25528) DNS TTL parse error

dtryba (JIRA) noreply at issues.asterisk.org
Wed Nov 11 09:32:33 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228275#comment-228275 ] 

dtryba commented on ASTERISK-25528:
-----------------------------------

Resolving of the endpoints is apparantly solved.  But....

Lookin at the following output:
{noformat}
[Nov 11 16:13:45] DEBUG[31857] res_pjsip_outbound_registration.c: Outbound REGISTER attempt 1 to 'sip:sip.itco.nl' with client 'sip:tryba at sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31857] pjsip:   tsx0x7f06bc006 .Transaction created for Request msg REGISTER/cseq=56207 (tdta0x7f06bc005600)
[Nov 11 16:13:45] DEBUG[31857] pjsip:   tsx0x7f06bc006 Sending Request msg REGISTER/cseq=56207 (tdta0x7f06bc005600) in state Null
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target 'sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: Transport type for target 'sip.itco.nl' is 'Unspecified'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Created resolution tracking for target 'sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target 'sip.itco.nl' with record type '35', transport 'Unspecified', and port '0'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target '_sip._tcp.sip.itco.nl' with record type '33', transport 'TCP', and port '5060'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target '_sip._udp.sip.itco.nl' with record type '33', transport 'UDP', and port '5060'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target 'sip.itco.nl' with record type '1', transport 'UDP', and port '5060'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Starting initial resolution using parallel queries for target 'sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31857] pjsip:   tsx0x7f06bc006 .State changed from Null to Calling, event=TX_MSG
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] All parallel queries completed
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] NAPTR record received on target 'sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target '_sip._tcp.sip.itco.nl' with record type '33', transport 'TCP', and port '5060'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] SRV record received on target '_sip._tcp.sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target 'sip1.itco.nl' with record type '1', transport 'TCP', and port '5060'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] SRV record received on target '_sip._udp.sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target 'sip1.itco.nl' with record type '1', transport 'UDP', and port '5060'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] A record being skipped on target 'sip.itco.nl' because NAPTR or SRV record exists
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] New queries added, performing parallel resolution again
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] All parallel queries completed
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] SRV record received on target '_sip._tcp.sip.itco.nl'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Added target 'sip0.itco.nl' with record type '1', transport 'TCP', and port '5060'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] A record being skipped on target 'sip1.itco.nl' because NAPTR or SRV record exists
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] A record being skipped on target 'sip1.itco.nl' because NAPTR or SRV record exists
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] New queries added, performing parallel resolution again
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] All parallel queries completed
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] A record received on target 'sip0.itco.nl'
[Nov 11 16:13:45] DEBUG[31847] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Resolution completed - 1 viable targets
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Address '0' is 109.235.32.55:5060 with transport 'TCP'
[Nov 11 16:13:45] DEBUG[31857] res_pjsip/pjsip_resolver.c: [0x7f06bc009868] Invoking user callback with '1' addresses
[Nov 11 16:13:45] DEBUG[31857] pjsip:   tcpc0x7f06bc00 TCP client transport created
{noformat}

A register is being attempted using TCP. NAPTR records have UDP as highest priority, so protocol selection is faulty
{noformat}
$ host -t NAPTR sip.itco.nl
sip.itco.nl has NAPTR record 10 1 "s" "SIP+D2U" "" _sip._udp.sip.itco.nl.
sip.itco.nl has NAPTR record 100 1 "s" "SIP+D2T" "" _sip._tcp.sip.itco.nl.
{noformat}

tested with git: c1abe8906dd4696bc85697cfbbff2c9fca6af4d6

> DNS TTL parse error
> -------------------
>
>                 Key: ASTERISK-25528
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25528
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    Affects Versions: SVN
>         Environment: Debian/jessie
> Build from source with checkout
> 40574a2ea31f03d5a4d3914f1e20895a9b49d7f0
> and pjsip svn revision 5193 from http://svn.pjsip.org/repos
>            Reporter: dtryba
>            Assignee: George Joseph
>         Attachments: dns.pcap, full.txt
>
>
> Trying to register to a SIP cluster using NAPTR/SRV records fails due to DNS lookup failures. The failures are due to incorrect parsing the TTL for the records.
> sip.itco.nl has both NAPT and SRV records (with short ttls (300)), The real edge proxies (sip[01].itco.nl)) have a longer ttl (86400). Responses aren't added to the result set with debug responses:
> {noformat}
> dns_core.c: Query '0x7f66cc00a3c8': Could not add record, invalid TTL '-822083584'
> {noformat}
> resulting in
> {noformat} 
> res_pjsip/pjsip_resolver.c: [0x7f66cc009588] Resolution completed - 0 viable targets
> {noformat}
> {noformat}
> [transport-udp]
> type=transport
> protocol=udp
> bind=0.0.0.0
> [transport-tcp]
> type=transport
> protocol=tcp
> bind=0.0.0.0
> [tryba]
> type=endpoint
> transport=transport-udp
> context=tryba
> disallow=all
> allow=alaw
> outbound_auth=tryba_auth
> force_rport=yes
> direct_media=no
> ice_support=yes
> auth=tryba_auth
> [tryba_auth]
> type=auth
> auth_type=userpass
> password=******
> username=tryba
> [tryba_register]
> type=registration
> server_uri=sip:sip.itco.nl
> client_uri=sip:tryba at sip.itco.nl
> contact_user = tryba
> outbound_auth=tryba_auth
> expiration=60
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list