Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-05-12 Thread Kingsley Tart
Hi, I still think we've either got a bug in Asterisk or a bug in the Asterisk::AGI module. In a separate part of the dialplan we have a call to a (much simpler) script that begins with the below code. In the last 1000 calls, I've had a couple of extension not returned by AGI errors from the

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-05-11 Thread Kingsley Tart
On Wed, 2010-04-28 at 11:07 -0500, Danny Nicholas wrote: FWIW, I would take your STDERR references and give them another handle, since you're not really trying to produce a CLI/Console output. The symptoms you have described in this thread are 100% compliant with AGI protocol violation

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-05-11 Thread Kingsley Tart
On Wed, 2010-04-28 at 11:47 -0400, Fred Posner wrote: For a AGI that is called repeatedly, maybe you should consider implementing it in a compiled language. You can execute XXX AGIs written in C in the time it takes to load the Perl interpreter and parse your script. Yes agreed but I

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-29 Thread Tzafrir Cohen
On Wed, Apr 28, 2010 at 09:34:18AM -0700, Steve Edwards wrote: On Wed, 28 Apr 2010, Ryan Bullock wrote: Looking at the Asterisk::AGI docs, maybe try calling ReadParse() early in the script to read in anything from stdin? (From the docs) # pull AGI variables into %input %input =

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-29 Thread Steve Edwards
On Wed, 28 Apr 2010, Ryan Bullock wrote: Looking at the Asterisk::AGI docs, maybe try calling ReadParse() early in the script to read in anything from stdin? (From the docs) # pull AGI variables into %input %input = $AGI-ReadParse(); On Wed, Apr 28, 2010 at 09:34:18AM -0700, Steve

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-29 Thread Danny Nicholas
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards Sent: Thursday, April 29, 2010 1:00 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script On Wed, 28 Apr 2010, Ryan Bullock wrote

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-29 Thread Steve Edwards
Un-top-posting... On Wed, 28 Apr 2010, Ryan Bullock wrote: Looking at the Asterisk::AGI docs, maybe try calling ReadParse() early in the script to read in anything from stdin? (From the docs) # pull AGI variables into %input %input = $AGI-ReadParse(); On Wed, Apr 28, 2010 at 09:34:18AM

[asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
I have upgraded Asterisk from 1.4.22 to 1.4.30 and I have noticed I am getting a lot of errors like this on the console :- ERROR[23912]: utils.c:968 ast_carefulwrite: write() returned error: Broken pipe I have tracked it down to a perl AGI script which performs our own CDR recording. It is

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Danny Nicholas
Sent: Wednesday, April 28, 2010 3:51 AM To: Asterisk Mailing List Subject: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script I have upgraded Asterisk from 1.4.22 to 1.4.30 and I have noticed I am getting a lot of errors like this on the console :- ERROR[23912]: utils.c:968

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Philipp von Klitzing
Hi! Why is asterisk so slow in sending the call info via STDIn in these cases? Is there any way this can be fixed? Your AGI script is faulty: In at least one place you have missed to READ the output right after you have issued a command. So go check your script (agi debug might help a little

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Danny Nicholas
- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Gareth Blades Sent: Wednesday, April 28, 2010 3:51 AM To: Asterisk Mailing List Subject: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script I have upgraded Asterisk from

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Danny Nicholas wrote: Check out this snippet from Tilghman Lesher (one of the true Asterisk Guru's) http://www.mail-archive.com/asterisk-users@lists.digium.com/msg220482.html Thanks but that appears related to AMI not AGI. --

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Philipp von Klitzing wrote: Hi! Why is asterisk so slow in sending the call info via STDIn in these cases? Is there any way this can be fixed? Your AGI script is faulty: In at least one place you have missed to READ the output right after you have issued a command. So go check your

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Danny Nicholas
-users] Asterisk 1.4.30 is slow sending STDIN to AGI script Philipp von Klitzing wrote: Hi! Why is asterisk so slow in sending the call info via STDIn in these cases? Is there any way this can be fixed? Your AGI script is faulty: In at least one place you have missed to READ the output

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Danny Nicholas wrote: Can you post the script? Yes private stuff is in a separate file. $mode=start works fine but answered and completed cause the problem. I dont know if it is a problem with teh AGI script or just the newer asterisk reporting it as an error. It doesnt effect functionality

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Danny Nicholas
-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script Danny Nicholas wrote: Can you post the script? Yes private stuff is in a separate file. $mode=start works fine but answered and completed cause the problem. I dont know if it is a problem with teh

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Gareth Blades Sent: Wednesday, April 28, 2010 9:47 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script Danny Nicholas

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Danny Nicholas
-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Gareth Blades Sent: Wednesday, April 28, 2010 10:05 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script You mean

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Steve Edwards
On Wed, 28 Apr 2010, Gareth Blades wrote: The script does not issue any commands. The same script is called at all 3 stages but with different parameters on the command line to indicate the call status. Works fine before the call is answered but during and at the end of the call it quits

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Steve Edwards wrote: On Wed, 28 Apr 2010, Gareth Blades wrote: The script does not issue any commands. The same script is called at all 3 stages but with different parameters on the command line to indicate the call status. Works fine before the call is answered but during and at the end

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Fred Posner
On Apr 28, 2010, at 11:30 AM, Steve Edwards wrote: On Wed, 28 Apr 2010, Gareth Blades wrote: The script does not issue any commands. The same script is called at all 3 stages but with different parameters on the command line to indicate the call status. Works fine before the call is

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Danny Nicholas wrote: Darn, that should have worked. The improvement from 1.4.22 to 1.4.23+ basically requires that every print STDOUT line be followed by a STDIN to make util.c not choke when doing commands/setting variables. I wonder how this rewrite would work? sub set_variable {

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Ryan Bullock
Looking at the Asterisk::AGI docs, maybe try calling ReadParse() early in the script to read in anything from stdin? (From the docs) # pull AGI variables into %input %input = $AGI-ReadParse(); -- _ -- Bandwidth and Colocation

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Danny Nicholas
To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script Danny Nicholas wrote: Darn, that should have worked. The improvement from 1.4.22 to 1.4.23+ basically requires that every print STDOUT line be followed

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Steve Edwards
On Wed, 28 Apr 2010, Gareth Blades wrote: The script does not issue any commands. The same script is called at all 3 stages but with different parameters on the command line to indicate the call status. Works fine before the call is answered but during and at the end of the call it quits

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Steve Edwards
On Wed, 28 Apr 2010, Ryan Bullock wrote: Looking at the Asterisk::AGI docs, maybe try calling ReadParse() early in the script to read in anything from stdin? (From the docs) # pull AGI variables into %input %input = $AGI-ReadParse(); early == before (any interaction with Asterisk || exit)

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Steve Edwards wrote: On Wed, 28 Apr 2010, Gareth Blades wrote: The script does not issue any commands. The same script is called at all 3 stages but with different parameters on the command line to indicate the call status. Works fine before the call is answered but during and at the end

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Steve Edwards
Steve Edwards wrote: How do you reconcile your assumption that the Perl module is reading STDIN and your statement that your AGI quits before asterisk has finished sending the information about the current call via STDIN. On Wed, 28 Apr 2010, Gareth Blades wrote: Only that if I put a 3

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Gareth Blades
Steve Edwards wrote: Steve Edwards wrote: How do you reconcile your assumption that the Perl module is reading STDIN and your statement that your AGI quits before asterisk has finished sending the information about the current call via STDIN. On Wed, 28 Apr 2010, Gareth Blades wrote:

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Fred Posner
On Apr 28, 2010, at 1:00 PM, Gareth Blades wrote: Steve Edwards wrote: Steve Edwards wrote: How do you reconcile your assumption that the Perl module is reading STDIN and your statement that your AGI quits before asterisk has finished sending the information about the current call via

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Steve Edwards
On Wed, 28 Apr 2010, Fred Posner wrote: Did I miss where the code was posted? Yes. In my mail reader it is Gareth's second post. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice:

Re: [asterisk-users] Asterisk 1.4.30 is slow sending STDIN to AGI script

2010-04-28 Thread Fred Posner
On Apr 28, 2010, at 1:12 PM, Steve Edwards wrote: On Wed, 28 Apr 2010, Fred Posner wrote: Did I miss where the code was posted? Yes. In my mail reader it is Gareth's second post. Thanks. Wish I hadn't looked now. --fred http://qxork.com --