C.30. KEYPADHASH()

KEYPADHASH(string)
Transforms an alphabetical string to digits according to the standard telephone keypad letter assignments. This enables quick conversion of vanity numbers (e.g. 1-800-BADHAIR (1-800-2234247) to actual numbers.
12 ABC3 DEF
4 GHI5 JKL6 MNO
7 PQRS8 TUV9 WXYZ
*0#
exten => 123,1,Set(foo=${KEYPADHASH(BADHAIR)})  ; returns 2234247

Note

Internal help for this application in Asterisk 1.4:
  -= Info about function 'KEYPADHASH' =- 

[Syntax]
KEYPADHASH(<string>)

[Synopsis]
Hash the letters in the string into the equivalent keypad numbers.

[Description]
Example:  ${KEYPADHASH(Les)} returns "537"
diff output to internal help in Asterisk 1.2:
-- not available in Version 1.2 --