Hello, I am using PJSIP and have configured tcp connection to use with the server. I've also configured the server to send keep-alive notification to the client every 90 seconds. Unfortunately, it seems that the tcp buffer on pjsip doesn't discard keep-alives packets, so when the real message comes, for example, SIP message I am getting an error: sip_transport. !Error processing 879 bytes packet from TCP xx.xx.xx.xx:5060 : PJSIP syntax error exception when parsing '' header on line 1 col 1: -- end of packet. After that everything works fine for 90 seconds, then server sends another keep-alive packet and the error is repeated, then fine for 90 seconds, then one error and so on.... How can I fix that? Any help would be highly appreciated! I've read that sip_config.h contains some values related to keep-alives. and the default values are 90 seconds for TCP ( PJSIP_TCP_KEEP_ALIVE_INTERVAL ). But how does it work on iPhone, if application is freezed while it is in background, and Apple allows to wake it up only once in 10 minutes??? Thank you in advance.