ERROR[8471][C-00000007]: utils.c:1393 ast_carefulwrite: write() returned error: Broken pipe


#1

I need some help please. I am using php and mysql (external database) . and I get this error.

ERROR[8471][C-00000007]: utils.c:1393 ast_carefulwrite: write() returned error: Broken pipe

I already add permission to the php file inside agi-bin in asterisk, but still no luck.

Thank you in advance.


#2

Asterisk is sending information to a TCP connnection already closed, First log off the Manager section and then close the TCP connection


#4

The usual mistake people make is to not read the response from Asterisk before closing the connection.


#5

Are you talking to socket in php ?


#6

I’ve no idea, as I don’t know what you are doing with PHP. However, if you are using AMI, in any language, you will be talking to a socket.


#7

I don’t know how to say this, I am in this file

extensions_custom.conf

using the exten ? and calling my php file then my php file will connect to the external database. and do some stuff…my php file is just simple no socket programming use., only query to get value from database.

Thank you in advance.


#8

extensions_custom.conf isn’t part of Asterisk. It’s included in extensions.conf by FreePBX.

You cannot reference a PHP file directly from extensions.conf. You need to use an application. Depending on the application used, the I/O in the script will either be over sockets or pipes. From a broken pipe point of view, there is no real difference.

For example, AGI will use a pipe and FastAGI will use network sockets.