On Aug 14, 2008, at 8:31 AM, Tilghman Lesher wrote: > On Thursday 14 August 2008 07:33:11 Brian J. Murrell wrote: >> On Thu, 2008-08-14 at 14:15 +0200, Klaus Darilion wrote: >>> Use the ENUMLOOKUP function, e.g.: >> >> And take note that it's very naive. See my previous posting for an >> enum >> AGI that is more intelligent. The only thing it does not do that I >> would like to add is give up on the DNS lookup much earlier than it >> does >> if a DNS server is unresponsive. > > If you'd like to give a suggestion on how to make the ENUMLOOKUP > function > more useful, I'm all ears. Sometimes the issue is that the people > who are > most qualified to make the dialplan functions more useful aren't in > a position > to do anything about it (either because they aren't C programmers or > because > they aren't ENUM users).
I think the biggest issue with ENUMLOOKUP() is the inability to traverse multiple results after doing the lookup. To get access to a different result, you have to call the function again, which does another DNS lookup. However, this has already been improved in Asterisk 1.6. See the ENUMQUERY() and ENUMRESULT() functions. ENUMQUERY lets you do a query. ENUMRESULT lets you access the results of your query and perform whatever logic on them that you would like. (By the way, similar functions were also created for DUNDI - DUNDIQUERY and DUNDIRESULT) There is an unofficial backport of this functionality to Asterisk 1.4 available here: svn co http://svncommunity.digium.com/svn/russell/asterisk-1.4/ -- Russell Bryant Senior Software Engineer Open Source Team Lead Digium, Inc. _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
