From: Vladimir <v....@gm...> - 2012-11-28 07:49:14
|
Thanks, Ralf. Running FastAGI in xinetd, set STDERR as file. And before running script need set in dialplan variable AGISIGHUP=no, if this doesn't set we have error in CLI [Nov 28 05:49:59] ERROR[6625]: utils.c:1177 ast_carefulwrite: write() returned error: Broken pipe But I think running script XInetd no different from running script in dialplan. This cloning the many similar processes. I think found the best solution for Fastagi. Thanks Max Nesterov for patch: https://sourceforge.net/tracker/index.php?func=detail&aid=3047290&group_id=76162&atid=546274 P.S: Sorry for my english Regards, Vladimir 2012/11/27 Ralf Schlatterbeck <rs...@ru...> > 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... > |