[Home]

Summary:ASTERISK-19460: [patch] Function TXTCIDNAME never actually makes DNS calls and always returns an empty string
Reporter:George Joseph (gjoseph)Labels:patch
Date Opened:2012-03-01 21:59:52.000-0600Date Closed:2020-03-09 10:05:24
Priority:MinorRegression?
Status:Closed/CompleteComponents:Functions/func_enum
Versions:10.1.3 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Fedora 16 x64Attachments:( 0) asterisk-txtcidname.patch
Description:Function TXTCIDNAME never even tries to do a DNS TXT lookup.  In looking through the history of main/enum.c, it doesn't look like it ever worked and in fact, the code in ast_get_txt that calls ast_search_dns was removed several years ago.  The current code reverses the number and inserts '.' between the characters (which may be correct for ENUM but not I believe for TXT), then returns without actually doing anything.

Comments:By: George Joseph (gjoseph) 2012-03-01 22:01:27.766-0600

Adds ast_search_dns back into main/enum.c/ast_get_txt

By: George Joseph (gjoseph) 2012-03-01 22:10:31.916-0600

Forgot to mention that the change is limited to ast_get_txt in main/enum.c, and ast_get_txt is only called from function_txtcidname in funcs/func_enum.c.  There should be no side effects to turning this on again.

I've also tested both positive and negative use cases with no issues.  A correctly formed number and domain that exists in DNS returns the expected results.  All other cases including malformed or missing parameters and lookups that return no results simply cause an empty string to be returned.


By: Matthew Stapleton (staples1347) 2013-05-06 00:15:26.462-0500

It looks like this is still not fixed in Asterisk 1.8.21.0 and Asterisk 11.3.0

By: Friendly Automation (friendly-automation) 2020-03-09 10:05:25.164-0500

Change 13855 merged by George Joseph:
enum.c: Make ast_get_txt() actually do something.

[https://gerrit.asterisk.org/c/asterisk/+/13855|https://gerrit.asterisk.org/c/asterisk/+/13855]

By: Friendly Automation (friendly-automation) 2020-03-09 10:05:43.209-0500

Change 13882 merged by George Joseph:
enum.c: Make ast_get_txt() actually do something.

[https://gerrit.asterisk.org/c/asterisk/+/13882|https://gerrit.asterisk.org/c/asterisk/+/13882]

By: Friendly Automation (friendly-automation) 2020-03-09 10:16:05.235-0500

Change 13883 merged by George Joseph:
enum.c: Make ast_get_txt() actually do something.

[https://gerrit.asterisk.org/c/asterisk/+/13883|https://gerrit.asterisk.org/c/asterisk/+/13883]

By: Friendly Automation (friendly-automation) 2020-03-09 10:17:06.696-0500

Change 13884 merged by George Joseph:
enum.c: Make ast_get_txt() actually do something.

[https://gerrit.asterisk.org/c/asterisk/+/13884|https://gerrit.asterisk.org/c/asterisk/+/13884]