As far as I know, Asterisk cannot deal with phone numbers like 1-800-GOOG411 because it has letters in it. Asterisk can dial it, but the call will not go to the desired location because it doesn't translate the letters into numbers.
I'd love to be corrected on this.
I've written my own extension that corrects this behaviour using PySt:
Create a file called /var/lib/asterisk/agi-bin/phoneword.py:
#!/usr/bin/env python
"""Dial Phonewords, converting letters to numbers
eg. If 1800GOOG411 is entered, 18004664411 is dialed
eg. If 1800COLLECT is entered, 18002655328 is dialed
"""
from asterisk import agi
import sys
letter_map = {'a':2, 'b':2, 'c':2, 'd':3, 'e':3, 'f':3, 'g':4,
'h':4, 'i':4, 'j':5, 'k':5, 'l':5, 'm':6, 'n':6,
'o':6, 'p':7, 'q':7, 'r':7, 's':7, 't':8, 'u':8,
'v':8, 'w':9, 'x':9, 'y':9, 'z':9}
def convert_phoneword(phoneword):
"""Convert a phoneword to all digits
>>> convert_phoneword('1800GOOG411')
'18004664411'
>>> convert_phoneword('1800COLLECT')
'18002655328'
"""
newstring = []
for x in [x.lower() for x in phoneword]:
try:
newstring.append(str(letter_map[x]))
except KeyError:
newstring.append(x)
return "".join(newstring)
if __name__ == "__main__":
if len(sys.argv) == 2:
phoneword = sys.argv[1]
a = agi.AGI()
a.set_variable("DIGITNUM",convert_phoneword(phoneword))
Now set it up in your dialplan somewhere. I mainly use it for 1800 numbers, so this example is 1800/1888 number specific:
;Why pay for 800/888 numbers? Siphone.com is free :)
exten => _18[80][80].,1,answer()
exten => _18[80][80].,n,wait(1)
;Convert any alphas to digits
exten => _18[80][80].,n,AGI(phoneword.py|${EXTEN})
;Dial the number returned from phoneword.py stored as ${DIGITNUM}
exten => _18[80][80].,n,dial(SIP/${DIGITNUM}@sipphone.com|20)
exten => _18[80][80].,n,hangup()