[OpenSIPS-Users] OpenSIPS reopen TCP connectios and sends INVITE, but not BYE. How to change it?
Rodrigo Pimenta Carvalho
pimenta at inatel.br
Fri Oct 28 19:37:29 CEST 2016
Hi Răzvan.
The system logs related to the BYE processing is attached.
We have 2 files: One for a short call and another for a long one.
In short call, no issue rises. In long call, the TCP connection is closed by some way and OpenSIPS fails to send the SIP BYE. But, OpenSIPS reopens that connection, as you can see in the log.
Caller = intercomA_5dtUWgwgqzR6
Calle = g1r2u3p4o5
Caller is running in the same hardware as OpenSIPS and is the callee that terminates the call. The broken TCP link is between caller and OpenSIPS.
Thank you very much for any hint.
Best regards!
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Răzvan Crainea <razvan at opensips.org>
Enviado: sexta-feira, 28 de outubro de 2016 06:13
Para: users at lists.opensips.org
Assunto: Re: [OpenSIPS-Users] OpenSIPS reopen TCP connectios and sends INVITE, but not BYE. How to change it?
Hi, Rodrigo!
Could you send me the system logs related to the BYE processing?
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>
Home — OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.
On 10/27/2016 10:09 PM, Rodrigo Pimenta Carvalho wrote:
Hi Razvan,
Thank you very much again!
See my comments and question in line, please.
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.org> <users-bounces at lists.opensips.org><mailto:users-bounces at lists.opensips.org> em nome de Răzvan Crainea <razvan at opensips.org><mailto:razvan at opensips.org>
Enviado: quinta-feira, 27 de outubro de 2016 05:58
Para: users at lists.opensips.org<mailto:users at lists.opensips.org>
Assunto: Re: [OpenSIPS-Users] OpenSIPS reopen TCP connectios and sends INVITE, but not BYE. How to change it?
Hi, Rodrigo!
Having OpenSIPS opening TCP connections towards client is a bit dangerous, especially if the clients are behind NAT. That's because most likely you will not be able to reach them, and opensips will get stuck trying to connect (until it triggers a timeout). That's why the best way to go is to try to keep the connection (ideally opened by the client at REGISTER) as much as possible. This is usually done by pinging (as discussed in a previous email). So my suggestion is to try to avoid opening new TCP connections with clients, unless you really know they will always be reachable.
The client will be always reachable. Because in my specific case, the client(which break down the TCP connection) is in the same hardware as OpenSIPS. So, there will not be NATs here.
As I saw in the log, OpenSIPS reopen the connection, like this:
DBG:core:proto_tcp_send: no open tcp connection found, opening new one, async = 1
And this is opened in the moment after OpenSIPS trying to pass the SIP BYE to the local client.
As long as OpenSIPS is already reopening the TCP connection, when it needs to send the SIP BYE, why the SIP BYE is not sent finally?
I believe that I can use such new connection to send the SIP BYE. In this case, I intend to force OpenSIPS to send the SIP BYE after reopening such TCP connection. Is it possible in terms of script?
I have just checked my script and I'm not using the flag tcp_no_new_conn_bflag.
The behavior you are describing (INVITE vs BYE handling), might be related to the fact that you are setting the tcp_no_new_conn_bflag[1] flag for BYE messages, but not for INVITEs. Is this correct? If not, do you see any errors in the script?
[1] http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc101
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>
Home — 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 is more than a SIP proxy/router as it includes application-level functionalities.
On 10/26/2016 10:59 PM, Rodrigo Pimenta Carvalho wrote:
Hi.
After some log debug I have observed the following behavior in the OpenSISP (2.2.1):
When OpenSIPS has to send a SIP INVITE to a peer through a TCP connection that was closed before by some way, OpenSIPS open a new one and then sends the SIP message to the peer successfully.
However, when OpenSIPS has to send a SIP BYE to a peer through a TCP connection that was closed before, OpenSIPS open a new one, but doesn't send the SIP BYE. In this case SIP BYE is discarded.
How to change the behavior of OpenSIPS to make it to send the SIP BYE is such case?
I'm looking for ways of fix or workaround of a TCP tear down connection that happens during dialogs.
Any hint will be very helpful!
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161028/60c2ea73/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CALLEE_SEND_BYE_LONG_CALL.txt
URL: <http://lists.opensips.org/pipermail/users/attachments/20161028/60c2ea73/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CALLEE_SEND_BYE_SHORT_CALL.txt
URL: <http://lists.opensips.org/pipermail/users/attachments/20161028/60c2ea73/attachment-0003.txt>
More information about the Users
mailing list