From: Matthew A. N. <mni...@di...> - 2005-01-11 15:46:13
|
Dax Reyes wrote: > Hello, > > seems to be a bug. > > try using agi.py and put something like > > #!/usr/bin/env python > > import asterisk.agi > agi = asterisk.agi.AGI() > > mydigit = agi.get_data('demo-congrats',timeout=5000) > > #do no input anything, mydigit now has a value "UNDEFINED" ! > agi.say_digits(mydigit) > sys.exit(0) > > > call function get_data and not input anything. > then call say_digits > will throw an exception because of the UNDEFINED value > > I can't think of a good fix, since if I put an "if" condition in > function get_data something like > > if res == "UNDEFINED": > res = '' > > say_digits will now issue an agi command > say digits "" "" > > which will also throw an exception > > I wouldn't call that a bug. Maybe it should be handled differently, but that is what asterisk returns to us. -- Matthew A. Nicholson Digium |