[asterisk-bugs] [Asterisk 0016898]: dnsmgr failes to match peer when SIP srvlookup is on

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Feb 26 02:51:50 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16898 
====================================================================== 
Reported By:                jamicque
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16898
Category:                   Core/Netsock
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.1.16 
JIRA:                       SWP-970 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-02-24 12:08 CST
Last Modified:              2010-02-26 02:51 CST
====================================================================== 
Summary:                    dnsmgr failes to match peer when SIP srvlookup is on
Description: 
Dnsmgr failes to match peer when SIP srvlookup is on. Asterisk tries to
find a peer but it failes.

[Feb 24 19:03:05] WARNING[10845]: res_config_pgsql.c:540
realtime_multi_pgsql: PostgreSQL RealTime: Could not find any rows in table
sip_ps.
[Feb 24 19:03:05] WARNING[10845]: res_config_pgsql.c:540
realtime_multi_pgsql: PostgreSQL RealTime: Could not find any rows in table
sip_ps.
[Feb 24 19:03:05] NOTICE[10845]: chan_sip.c:19044 handle_request_invite:
Sending fake auth rejection for device "+48607382193"
<sip:607382193 at sbc.freeconet.pl>;tag=as108407ed

when i type in console: 
dnsmgr refresh
    -- Refreshing DNS lookups.
    -- refreshing 'sip.freeconet.pl'
       > ast_get_srv: SRV lookup for '_sip._UDP.sip.freeconet.pl' mapped
to host server1.freeconet.pl, port 5060
[Feb 24 19:05:14] NOTICE[11952]: dnsmgr.c:181 dnsmgr_refresh: dnssrv: host
'sip.freeconet.pl' changed from 213.218.116.66:5060 to 213.218.116.65:5060

however after I make a call:
dnsmgr refresh
    -- Refreshing DNS lookups.
    -- refreshing 'sip.freeconet.pl'
[Feb 24 19:06:21] NOTICE[11952]: dnsmgr.c:181 dnsmgr_refresh: dnssrv: host
'sip.freeconet.pl' changed from 213.218.116.65:5060 to 213.218.116.66:5060
    -- refreshing 'sip.freeconet.pl'
       > ast_get_srv: SRV lookup for '_sip._UDP.sip.freeconet.pl' mapped
to host server1.freeconet.pl, port 5060

and incoming calls from peer are matched properly. It only happens on
every restart of asterisk till no outbound call is done. When i turn of
srvlookup everything works fine.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0016899 srvlookup don't work with register
====================================================================== 

---------------------------------------------------------------------- 
 (0118587) jamicque (reporter) - 2010-02-26 02:51
 https://issues.asterisk.org/view.php?id=16898#c118587 
---------------------------------------------------------------------- 
If i manually configure multiple peers for trunk in sip.conf it works fine.
However this is not the point why operator uses SRV's (otherwise I could
define multiple peers and make specific dialplan to have operational
reliability). IP of operator sip trunk may change, new nodes can be added
to SRV. That's why we use domain names not ip addresses, and that's why
dns_mgr is helpful here to resolve the ip addresses from domain names. 
What I have found is that when I turn off srvlookup in sip.conf (SRV
functionality is then off) anr restart asterisk I have one statement in dns
manager:

dnsmgr refresh
    -- Refreshing DNS lookups.
    -- refreshing 'sip.freeconet.pl'

And every thing works fine. All inbound and outbound calls are identified
properly. However when I trun srvlookup on again and restart asterisk.

dnsmgr refresh
    -- Refreshing DNS lookups.
    -- refreshing 'sip.freeconet.pl'
       > ast_get_srv: SRV lookup for '_sip._UDP.sip.freeconet.pl' mapped
to host server1.freeconet.pl, port 5060

there is this strange statement in the last line. From now on no inbound
call's from peer are identified properly (asterisk can't match the peer).
However if I make any outbound call through peer new statement is added to
dns manager and peer for inbound calls are matched properly to peer.

dnsmgr refresh
    -- Refreshing DNS lookups.
    -- refreshing 'sip.freeconet.pl'
    -- refreshing 'sip.freeconet.pl'
       > ast_get_srv: SRV lookup for '_sip._UDP.sip.freeconet.pl' mapped
to host server1.freeconet.pl, port 5060

please notice that there are 2 statements for sip.freeconet.pl. In my
opinion there is something wrong with dns_mgr when resolving peer during
first registration.

In my peer configuration I use only domain names "sip.freeconet.pl" no IP
addresses. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-26 02:51 jamicque       Note Added: 0118587                          
======================================================================




More information about the asterisk-bugs mailing list