From: Matthew A. N. <mni...@di...> - 2006-04-20 00:00:17
|
If you would like to print information to the asterisk console you can use the agi.verbose() command. Also if you start asterisk in console mode (-c) you can print to stderr and it will show up on the asterisk console (sort of). A patch to asterisk redirect stderr back to the console in all cases would be some what useful. Tristram Graham wrote: > Hi all, > > First thanks for the great work. I've recently started using pyst for a > new Asterisk project and found it works very well. > > A question please - I've been able to use the agitb debug module for > catching error traces in my Asterisk console. But is it possible to send > back the equivalent of "print"s with debug info or error messages if the > dialplan incorrectly calls an AGI script? > > I find if I use straight Python "print" I get an exception; > > agi.py", line 146, in get_result" ... raise > AGIInvalidCommand(response)" > > This seems fair enough if all text to the stdout are taken as commands. > Writing to stderr doesn't appear in the Asterisk console. For now I'm > using an Asterisk NoOp with "agi.execute('NoOp;, '### test debug > message')" which isn't too bad but it does mean I have to have agi debug on. > > Un saludo, Tris -- Matthew A. Nicholson Digium |