No subject
Wed Jan 27 21:05:54 CET 2016
ght? Unfortunately I don't know why it does that, perhaps the best thing to=
do is to check the client's logs.
Best regards.
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
________________________________
De: users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.or=
g> <users-bounces at lists.opensips.org><mailto:users-bounces at lists.opensips.o=
rg> em nome de R=E3zvan Crainea <razvan at opensips.org><mailto:razvan at opensip=
s.org>
Enviado: quarta-feira, 26 de outubro de 2016 13:08
Para: users at lists.opensips.org<mailto:users at lists.opensips.org>
Assunto: Re: [OpenSIPS-Users] Is it a kind of TCP keep alive produced by Op=
enSIPS?
Hi, Rodrigo!
The logs you are tracing are printed when OpenSIPS receives something from =
the client, and then immediately responds back. Due to the fact that we don=
't see any other debug messages, like SIP parsing & stuff, makes me think t=
hat it is a CRLF pinging - the client periodically sends a CRLFCRLF TCP mes=
sage to OpenSIPS, and OpenSIPS responds with a single CRLF. Note that this =
is different from a TCP keep-alive, where each peer send a 0-length TCP mes=
sage, without any body. That message doesn't even get to the application la=
yer.
However, tracing the communication between OpenSIPS and the client should c=
onfirm the above :).
Best regards,
R=E3zvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>
Home =97 OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com<http://www.opensips-solutions.com>
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS i=
s more than a SIP proxy/router as it includes application-level functionali=
ties.
On 10/26/2016 05:10 PM, Rodrigo Pimenta Carvalho wrote:
Dear OpenSIPS users,
In the OpenSIPS log I see:
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan 1 19:30:38 [3451] DBG=
:core:tcp_read_req: Using the global ( per process ) buff
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan 1 19:30:38 [3451] DBG=
:core:tcp_handle_req: content-length=3D 0
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan 1 19:30:38 [3451] DBG=
:core:async_tsend_stream: Async successful write from first try on 0x74e135=
48
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan 1 19:30:38 [3451] DBG=
:core:tcp_read_req: tcp_read_req end
The frequency is 1 time at each 1,5 minute. There is only one client online=
. I suspect that OpenSIPS uses the socket 0x74e13548 to send messages to su=
ch client. The client became online using TCP.
Just to confirm, is this log a result of a TCP keep alive function enabled?
Best regards.
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--_000_BN6PR02MB2721AD82A1A6A8455FD9790AB5AD0BN6PR02MB2721namp_
Content-Type: text/html; charset="windows-1250"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dwindows-1=
250">
<style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=
n-bottom:0;} --></style>
</head>
<body dir=3D"ltr">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;font=
-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi <font style=3D"font-size:11pt" color=3D"#000000" face=3D"Calibri, san=
s-serif">R=E3zvan</font>.</p>
<p><br>
</p>
<p>Ok. No problem. Today morning I was investigating the softphone guys (ru=
nning in the same hardware as OpenSIPS) and I have seen lots of its logs.</=
p>
<p>But the logs didn't presented any problem. Everything seems to be ok. Th=
ose logs showed SIP and ICE messages.
<br>
</p>
<p><br>
</p>
<p>Maybe I will have to use TCP dump in the hardware where the problem is h=
appening. And investigate at TCP level.<br>
</p>
<p><br>
</p>
<p>I will prepare the log that you asked me.</p>
<p><br>
</p>
<p>Best regards.</p>
<p><br>
</p>
<div id=3D"Signature">
<div name=3D"divtagdefaultwrapper" style=3D"font-family:Calibri,Arial,Helve=
tica,sans-serif; font-size:; margin:0">
<div class=3D"BodyFragment"><font size=3D"2">
<div class=3D"PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
<br>
<br>
<div style=3D"color: rgb(0, 0, 0);">
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font style=3D"font-size:11pt" color=
=3D"#000000" face=3D"Calibri, sans-serif"><b>De:</b> users-bounces at lists.op=
ensips.org <users-bounces at lists.opensips.org> em nome de R=E3zvan Cra=
inea <razvan at opensips.org><br>
<b>Enviado:</b> sexta-feira, 28 de outubro de 2016 06:09<br>
<b>Para:</b> users at lists.opensips.org<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] Is it a kind of TCP keep alive produce=
d by OpenSIPS?</font>
<div> </div>
</div>
<div><tt>Unfortunately I have no other ideas about what you could do. You'd=
better ask for support from the softphone guys, to see why they are closin=
g the connections.<br>
<br>
Best regards,<br>
</tt>
<pre class=3D"moz-signature" cols=3D"72">R=E3zvan Crainea=0A=
OpenSIPS Solutions=0A=
<a previewremoved=3D"true" id=3D"LPlnk304788" class=3D"moz-txt-link-abbrevi=
ated" href=3D"http://www.opensips-solutions.com">www.opensips-solutions.com=
</a></pre>
<div style=3D"margin-bottom: 20px; overflow: auto; width: 100%; text-indent=
: 0px;" id=3D"LPBorder_GT_14776616097020.009456819028335506">
<table style=3D"width: 90%; background-color: rgb(255, 255, 255); position:=
relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-=
top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px do=
tted rgb(200, 200, 200);" id=3D"LPContainer_14776616096990.0893956665001771=
6" cellspacing=3D"0">
<tbody>
<tr style=3D"border-spacing: 0px;" valign=3D"top">
<td colspan=3D"2" style=3D"vertical-align: top; position: relative; padding=
: 0px; display: table-cell;" id=3D"TextCell_14776616097000.2941656400984616=
">
<div id=3D"LPRemovePreviewContainer_14776616097000.3567978290279692"></div>
<div style=3D"top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-siz=
e: 21px; font-family: "wf_segoe-ui_light","Segoe UI Light&qu=
ot;,"Segoe WP Light","Segoe UI","Segoe WP",Ta=
homa,Arial,sans-serif; line-height: 21px;" id=3D"LPTitle_14776616097000.819=
1028659813343">
<a target=3D"_blank" href=3D"http://www.opensips-solutions.com/" style=3D"t=
ext-decoration: none;" id=3D"LPUrlAnchor_14776616097010.08030346115244202">=
Home =97 OpenSIPS Solutions</a></div>
<div style=3D"margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight=
: 400; font-family: "wf_segoe-ui_normal","Segoe UI",&qu=
ot;Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14=
px;" id=3D"LPMetadata_14776616097010.1267534587372413">
www.opensips-solutions.com</div>
<div style=3D"display: block; color: rgb(102, 102, 102); font-weight: 400; =
font-family: "wf_segoe-ui_normal","Segoe UI","Sego=
e WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max=
-height: 100px; overflow: hidden;" id=3D"LPDescription_14776616097010.27991=
97384319213">
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS i=
s more than a SIP proxy/router as it includes application-level functionali=
ties.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class=3D"moz-cite-prefix">On 10/27/2016 08:48 PM, Rodrigo Pimenta Carv=
alho wrote:<br>
</div>
<blockquote type=3D"cite">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; fo=
nt-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi. <font style=3D"font-size:11pt" color=3D"#000000" face=3D"Calibri, sa=
ns-serif">R=E3zvan</font>.</p>
<p><br>
</p>
<p>Thank you very much!</p>
<p>So, I will keep using the flag "Pp" to create dialogs. As I un=
derstood, it will not cause any problem.</p>
<p><br>
</p>
<p>Yes, it is the client that closes the connection, always. After some mor=
e investigation, I have discovered the following specific situation:</p>
<p><br>
</p>
<p>When softphone A (<span lang=3D"en">which</span> is always using ICE and=
STUN) calls B, if B is not using ICE and STUN, the TCP connection between =
A and OpenSIPS remains stable. However, in this scenario, if B is using ICE=
and STUN, A closes the TCP connection
to OpenSIPS after 33 seconds of dialog.</p>
<p><br>
</p>
<p>Here, SIP is over TCP and ICE uses UDP. A and OpenSIPS run in the same h=
ardware. So, there is no NAT between A and OpenSIPS. B run in another hardw=
are, but in the same local network (same network domain). So, there is no N=
AT between B and OpenSIPS. A is
a proprietary softphone and B is Microsip. I have looked at the proprietar=
y softphone log and there is no issues with SIP.<br>
</p>
<p><br>
</p>
<p>Do you have some more hint about what to investigate next?</p>
<p><br>
</p>
<p>Any hint will be very helpful!!</p>
<p>Best regards.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id=3D"Signature">
<div name=3D"divtagdefaultwrapper" style=3D"font-family:Calibri,Arial,Helve=
tica,sans-serif; font-size:; margin:0">
<div class=3D"BodyFragment"><font size=3D"2">
<div class=3D"PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
<br>
<br>
<div style=3D"color:rgb(0,0,0)">
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font style=3D"font-size:11pt" color=
=3D"#000000" face=3D"Calibri, sans-serif"><b>De:</b>
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:users-bounces at lists.op=
ensips.org">
users-bounces at lists.opensips.org</a> <a class=3D"moz-txt-link-rfc2396E" hre=
f=3D"mailto:users-bounces at lists.opensips.org">
<users-bounces at lists.opensips.org></a> em nome de R=E3zvan Crainea <a=
class=3D"moz-txt-link-rfc2396E" href=3D"mailto:razvan at opensips.org">
<razvan at opensips.org></a><br>
<b>Enviado:</b> quinta-feira, 27 de outubro de 2016 05:47<br>
<b>Para:</b> <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:users at lis=
ts.opensips.org">
users at lists.opensips.org</a><br>
<b>Assunto:</b> Re: [OpenSIPS-Users] Is it a kind of TCP keep alive produce=
d by OpenSIPS?</font>
<div> </div>
</div>
<div><tt>Hi, Rodrigo!<br>
<br>
See my answers inline.<br>
<br>
BR<br>
</tt>
<pre class=3D"moz-signature" cols=3D"72">R=E3zvan Crainea=0A=
OpenSIPS Solutions=0A=
<a previewremoved=3D"true" id=3D"LPlnk865344" class=3D"moz-txt-link-abbrevi=
ated" href=3D"http://www.opensips-solutions.com">www.opensips-solutions.com=
</a></pre>
<div id=3D"LPBorder_GT_14775782628740.9356073187426525" style=3D"margin-bot=
tom:20px; overflow:auto; width:100%; text-indent:0px" contenteditable=3D"fa=
lse">
<table id=3D"LPContainer_14775782628710.44779887888215386" style=3D"width:9=
0%; background-color:rgb(255,255,255); overflow:auto; padding-top:20px; pad=
ding-bottom:20px; margin-top:20px; border-top:1px dotted rgb(200,200,200); =
border-bottom:1px dotted rgb(200,200,200)" cellspacing=3D"0">
<tbody>
<tr style=3D"border-spacing:0px" valign=3D"top">
<td colspan=3D"2" id=3D"TextCell_14775782628720.7934107458903821" style=3D"=
vertical-align:top; padding:0px; display:table-cell">
<div id=3D"LPTitle_14775782628720.02112093772763035" style=3D""><a target=
=3D"_blank" href=3D"http://www.opensips-solutions.com/" id=3D"LPUrlAnchor_1=
4775782628730.12815466222114502" style=3D"text-decoration:none">Home =97 Op=
enSIPS Solutions</a></div>
<div id=3D"LPMetadata_14775782628730.5947588421151666" style=3D""><a class=
=3D"moz-txt-link-abbreviated" href=3D"http://www.opensips-solutions.com">ww=
w.opensips-solutions.com</a></div>
<div id=3D"LPDescription_14775782628740.18087400754553007" style=3D"">OpenS=
IPS is a mature Open Source implementation of a SIP server. OpenSIPS is mor=
e than a SIP proxy/router as it includes application-level functionalities.=
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class=3D"moz-cite-prefix">On 10/26/2016 08:15 PM, Rodrigo Pimenta Carv=
alho wrote:<br>
</div>
<blockquote type=3D"cite">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; fo=
nt-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi R=E3zvan.</p>
<p><br>
</p>
<p>Thank you very much.</p>
<p>I'm facing a problem here related to TCP connection teared down during d=
ialogs.</p>
<p>While a peer is not in dialogs, its TCP connection to OpenSIPS keeps onl=
ine all the time.</p>
<p>However, when such peer enters in a conversation (be part of a dialog), =
after few minutes there is a EOF received in a socket. After this, OpenSIPS=
can no more send SIP BYEs to the respective peer. In the log I can see:</p=
>
<p><br>
</p>
<div><span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 c=
olibri-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21027] DBG:core:tcp_=
read: EOF on 0x74e3d048, FD 24 &nb=
sp; =
&nb=
sp; =
&nb=
sp; </span><br>
<span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 colibr=
i-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21027] DBG:core:tcp_read_=
req: EOF received &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; </span><br>
<span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 colibr=
i-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21027] DBG:core:io_watch_=
del: [TCP_worker] io_watch_del op on index 0 24 (0x1875e8, 24, 0, 0x10,0x3)=
fd_no=3D3 called </span><br>
<span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 colibr=
i-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21027] DBG:core:tcpconn_r=
elease: releasing con 0x74e3d048, state -1, fd=3D-1, id=3D3 &nbs=
p;
</span><br>
<span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 colibr=
i-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21027] DBG:core:tcpconn_r=
elease: extra_data (nil) &nb=
sp; =
&nb=
sp; =
&nb=
sp; </span><br>
<span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 colibr=
i-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21029] DBG:core:handle_tc=
p_worker: reader response=3D 74e3d048, -1 from 2 &nb=
sp; =
&nb=
sp; =
</span><br>
<span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:38:45 colibr=
i-imx6-jfl opensips[21018]: Jan 2 01:38:45 [21029] DBG:core:tcpconn_d=
estroy: destroying connection 0x74e3d048, flags 0006 </span></di=
v>
<br>
<p>...</p>
<p>When OpenSIPS try to send a SIP BYE via socket <span style=3D"font-size:=
10pt; color:rgb(0,111,201)">
0x74e3d048</span> , I can see the log:<br>
</p>
<p><span style=3D"font-size:10pt; color:rgb(0,111,201)">Jan 02 01:40:49 col=
ibri-imx6-jfl opensips[21018]: Jan 2 01:40:49 [21026] DBG:core:proto_=
tcp_send: no open tcp connection found, opening new one, async =3D 1</span>=
</p>
<p><br>
</p>
<p>I have already used the flag "Pp" in the creation of dialogs, =
but it didn't take effect. That is, even with "Pp" I'm still gett=
ing "EOF" in the TCP socket.</p>
<p><br>
</p>
<p>1 - Should the flag "Pp" avoid those EOFs during dialogs?</p>
</div>
</blockquote>
Ideally, it should. However if the client does not "like" the pin=
ging and closes the connection, there's not that much we can do.<br>
<blockquote type=3D"cite">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; fo=
nt-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>That flag causes the OpenSIPS to send SIP OPTIONS. The peers are replyin=
g with SIP 500.
<br>
</p>
</div>
</blockquote>
That's not really an issue. The SIP OPTIONs pinging has two purposes: 1. ve=
rify if the dialog is still active, and 2. keep the NAT pinhole open. If th=
e SIP client doesn't know how to reply to in-dialog pinging, then 1. isn't =
really useful. So the reply code
doesn't really matter, unless it is a 408, which means that the peer did n=
ot respond at all, and the dialog will be turn down.<br>
<blockquote type=3D"cite">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; fo=
nt-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>2- Is a SIP 500 reply enough to OpenSIPS keep the dialog connected?</p>
</div>
</blockquote>
Any communication between OpenSIPS and the client keeps the NAT pinhole ope=
n (see 2. above). From SIP perspective, that 500 could have a lot of meanin=
gs: the client does not know how to reply, or there was an internal error t=
hat could not process the message.
However, this whole communication will keep the connection alive.<br>
<blockquote type=3D"cite">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; fo=
nt-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>3 - Does it make sense getting <span>absence</span> of keep alive messag=
es during dialogs?</p>
</div>
</blockquote>
So as I said above, any pinging method is useful to keep the connection ali=
ve. Regarding the dialogs, there is no special need for pinging from SIP pe=
rspective, unless you are using SST, which I presume you are not.<br>
<blockquote type=3D"cite">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; fo=
nt-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>Any hint will be very helpful!</p>
<p>P.S.: I will check the TCP trace too, looking for keep alives. <br>
</p>
</div>
</blockquote>
More information about the Users
mailing list