You are probably using "String Slicing" or "Array Indexing", as opposed to "String Concatenation", when storing Received Characters in your CSTRING buffer. Since Slicing and Indexing are faster than using String Operations, this is the preferred method of storing characters in a buffer. When clearing your String, you are no doubt using either the Clear() function or setting the string to an empty string (myCString = '').
The Clear() function and setting a string to an empty string work correctly with Clarion STRING's, however, they do not work as you might think with CSTRING's. With CSTRING's, Clarion simply inserts a NULL (0) in the 1st character position. Any other characters in the string, starting at position 2, are left intact.
If your Routine is not filtering out Carriage Returns and Line Feeds, these are being stored in your String along with the word BUSY. The next time in to your Routine, you begin storing Received Characters starting at position 1 (overwriting the NULL character and thus expanding the String). The problem is, the word BUSY is still in the String! Your call to StrWord() is finding the word BUSY and your Routine thinks that the Phone is Busy, when it actually is not.
CLACom includes a function called ClearVariable(). To use it, you pass the CSTRING variable, a 0, and the number of bytes to clear. For instance: ClearVariable(myCString,0,20). This will set the string to 20 Null's. Be careful that you do not attempt to clear more bytes than the string's declared length or you will overwrite memory and cause a General Protection Fault (GPF).
