On Mon, May 21, 2007 at 04:34:45PM +0100, Steve Hill wrote: > On a slightly unrelated note, I think I found some kind of race condition > with the ENUM code. Accessing several ENUM records for the same lookup: > GET VARIABLE ENUMLOOKUP(+123456789|ALL|1|e164.org) > GET VARIABLE ENUMLOOKUP(+123456789|ALL|2|e164.org) > GET VARIABLE ENUMLOOKUP(+123456789|ALL|3|e164.org) > These all return the same URI, even though the number it's looking up has > several records. If I do this instead then it correctly returns several > different records: > GET VARIABLE ENUMLOOKUP(+123456789|ALL|1|e164.org) > GET VARIABLE ENUMLOOKUP(+123456789|ALL|c|e164.org) > GET VARIABLE ENUMLOOKUP(+123456789|ALL|2|e164.org) > GET VARIABLE ENUMLOOKUP(+123456789|ALL|c|e164.org) > GET VARIABLE ENUMLOOKUP(+123456789|ALL|3|e164.org)
Yeah, ENUMLOOKUP is just broken. It does a separate query for each call so if there are multiple records with the same weight DNS will do the right thing and change the order each time. You may see some twice, you may not see some at all. If there are exactly two results and one path is down you have a 50/50 chance of being completely shafted! I posted an Asterisk patch that allowed ENUMLOOKUP to set an "array" with the result but they've just (last couple of days) gone with using ENUMQUERY/ENUMRESULT to get the full set and iterate through them. Callweaver will need either or both. Certainly ENUMLOOKUP as it stands isn't up to the job it was... intended... for. :-) Mike -- Mike Jagdis Web: http://www.eris-associates.co.uk Eris Associates Limited Tel: +44 7780 608 368 Reading, England Fax: +44 118 926 6974 _______________________________________________ Callweaver-users mailing list [email protected] http://lists.callweaver.org/mailman/listinfo/callweaver-users
