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

Danny Nicholas danny at debsinc.com
Wed Apr 28 08:23:34 CDT 2010


Two suggestions - 1. Make sure your AGI has the proper syntax/handling -
just because it "works" doesn't mean that it will be happy in the more
"restrictive" environment of a dialplan call. 
2.  If you are 100% certain that #1 has been addressed, change utils.c line
968 from
ast_log(LOG_ERROR, "write() returned error: %s\n", strerror(errno));
to 
ast_log(LOG_WARNING, "write() returned error: %s\n", strerror(errno));

and do a new make;make install.


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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 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 called before the start of the call, once answered and 
again when the call is hungup.
It works fine when called before dialing and the AGI debugging shows 
asterisk sending the STDIN to the script very fast. When called after 
answering and at the end of the call asterisk is much slower sending the 
STDIN and I can see the debug scrolling up the screen and this is what 
is causing the error as the AGI script finished and exits before all the 
STDIN is sent. Even if I add a pause at the end of the script for 1 
second it only gets half way through sending the STDIN.

Why is asterisk so slow in sending the call info via STDIn in these cases?
Is there any way this can be fixed?

Thanks

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list