Привет! Asterisk 1.6 пишет
[Sep 21 18:38:12] ERROR[4521]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
[Sep 21 18:38:12] ERROR[4521]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
После чего падает.
При обращение:
exten => s,1,Answer()
exten => s,2,agi(test.agi)
test.agi
#!/usr/bin/php -q <?php
set_time_limit(0);
require('phpagi.php');
$agi = new AGI();
$agi->answer();
$agi->exec('NoOp','Starting main module AGI script');
$agi->stream_file('thanks');
//Запуск основного модуля
$agi->hangup();
?>
Что может быть?
1) попробуйте это запустить
2) проверте файлы
включите agi дебаг
core set verbose 3
agi set debug on
test.agi находится в var/lib/asterisk/agi-bin
Asterisk об этом знает и права есть. При звонке, даже трубка поднимается после чего сообщает "Извините, связь прервалась..."
Включил дебаг, теперь пишит следующие ошибки:
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << php [options] -- [args...]
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << php [options] -a
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx <<
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -a Run interactively
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -c <path>|<file> Look for php.ini file in this directory
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -n No php.ini file will be used
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -d foo[=bar] Define INI entry foo with value 'bar'
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -e Generate extended information for debugger/profiler
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -f <file> Parse and execute <file>.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -h This help
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -i PHP information
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -l Syntax check only (lint)
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -m Show compiled in modules
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -r <code> Run PHP <code> without using script tags <?..?>
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -B <begin_code> Run PHP <begin_code> before processing input lines
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -R <code> Run PHP <code> for every input line
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -F <file> Parse and execute <file> for every input line
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -E <end_code> Run PHP <end_code> after processing all input lines
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -H Hide any passed arguments from external tools.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -s Output HTML syntax highlighted source.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -v Version number
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -w Output source with stripped comments and whitespace.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << -z <file> Load Zend extension <file>.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx <<
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << args... Arguments passed to script. Use -- args when first argument
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << starts with - or script is read from stdin
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx <<
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << --ini Show configuration file names
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx <<
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << --rf <name> Show information about function <name>.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << --rc <name> Show information about class <name>.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << --re <name> Show information about extension <name>.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx << --ri <name> Show configuration for extension <name>.
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
<Datacard/datacard1-e9c8>AGI Rx <<
<Datacard/datacard1-e9c8>AGI Tx >> 510 Invalid or unknown command
[Sep 22 12:46:20] ERROR[2936]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
-- <Datacard/datacard1-e9c8>AGI Script test.agi completed, returning 0
-- Auto fallthrough, channel 'Datacard/datacard1-e9c8' status is 'UNKNOWN'
test.agi находится в var/lib/asterisk/agi-bin
Asterisk об этом знает и права есть. При звонке, даже трубка поднимается после чего сообщает "Извините, связь прервалась..."
Задан: 2011-09-20 18:15:37 +0400
Просмотрен: 3,867 раз
Обновлен: Sep 21 '11
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.