I have written a hello world Asterisk AGI script using Java. The script runs as expected and plays the hello world sound file, but the asterisk console is giving an error though:
ERROR[31058]: utils.c:1164 ast_carefulwrite: write() returned error: Broken pipe
Any idea what I'm doing wrong?
I'm using asterisk-java-0.3.1.jar and Asterisk 1.8.10.1~dfsg-1ubuntu1
Java class as below:
import org.asteriskjava.fastagi.AgiChannel;
import org.asteriskjava.fastagi.AgiException;
import org.asteriskjava.fastagi.AgiRequest;
import org.asteriskjava.fastagi.BaseAgiScript;
public class AgiHelloWorld extends BaseAgiScript
{
@Override
public void service(AgiRequest arg0, AgiChannel arg1) throws AgiException
{
answer();
streamFile("hello-world");
hangup();
}
}