< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] responses over TCP get lost when in the same packet


Hallo,

I've have noticed following probleem when I'm sending messages over TCP : if
2 responses are arriving in the same packet, the second response is not
passed to the transaction user. This happens in the function
Connection::performRead. When 2 requests are arriving in the same packet,
there is no problem.

In the logging, I see : Extra bytes after message.

More in detail :

Following situation works :

UAC                  UAS
 |    SYN             |
 |------------------->|
 |    SYN,ACK         |
 |<-------------------|
 |    SYN,ACK         |
 |------------------->|
 |                    |
 | SIP request 1/TCP  |
 |------------------->|
 |    ACK             |
 |<-------------------|
 |                    |
 | SIP request 2/TCP  |
 |------------------->|
 |    ACK             |
 |<-------------------|
 |                    |
 | SIP response 1/TCP |
 |<-------------------|
 |    ACK             |
 |------------------->|
 |                    |
 | SIP response 2/TCP |
 |<-------------------|
 |    ACK             |
 |------------------->|

However, when response 1 and 2 are sent in the same packet, response 2 is
not forwarded to the transaction user :


UAC                  UAS
 |    SYN                          |
 |-------------------------------->|
 |    SYN,ACK                      |
 |<--------------------------------|
 |    SYN,ACK                      |
 |-------------------------------->|
 |                                 |
 | SIP request 1/TCP               |
 |-------------------------------->|
 |    ACK                          |
 |<--------------------------------|
 |                                 |
 | SIP request 2/TCP               |
 |-------------------------------->|
 |    ACK                          |
 |<--------------------------------|
 |                                 |
 | SIP response 1 + response 2/TCP |
 |<--------------------------------|
 |    ACK                          |
 |-------------------------------->|

I didn't find any explanation for this in the rfc's. Also, the jain-sip
stack is processing these responses sent in batch correctly. Is is possible
that this is a bug ?

For requests in batch, there seems no problem, both requests are forwarded
to the transaction user.

Can 
If desired, I can provide a the code for the daemon to generate the
responses, or an ethereal trace. If it is agreed that this would be a bug,
I'm also prepared to do the effort to fix it.

Regards,

Fred