Summary:ASTERISK-08835: [patch] dnsmgr is not refreshed upon peer usage in realtime
Reporter:Tony Plack (plack)Labels:
Date Opened:2007-02-18 23:37:11.000-0600Date Closed:2007-07-11 19:59:23
Versions:Frequency of
Environment:Attachments:( 0) dnsmgr.diff
Description:I am not sure if this is a IAX error, but I have only been able to reproduce it in iaxpeers at this time and dnsmgr does not seem to have a home.

If a peer is entered into the iaxpeers table, the iax stack seems to register the hostname with dnsmgr but does not force dnsmgr to refresh.

This causes any calls to the peer to fail unless a refresh is performed on the console or the refresh timeout has expired and the dnsmgr refreshes itself.

Upon IAX reload, the dnsmgr entries are cleared, and the problem reoccurs again until the refresh of dnsmgr occurs.

I believe that if we are to use dnsmgr (which I hope we do) we must force a refresh of the entry, otherwise, the entry just has a address.


   -- Executing [s@macro-superdial:12] Dial("SIP/5001-08235290", "IAX2/XXXX@voipjet/1NXXNXXX||TW|") in new stack
      > doing dnsmgr_lookup for 'test.voipjet.com'
 == adding dns manager for 'test.voipjet.com'
[Feb 18 23:26:37] WARNING[12734]: app_dial.c:1090 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3 - No route to destination)
 == Everyone is busy/congested at this time (1:0/0/1)


be1*CLI> dnsmgr refresh
 == Refreshing DNS lookups.
 == refreshing 'test.voipjet.com'
[Feb 18 23:26:47] NOTICE[12732]: dnsmgr.c:177 dnsmgr_refresh: host 'test.voipjet.com' changed from to
 == refreshing 'iaxtel.com'
 == Refreshing DNS lookups.
Comments:By: Tony Plack (plack) 2007-02-19 12:48:16.000-0600

Added a diff file with the changes to the main/dnsmgr.c code.

This change makes the DNS lookup occur whether dnsmgr is active or not.

Prior to this, the DNS lookup only occured when enabled=no.

Tested and running.

By: Joshua C. Colp (jcolp) 2007-06-07 19:04:21

Fixed in 1.2 as of revision 68368, 1.4 as of revision 68370, and trunk as of revision 68374. Thanks!