OpenWrt Forum Archive

Topic: Problem running AGI script in Asterisk

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm running Kamikaze 8.09 and Asterisk14 full version on a Asus WL-500GP booting from USB stick with pivotroot mod.  I've even loaded ALL Asterisk modules, incl res_agi.so. Everything works except AGI. Installed pkgs :

asterisk14    1.4.23.1-1   
asterisk14-mysql    1.4.7-2   
asterisk14-res-agi    1.4.23.1-1   
asterisk14-sounds    1.4.23.1-1   
asterisk14-voicemail 
php5    5.1.6-1   
php5-fastcgi    5.1.6-1   
php5-mod-curl    5.1.6-1   
php5-mod-pcre    5.1.6-1

When I try a simple AGI script, I get the error msg "utils.c:938 ast_carefulwrite: Timed out trying to write" in the Asterisk logs.  Is there something missing or not installed?  Thanks much.

AGI test script :
#!/usr/bin/php -q
<?php
print "Test print -- nothing to do";
exit;
?>

Asterisk logs :
-- Executing [*2222@from-internal:1] Answer("SIP/500-00624298", "") in new stack
-- Executing [*2222@from-internal:2] AGI("SIP/500-00624298", "test.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/test.agi
[Mar  9 23:41:40] NOTICE[5749]: utils.c:938 ast_carefulwrite: Timed out trying to write
[Mar  9 23:41:40] NOTICE[5749]: utils.c:938 ast_carefulwrite: Timed out trying to write
[Mar  9 23:41:40] DEBUG[5749]: res_agi.c:1890 run_agi: SIP/500-00624298 hungup

(Last edited by klingon888 on 10 Mar 2009, 00:47)

bump...anyone??  Help??... I've done all the searches but cannot find any answer. Anyone successfully used AGI in Asterisk under Openwrt?

The discussion might have continued from here.