Asterisk func enumlookup

Synopsis

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

Description

in Asterisk 1.2:
ENUMLOOKUP(number[,Method-type[,options|record#[,zone-suffix]]])

in Asterisk 1.4 and newer:
ENUMLOOKUP(number[,Method-type[,options,record#[,zone-suffix]]])

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, zone-suffix=e164.arpa

For more information, see README.enum


Details

  • *CLI> show function ENUMLOOKUP

If you have this in Asterisk 1.2:

${ENUMLOOKUP(${EXTEN},sip,1,freenum.org)}

then you need this in Asterisk 1.4:

${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}

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:

${ENUMLOOKUP(+13015611020,ALL,c,e164.org)}

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

${ENUMLOOKUP(+13015611020,ALL,c,,e164.org)}

in the new syntax.

Return value

Returns the resulting string.

Example

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



Synopsis

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

Description

in Asterisk 1.2:
ENUMLOOKUP(number[,Method-type[,options|record#[,zone-suffix]]])

in Asterisk 1.4 and newer:
ENUMLOOKUP(number[,Method-type[,options,record#[,zone-suffix]]])

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, zone-suffix=e164.arpa

For more information, see README.enum


Details

  • *CLI> show function ENUMLOOKUP

If you have this in Asterisk 1.2:

${ENUMLOOKUP(${EXTEN},sip,1,freenum.org)}

then you need this in Asterisk 1.4:

${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}

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:

${ENUMLOOKUP(+13015611020,ALL,c,e164.org)}

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

${ENUMLOOKUP(+13015611020,ALL,c,,e164.org)}

in the new syntax.

Return value

Returns the resulting string.

Example

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+