[Home]

Summary:ASTERISK-04802: [patch] enable dnsmgr at startup
Reporter:kuj (kuj)Labels:
Date Opened:2005-08-09 16:30:46Date Closed:2008-01-15 15:46:51.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dnsmgrinit.txt
Description:With the current implementation, the dnsmgr functions are only initialized after all loadable modules have already been loaded. As a consequence, the chan_iax2 loadable module (the only channeltype currently using dnsmgr DNS-caching) will not make use of dnsmgr functions unless we do a "iax2 reload".

The attached patch moves up the initialization of the dnsmgr functions to before the loadable modules are processed (preloaded), thus making its functionality available to e.g. all channeltypes that might make use of them. Again, as of today only IAX2 uses the dnsmgr_lookup function.

Feel free to reclassify from core_asterisk/General to more appropriate category.

****** ADDITIONAL INFORMATION ******

Original behavior (right after startup):

astlap*CLI> dnsmgr status
DNS Manager: enabled
Refresh Interval: 1200 seconds
Number of entries: 0

astlap*CLI> iax2 reload                                                        
 == Parsing '/etc/asterisk/iax.conf': Found
^@    -- Seeding 'lxslave' at xx.xx.xx.xx:yyy for 60
^@    -- doing lookup for 'yyyyyy.iax2.gafachi.com'
^@  == adding manager for 'yyyyyy.iax2.gafachi.com'
^@    -- doing lookup for 'iax.voipzzz.com'
^@  == adding manager for 'iax.voipzzz.com'
^@    -- doing lookup for 'ww.ww.ww.ww'
^@    -- doing lookup for 'iaxtel.com'
^@  == adding manager for 'iaxtel.com'
^@Aug  9 15:24:20 NOTICE[31010]: chan_iax2.c:7632 iax2_poke_peer: ^@Still have a callno...
^@  == Loaded firmware 'iaxy.bin'
 == Parsing '/etc/asterisk/iaxprov.conf': Found
^@    -- Loaded provisioning template 'default'

astlap*CLI> dnsmgr status                                                                                                    
DNS Manager: enabled
Refresh Interval: 1200 seconds                                                                                                
Number of entries: 3
astlap*CLI>  

With patch applied, right after startup:

astlap*CLI> dnsmgr status                                                                                                    
DNS Manager: enabled
Refresh Interval: 1200 seconds
Number of entries: 3

No need to "iax2 reload" anymore.

Disclaimer on file.
Comments:By: Mark Spencer (markster) 2005-08-14 19:44:50

Fixed in CVS head.  Thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:44:25.000-0600

Repository: asterisk
Revision: 6332

U   trunk/asterisk.c

------------------------------------------------------------------------
r6332 | markster | 2008-01-15 15:44:25 -0600 (Tue, 15 Jan 2008) | 2 lines

Reorder dnsmgr to before other modules (bug ASTERISK-4802)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6332

By: Digium Subversion (svnbot) 2008-01-15 15:46:51.000-0600

Repository: asterisk
Revision: 6499

U   trunk/channels/chan_sip.c
U   trunk/doc/README.variables

------------------------------------------------------------------------
r6499 | kpfleming | 2008-01-15 15:46:51 -0600 (Tue, 15 Jan 2008) | 2 lines

allow for custom URI options to be set (issue ASTERISK-4802 with mods)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6499