<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 16, 2014 at 1:04 PM, Jerry Geis <span dir="ltr"><<a href="mailto:geisj@pagestation.com" target="_blank">geisj@pagestation.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am running a heartbeat... Asterisk 11.15.0 - same behaviour is noticed on 1.4.43 also<div><br></div><div>I issue a call through the API that does the below. just UserEvent and Hangup<br><div><br></div><div><div>   -- Executing [s@heartbeat:1] UserEvent("Local/s@heartbeat-0000000f;2", "HeartBeat, Noop") in new stack</div><div>    -- Executing [s@heartbeat:2] Hangup("Local/s@heartbeat-0000000f;2", "") in new stack</div><div>  == Spawn extension (heartbeat, s, 2) exited non-zero on 'Local/s@heartbeat-0000000f;2'</div><div>[Dec 16 13:57:01] ERROR[1956]: utils.c:1440 ast_careful_fwrite: fwrite() returned error: Broken pipe</div></div><div><br></div><div><br></div><div>I get "many" broken pipes (last line above) in the /var/log/asterisk/messages file.</div><div>Is there a way to more correctly close and not get that message?</div><div></div></div></div><br></blockquote><div><br></div><div>Assuming you are talking about the Asterisk Management Interface (AMI). </div><div> </div><div>I have seen many broken pipe messages cause by the AMI client closing the connection before reading the response from the server.  Some of the Asterisk Munin-Node plugins suffered from this problem.<br></div><div><br></div><div>After you issue your command, you need to read the response.  You should get a line that says '--END COMMNAD--' or an error response. Since the dialplan is executing, I doubt you will get an error.</div><div><br></div><div>Your client should issue a Logoff action, then read all the responses until it gets the 'Thanks for all the fish.' response.  Then close the socket.</div><div><br></div><div><br></div></div></div></div>