ERROR[3993]: utils.c:1164 ast_carefulwrite: write() returned

Hello everyone,
I made a sip user and called it and shift the call to my java program using asterisk-java FastAGI protocol.
The image shows the java class and asterisk command line status while call is made
https://docs.google.com/file/d/0B9EiLgV9ewa9TjZjS2JoTjFnZHc/edit

The error is:
NOTICE[3993]: channel.c:4149 __ast_read: Dropping incompatible voice frame on SIP/1000abc-00000000 of format ulaw since our native format has changed to 0x2 (gsm)
[Jun 2 16:04:38] ERROR[3993]: utils.c:1164 ast_carefulwrite: write() returned error: Broken pipe

Thanks
Atul

Broken pipe is typically caused by exiting from an AGI scipt prematurely (without reading all the responses from Asterisk).

Although it indicates bad practice, it is often harmless.

But I have used only answer() and hangUp().The program i ssimple
How can I avoid exiting from an AGI scipt prematurely?
What would make this ocde perfect?

Read the responses to those actions, as well as the initial list of variable values. See asteriskdocs.org/en/3rd_Edit … I_id241920