AGI на 1.6 и FreeBSD
Имеем * 1.6.0.6 установленный на FreeBSD 6.1, PHP 5.2.9
идем по сценарию:
exten=>s,1,Answer()
exten=>s,2,Agi(tds.sp_check.php)
скрипт tds.sp_check.php:
#!/usr/local/bin/php -q
<?php
$stdin = fopen('php://stdin', 'r');
$stdout = fopen('php://stdout', 'w');
fputs($stdout,"SAY NUMBER 1234567 '79#' \n");
fflush($stdout);
?>
имеет атрибуты на запуск, все правильно, запускается, в обычной консоли все нормально.
Но в консоли астериска:
-- Executing [s@default:3] AGI("SIP/5060-0878e000", "tds.sp_check.php") in new stack
-- Launched AGI Script /usr/local/share/asterisk/agi-bin/tds.sp_check.php
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:23] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
-- <SIP/5060-0878e000> Playing 'digits/1.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/million.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/2.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/hundred.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/30.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/4.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/thousand.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/5.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/hundred.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/60.gsm' (language 'en')
-- <SIP/5060-0878e000> Playing 'digits/7.gsm' (language 'en')
[Mar 10 16:58:31] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:31] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:31] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:31] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
[Mar 10 16:58:31] ERROR[520]: utils.c:1019 ast_carefulwrite: write() returned error: Broken pipe
-- <SIP/5060-0878e000>AGI Script tds.sp_check.php completed, returning 0
и вроде бы все и выполняется , но эти брокенпайпы что то смущают, где копать?
|