Summary: | ASTERISK-17582: DNS SRV - does not work | ||
Reporter: | Maciej Krajewski (jamicque) | Labels: | |
Date Opened: | 2011-03-21 04:41:52 | Date Closed: | 2012-07-26 16:31:04 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Interoperability |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) config | |
Description: | SRV's does not work properly. I've disabled one of IP addresses of DNS SRV enabled peer on my router to test the functionality. Unfortunately, the Asterisk does not automatically switch to peer other IP address as IP phones does. Beneath is the trace of connection: 21.314976 10.0.4.12 -> 213.218.116.65 SIP Request: REGISTER sip:sip.freeconet.pl 21.315459 10.0.4.1 -> 10.0.4.12 ICMP Destination unreachable (Port unreachable) 21.611684 10.0.4.12 -> 213.218.116.65 SIP/SDP Request: INVITE sip:+48587396000@sip.freeconet.pl:5060, with session description 21.612330 10.0.4.1 -> 10.0.4.12 ICMP Destination unreachable (Port unreachable) 23.610971 10.0.4.12 -> 213.218.116.65 SIP/SDP Request: INVITE sip:+48587396000@sip.freeconet.pl:5060, with session description 23.611627 10.0.4.1 -> 10.0.4.12 ICMP Destination unreachable (Port unreachable) 25.319183 10.0.4.12 -> 213.218.116.65 SIP Request: REGISTER sip:sip.freeconet.pl 25.319663 10.0.4.1 -> 10.0.4.12 ICMP Destination unreachable (Port unreachable) 27.610967 10.0.4.12 -> 213.218.116.65 SIP/SDP Request: INVITE sip:+48587396000@sip.freeconet.pl:5060, with session description 27.611508 10.0.4.1 -> 10.0.4.12 ICMP Destination unreachable (Port unreachable) and so on... I've attached the sip.conf configuration and my peer configuration. ****** ADDITIONAL INFORMATION ****** == Using SIP RTP TOS bits 136 == Using SIP RTP CoS mark 4 == Using SIP VRTP TOS bits 136 == Using SIP VRTP CoS mark 4 == Using UDPTL TOS bits 136 == Using UDPTL CoS mark 4 -- Executing [587396000@CALLEX:1] GotoIf("SIP/test001-00000002", "0?3") in new stack -- Executing [587396000@CALLEX:2] Set("SIP/test001-00000002", "__ORGDEST=587396000") in new stack -- Executing [587396000@CALLEX:3] AGI("SIP/test001-00000002", "agi://127.0.0.1/script.agi") in new stack -- AGI Script Executing Application: (Set) Options: (CHANNEL(language)=pl) -- AGI Script Executing Application: (Set) Options: (CALLERID(all)="test001"<Anonymous>) -- AGI Script Executing Application: (Set) Options: (GROUP(in)=user2) -- AGI Script Executing Application: (Set) Options: (GROUP(out)=sip1) -- AGI Script Executing Application: (Set) Options: (CDR(is_inbound)=false) -- AGI Script Executing Application: (Set) Options: (CDR(is_outbound)=true) -- AGI Script Executing Application: (Set) Options: (CDR(number_a)=Anonymous) -- AGI Script Executing Application: (Set) Options: (CDR(number_b)=+48587396000) -- AGI Script Executing Application: (Set) Options: (CDR(src_interface)=CALLEX/test001) -- AGI Script Executing Application: (Set) Options: (CDR(dst_interface)=SIP/test) -- AGI Script Executing Application: (Set) Options: (CDR(src_account)=test001) -- AGI Script Executing Application: (Set) Options: (CDR(sip_proxy_host)=sip.freeconet.pl) -- AGI Script Executing Application: (Set) Options: (CDR(accountcode)=test001) -- AGI Script Executing Application: (Set) Options: (CDR(acd)=test001) -- AGI Script Executing Application: (Set) Options: (CDR(userfield)=UID:1300700168.2;CRG:1;ACD:test001;) -- AGI Script Executing Application: (Set) Options: (_CALLUNIQUEID=1300700168.2) -- AGI Script Executing Application: (Set) Options: (_NUMBER_A=11) -- AGI Script Executing Application: (Set) Options: (_NUMBER_B=48587396000) -- AGI Script Executing Application: (Dial) Options: (SIP/+48587396000@test,45,wW) == Using SIP RTP TOS bits 136 == Using SIP RTP CoS mark 4 == Using SIP VRTP TOS bits 136 == Using SIP VRTP CoS mark 4 == Using UDPTL TOS bits 136 == Using UDPTL CoS mark 4 -- Called +48587396000@test > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 [2011-03-21 10:36:10] NOTICE[19811]: dnsmgr.c:175 dnsmgr_refresh: dnssrv: host 'sip.freeconet.pl' changed from 213.218.116.65:5060 to 213.218.116.66:5060 [2011-03-21 10:36:10] NOTICE[19811]: chan_sip.c:11680 sip_reg_timeout: -- Registration for 'jamicque@sip.freeconet.pl' timed out, trying again (Attempt #2) | ||
Comments: | By: Leif Madsen (lmadsen) 2011-04-01 13:25:38 Unless it has been changed recently, Asterisk will only return the first record in an SRV lookup. That may actually be the issue here. By: Leif Madsen (lmadsen) 2011-04-01 13:26:57 Additionally you may need the dnsmgr enabled to update the DNS records in memory. By: Maciej Krajewski (jamicque) 2011-04-04 06:47:16 Well, as I see it, the dnsmgr changes the IP address of server > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server1.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server1.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server1.freeconet.pl, port 5060 > doing dnsmgr_lookup for 'sip.freeconet.pl' > ast_get_srv: SRV lookup for '_sip._udp.sip.freeconet.pl' mapped to host server2.freeconet.pl, port 5060 It's not always the first record as you have written. By: Maciej Krajewski (jamicque) 2011-06-07 13:27:38.872-0500 Issue still exists in 1.8.4.2 By: Luke H (luckman212) 2011-09-26 00:01:26.539-0500 There seem to be a handful of duplicate- or semi-duplicate issues surrounding DNS SRV lookups and subsequent registrations. e.g. ASTERISK-17722 and ASTERISK-15210 This probably needs some housekeeping and consolidation so it can get squashed for good. By: Matt Jordan (mjordan) 2012-07-26 16:30:54.927-0500 Regardless of the DEBUG messages, Asterisk only supports the first SRV record returned. That's the only record it will use. Any additional records returned by a DNS query are not utilized. Any change to that behavior would be a new feature that would fall under the feature request guidelines. |