<div class="gmail_quote"><br>
<div>Thanks for the response.</div>
<div> </div>
<div>The SIP server is reading only the first record(first sip message), the _tls_read() function&#39;s log shows the length of first sip message which is matching with length of first record in wireshark.. This means SSL_read returns only the first record.</div>

<div>I did the test using TCP which is working fine as it is reading two sip messages on a single read.</div>
<div> </div>
<div>Please find the log and attached print screen of wireshark traces.</div>
<div> </div>
<div><br>Jan 22 20:41:37 REGS-1a0240 openser[936]: io_wait_loop_sigio_rt: siginfo: signal=35 (35), si_code=1, si_band=0x41, si_fd=37 <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: TCPCONN: handle_io:  fd map 0x1011d73c (37): {37, 2, 0x30294da0} <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]: tls_update_fd: New fd is 37 <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: _tls_read: 559 bytes read <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: read= 559 bytes, parsed=559, state=4, error=1 <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]: tcp_read_req: last char=0x0A, parsed msg= BYE sip:551138175007@21.21.81.11:6061;transport=tls SIP/2.0^M To: SIP5007_TLS_SIMPLEX  &lt;<a href="mailto:sip%3A551138175007@41.41.0.230" target="_blank">sip:551138175007@41.41.0.230</a>&gt;;tag=91c2c894c0^M From: &lt;sip:551138175008@41.41.0.230:5061;transport=tls&gt;;tag=snl_G84KdX4MLT^M Call-ID: 0ad3e453326a4160^M CSeq: 1 BYE^M Route: &lt;sip:21.21.27.10:5061;transport=tls;ftag=91c2c894c0;lr=on&gt;^M Via: SIP/2.0/TLS 41.41.0.230:5061;branch=z9hG4bK_brancha_41.41.0.230_KonTU5DMPx^M Accept-Language: en;q=0.0^M Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER^M Date: Fri, 22 Jan 2010 20:41:36 GMT ^M Max-Forwards: 69^M Content-Length: 0^M ^M  <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]: tcp_read_req: end of header part <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: - received from: port 5061 <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: - received from: ip 41.41.0.230 <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]: tcp_read_req: headers: BYE sip:551138175007@21.21.81.11:6061;transport=tls SIP/2.0^M To: SIP5007_TLS_SIMPLEX  &lt;<a href="mailto:sip%3A551138175007@41.41.0.230" target="_blank">sip:551138175007@41.41.0.230</a>&gt;;tag=91c2c894c0^M From: &lt;sip:551138175008@41.41.0.230:5061;transport=tls&gt;;tag=snl_G84KdX4MLT^M Call-ID: 0ad3e453326a4160^M CSeq: 1 BYE^M Route: &lt;sip:21.21.27.10:5061;transport=tls;ftag=91c2c894c0;lr=on&gt;^M Via: SIP/2.0/TLS 41.41.0.230:5061;branch=z9hG4bK_brancha_41.41.0.230_KonTU5DMPx^M Accept-Language: en;q=0.0^M Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER^M Date: Fri, 22 Jan 2010 20:41:36 GMT ^M Max-Forwards: 69^M Content-Length: 0^M ^M . <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]: tcp_read_req: content-length= 0 <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: tcp_read_req: body:  <br>Jan 22 20:41:37 REGS-1a0240 openser[936]: calling receive_msg(0x30294e14, 559, ) <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]: SIP Request: <br>Jan 22 20:41:37 REGS-1a0240 openser[936]:  method:  &lt;BYE&gt; <br>Jan 22 20:41:37 REGS-1a0240 openser[936]:  uri:     &lt;sip:551138175007@21.21.81.11:6061;transport=tls&gt; <br>
Jan 22 20:41:37 REGS-1a0240 openser[936]:  version: &lt;SIP/2.0&gt; </div>
<div> </div>
<div>Thanks</div>
<div>Jijo</div>
<div>
<div></div>
<div class="h5">
<div><br><br> </div>
<div class="gmail_quote">On Sun, Jan 24, 2010 at 5:53 AM, Klaus Darilion <span dir="ltr">&lt;<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I would verify if the received fragment really contains 2 complete SIP messages (e.g. 2xCRLF at the end of the SIP headers and if Content-Length header is correct).<br>
<br>For debugging, TLS is PITA.<br><br>Maybe the SIP server shows the same behavior when using TCP. Otherwise you can try to configure the NULL:CIPHER on both servers - then you see the plaintext SIP message in the TLS packets.<br>
<br>regards<br>klaus<br><br>Jijo Jose wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div>Hi All,<br> We have a SIP server which enabled NAGLE algorithm and proxy as openser ver 1.1<br> SIP Server send a TLS multiple records( 2 SIP messages) in a packet to openser. Openser is reading only the first record( first SIP message). The second TLS record(sip message) is read only when the next message recieved by openser from the SIP Server.<br>
  I would like to know anybody observed this issue.  I have compared the codebase of kamailio 1.4 and openser 1.1 but didin&#39;t find any diffrence for TLS.<br> I have looked at the API _tls_read() in openser which is same as that of kamilio.<br>
 Don&#39;t we need to use SSL_pending() after SSL_read() to verify any buffer is left in the SSL layer ?<br> Do you think is it due to the poll method error? The poll method we use is POLL_SIGIO_RT<br> Please let me know your comments.<br>
 Thanks in advance.<br> Jijo<br><br><br></div></div>------------------------------------------------------------------------<br><br>_______________________________________________<br>Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br><a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br></blockquote><br></blockquote></div><br></div></div></div><br>