From: Ralf S. <rs...@ru...> - 2012-11-27 16:10:12
|
On Tue, Nov 27, 2012 at 07:42:27PM +0600, Vladimir wrote: > Script won't work > Debug from asterisk CLI > The problem in Pyst? > > *CLI> [Nov 27 13:32:47] AGI Tx >> agi_network: yes > [Nov 27 13:32:47] <SIP/voipster-0000001d>AGI Tx >> agi_request: agi:// > test.localnet.ru:26000 ... > [Nov 27 13:32:47] <SIP/voipster-0000001d>AGI Rx << ARGS: > ['/home/voipster/venv/aster/opt/pyst_manager/myagi.py'] > [Nov 27 13:32:47] <SIP/voipster-0000001d>AGI Tx >> 510 Invalid or unknown > command Interesting. I've never used FASTAGI myself, but thought that it is basically the same protocol. Hmm. http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/AGI-variants.html tells us that, yes, it basically is and http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/AGI-communication.html seems to confirm this (except on channel hangup) It looks to me like standard error is sent via the network connection. Can you try redirecting standard error to somewhere else, there was a recent patch that enabled this. You have to specify the stderr file that you want to use explicitly when calling the constructor of AGI. So in your AGI script instead of x = AGI () you specify something like error_file = open ("/path/to/stderr/log", "w") x = AGI (stderr = error_file) This should do the trick of not sending stderr back to the asterisk server. Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: http://www.runtux.com Reichergasse 131, A-3411 Weidling email: of...@ru... osAlliance member email: rs...@os... |