Summary: | ASTERISK-06210: ENUMLOOKUP count return is not as documented | ||
Reporter: | xrobau (xrobau) | Labels: | |
Date Opened: | 2006-01-28 15:46:11.000-0600 | Date Closed: | 2008-01-15 16:46:45.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Functions/func_enum |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | If you do an ENUMLOOKUP(..,ALL,c,...) on a number that isn't in the e164 network, the return value is "", when the documentation implies that 'c' always returns a number. ****** ADDITIONAL INFORMATION ****** Set(ENUMCOUNT=${ENUMLOOKUP(+61749722482,ALL,c,e164.org)}) ; (invalid lookup) NoOp(Faulty Return of ${ENUMCOUNT} - empty string) Set(ENUMCOUNT=${ENUMLOOKUP(+61749722157,ALL,c,e164.org)}) ; (valid lookup) NoOp(Valid Return of ${ENUMCOUNT} - the number 1) To quote from README.enum: options = optional specifiers. c = count. Returns the number of records of this type are returned (regardless of order or priority.) If "ALL" is the specified service_type, then a count of all methods will be returned for the DNS record. Perhaps just the documentation needs to be updated? | ||
Comments: | By: Kevin P. Fleming (kpfleming) 2006-02-14 15:18:57.000-0600 Fixed in trunk, but I won't change it in 1.2 because it's a noticeable behavior change and could break existing dialplans. By: Digium Subversion (svnbot) 2008-01-15 16:46:45.000-0600 Repository: asterisk Revision: 10064 U trunk/enum.c ------------------------------------------------------------------------ r10064 | kpfleming | 2008-01-15 16:46:45 -0600 (Tue, 15 Jan 2008) | 2 lines ensure that ENUM count requests that are invalid return zero, not blank (issue ASTERISK-6210) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=10064 |