[asterisk-bugs] [Asterisk 0015140]: DNS host name resolution in iax.conf

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 18 04:33:17 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15140 
====================================================================== 
Reported By:                vieri
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15140
Category:                   Channels/chan_iax2
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21.2 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-17 14:00 CDT
Last Modified:              2009-05-18 04:33 CDT
====================================================================== 
Summary:                    DNS host name resolution in iax.conf
Description: 
I defined host=voipb1.mydomain.local in a iax.conf trunk and it was working
fine until the DNS A record of that host changed IP address. Asterisk still
tried to send calls to the old IP address.
I restarted Asterisk and the calls were finally sent to the correct IP
address so I'm guessing that the "host=" name resolution is done only at
startup.  

iax.conf:

[coin]
deny=all
allow=alaw
allow=gsm
type=friend
host=voipb1.mydomain.local
secret=xxx
auth=plaintext
qualify=yes
context=coin-context

====================================================================== 

---------------------------------------------------------------------- 
 (0104899) vieri (reporter) - 2009-05-18 04:33
 https://issues.asterisk.org/view.php?id=15140#c104899 
---------------------------------------------------------------------- 
I'm using:

# cat dnsmgr.conf
[general]
enable=yes
refreshinterval=60

*CLI> dnsmgr status
DNS Manager: enabled
Refresh Interval: 60 seconds
Number of entries: 2

Does the DNS manager work with the /etc/hosts file?
I tried changing the IP address within /etc/hosts and waited more than 60
seconds (failed).

I'm using djbdns in my network so I tested it with a record A with
TTL=5min. I changed the IP address in tinydns and waited 6 minutes. A ping
to the host name resolved the new address fine. However, Asterisk will
still send the call to the old IP address, unless I restart the * process.

How can I "debug" dnsmgr in Asterisk? Could I actually "see" the 2 entries
that "dnsmgr status" reports, thus confirming that it is not updating
correctly? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-18 04:33 vieri          Note Added: 0104899                          
======================================================================




More information about the asterisk-bugs mailing list