Are you sure you have a good connection from the SIM808 to the board (including ground?). It's looking like the reason things are going wrong is data is getting lost. For example 0, CLOED should be 0, CLOSED and for your last one you get , CLOSED without a socket number.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Are you sure you have a good connection from the SIM808 to the board (including ground?). It's looking like the reason things are going wrong is data is getting lost. For example
0, CLOED
should be0, CLOSED
and for your last one you get, CLOSED
without a socket number.