Asterisk func enumlookup


ENUMLOOKUP allows for general or specific querying of NAPTR records or counts of NAPTR types for ENUM or ENUM-like DNS pointers.

New in Asterisk 1.2, deprecates the application EnumLookup in Asterisk 1.4


in Asterisk 1.2:

in Asterisk 1.4 and newer:

Option 'c' returns an integer count of the number of NAPTRs of a certain RR type.
Combination of 'c' and Method-type of 'ALL' will return a count of all NAPTRs for the record.
Defaults are: Method-type=sip, no options, record=1,

For more information, see README.enum


  • *CLI> show function ENUMLOOKUP

If you have this in Asterisk 1.2:


then you need this in Asterisk 1.4:


Note the extra comma; the field that used to be a union of options and Nth has become two separate fields. Since this branch is based on trunk you need to use the 1.4 syntax with it.

Incidently, if the parameter c were used, as in:


(from doc/README.enum in the 1.2 branch)
it would become:


in the new syntax.

Return value

Returns the resulting string.


exten => s,1,Set(foo=${ENUMLOOKUP(7079964444)})

For a complete RFC compliant macro, with support for multiple enum providers, see RFC Compliant ENUM Macro

See also

Created by: murf, Last modification: Mon 29 of Mar, 2010 (15:48 UTC) by JonasSmedegaard
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+