From: Tristram G. <cal...@gm...> - 2006-04-20 00:38:21
|
Thanks and duh on behalf - now seems very obvious! Cheers, Tris ----- Original Message ----- From: "Matthew A. Nicholson" <mni...@di...> To: <pys...@li...> Sent: Wednesday, April 19, 2006 9:00 PM Subject: Re: [Pyst-users] Debug back to Asterisk console from AGI scripts > 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 > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Pyst-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pyst-users |