Asterisk Java AGI: utils.c write() returned error: Broken pipe

This error occurs when Asterisk tries to write some line to your AGI/FastAGI after script finish execution.

Usually, asterisk send headers, and then waits for commands. After each command asterisk sends a response. But here is one exception, at the and it writes on more line

HANGUP

I think it is the line asterisk can`t write in your case. You can check it by turning on agi debug. Write in the console:

agi set debug on

and then after running your script you should see something like this:

    -- <SIP/XXXX-0000007c>AGI Script YOUR_AGI_NAME completed, returning 4
<SIP/XXXX-0000007c>AGI Tx >> HANGUP
ERROR[1502]: utils.c:1232 ast_carefulwrite: write() returned error: Broken pipe

You can see that asterisk try to send HANGUP after script completed. You don`t have to worry about it, but it is a library bug.

Tags:

Java

Asterisk

Agi