Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by configuration, , before dialog timout?

2016-11-11 Thread Rodrigo Pimenta Carvalho
Hi Rasvan Crainea.


Thank you very much for the reply!

You gave me new points to  be checked and understood.

I will work for a while in such points and then I will give you a feedback.

So, wait for my next post, please.


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



De: users-boun...@lists.opensips.org <users-boun...@lists.opensips.org> em nome 
de Răzvan Crainea <raz...@opensips.org>
Enviado: sexta-feira, 11 de novembro de 2016 11:30
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by 
configuration, , before dialog timout?

Hi, Rodrigo!

Sorry, I've just seen the message, I've missed it earlier.

As far as I understand, OpenSIPS is listening on two interfaces: 127.0.01:5060 
and 192.168.0.101:5060. Is the UPDATE coming on the same TCP connection as the 
initial one? Or the client opens a new connection for it, over the PUBLIC 
interface? Could you send over (privately) a PCAP trace?
Also, you'd probably need to make sure that you call fix_nated_contact() and 
force_rport() on the UPDATE request. Also, are you setting the 
tcp_accept_aliases[1] or force_tcp_alias()[2] in your script?

[1] http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc95
[2] 
http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#force_tcp_alias

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 11/10/2016 09:59 PM, Rodrigo Pimenta Carvalho wrote:

Hi Razvan.


I answered your questions yesterday.


I'm not sure if you saw my message.


Best regards.




RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



De: users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org> 
<users-boun...@lists.opensips.org><mailto:users-boun...@lists.opensips.org> em 
nome de Răzvan Crainea <raz...@opensips.org><mailto:raz...@opensips.org>
Enviado: quarta-feira, 9 de novembro de 2016 08:29
Para: users@lists.opensips.org<mailto:users@lists.opensips.org>
Assunto: Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by 
configuration, , before dialog timout?

Hi, Rodrigo!

The only HACK that I can think of is when you get the BYE message, set the 
dialog timeout to 0, match it against the dialog, and then drop the message. 
OpenSIPS will behave as if the dialog expired in that moment.

However, you seem to have a flow logic - most likely the Contact header in the 
BYE is not correct. Could you send  us a trace to help you figure out what the 
problem is? Also, did you try to validate the message against the dialog[1] and 
fix it accordingly[2]?

[1] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295894
[2] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295982

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<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 11/08/2016 10:07 PM, Rodrigo Pimenta Carvalho wrote:

Hi.


Dialogs in my OpenSIPS is programmed to finish after 60 seconds. (timeout = 1 
minute).

So, when 2 peers are in a dialog, OpenSIPS sends SIP BYE to both peers, 
automatically after 60 seconds.


Is it possible to make OpenSIPS send this exact kind of SIP BYE to both peers, 
before the dialog timeout? I mean, in a configured way (opensips.cfg)?


When OpenSISP sends SIP BYE automatically, both peers receive the SIP BYE 
correctly.

However, when a peer sends SIP BYE, it reaches the OpenSIPS, but OpenSIPS is 
unable to forward this SIP BYE. Due to some unknown reason, in this moment 
there is no open socket to communicate with such peer. That is why I would like 
to make OpenSIPS send 'its own' SIP BYE, and see if such idea will simulate a 
normal situation, until I discover why there is a socket problem.


Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



___
Users mailing list
Users@lists.opensips.org<mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org<mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-

Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by configuration, , before dialog timout?

2016-11-11 Thread Răzvan Crainea

Hi, Rodrigo!

Sorry, I've just seen the message, I've missed it earlier.

As far as I understand, OpenSIPS is listening on two interfaces: 
127.0.01:5060 and 192.168.0.101:5060. Is the UPDATE coming on the same 
TCP connection as the initial one? Or the client opens a new connection 
for it, over the PUBLIC interface? Could you send over (privately) a 
PCAP trace?
Also, you'd probably need to make sure that you call fix_nated_contact() 
and force_rport() on the UPDATE request. Also, are you setting the 
tcp_accept_aliases[1] or force_tcp_alias()[2] in your script?


[1] http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc95
[2] 
http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#force_tcp_alias


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 11/10/2016 09:59 PM, Rodrigo Pimenta Carvalho wrote:


Hi Razvan.


I answered your questions yesterday.


I'm not sure if you saw my message.


Best regards.




RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



*De:* users-boun...@lists.opensips.org 
<users-boun...@lists.opensips.org> em nome de Răzvan Crainea 
<raz...@opensips.org>

*Enviado:* quarta-feira, 9 de novembro de 2016 08:29
*Para:* users@lists.opensips.org
*Assunto:* Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by 
configuration, , before dialog timout?

Hi, Rodrigo!

The only HACK that I can think of is when you get the BYE message, set 
the dialog timeout to 0, match it against the dialog, and then drop 
the message. OpenSIPS will behave as if the dialog expired in that moment.


However, you seem to have a flow logic - most likely the Contact 
header in the BYE is not correct. Could you send us a trace to help 
you figure out what the problem is? Also, did you try to validate the 
message against the dialog[1] and fix it accordingly[2]?


[1] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295894
[2] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295982

Best regards,
Răzvan Crainea
OpenSIPS Solutions
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 11/08/2016 10:07 PM, Rodrigo Pimenta Carvalho wrote:


Hi.


Dialogs in my OpenSIPS is programmed to finish after 60 seconds. 
(timeout = 1 minute).


So, when 2 peers are in a dialog, OpenSIPS sends SIP BYE to both 
peers, automatically after 60 seconds.



Is it possible to make OpenSIPS send this exact kind of SIP BYE to 
both peers, before the dialog timeout? I mean, in a configured way 
(opensips.cfg)?



When OpenSISP sends SIP BYE automatically, both peers receive the SIP 
BYE correctly.


However, when a peer sends SIP BYE, it reaches the OpenSIPS, but 
OpenSIPS is unable to forward this SIP BYE. Due to some unknown 
reason, in this moment there is no open socket to communicate with 
such peer. That is why I would like to make OpenSIPS send 'its own' 
SIP BYE, and see if such idea will simulate a normal situation, until 
I discover why there is a socket problem.



Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by configuration, , before dialog timout?

2016-11-09 Thread Rodrigo Pimenta Carvalho

Hi. Răzvan.

Thanks to your support, I have found the issue, after some weeks of tests! Now 
I need to discover how to fix it or a workaround.

The problem is:


Peer A and peer B is connected to the OpenSIPS (OpenSIPS is behind a NAT with 
public IP = 111.111.240.71). A is in the same hardware as OpenSIPs and B is in 
another machine. So, OpenSIPs has:

Connection A ::  ID=1 Type=tcp State=0 Source=127.0.0.1:32908 
Destination=127.0.0.1:5060 Lifetime=1970-01-02 05:26:31
Connection B ::  ID=2 Type=tcp State=0 Source=111.111.240.71:55229 
Destination=192.168.0.101:5060 Lifetime=1970-01-02 05:29:50

When A calls B, the 'contact' in SIP INVITE has Source=127.0.0.1:3290.
When B answers with SIP OK, A sends a SIP UPDATE. This UPDATE has a 'contact' 
with a new value: Source=111.111.240.71:57186. So, OpenSIPS has:

Connection A'::  ID=1 Type=tcp State=0 Source=127.0.0.1:32908 
Destination=127.0.0.1:5060 Lifetime=1970-01-02 05:33:43
Connection B::  ID=2 Type=tcp State=0 Source=111.111.240.71:55229 
Destination=192.168.0.101:5060 Lifetime=1970-01-02 05:29:51
Connection A"::  ID=3 Type=tcp State=0 Source=111.111.240.71:57186 
Destination=192.168.0.101:5060 Lifetime=1970-01-02 05:29:51 (new socket to A)

However, the new socket between A and OpenSIPS expires in 30 seconds.
Then, when B sends SIP BYE, OpenSIPS tries to forward such SIP message to 
Source=111.111.240.71:57186, which is expired.

Peer A and B use ICE.
I would like to fix this issue by means of the OpenSIPS script, to avoid 
changing the client's code.
Could you suggest me some idea?

Any hint will be very helpful!
Best regards.

P.S.: I'm using validate_dialog, but not fix_route_dialog() yet. Could this las 
function be the solution?



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



De: users-boun...@lists.opensips.org <users-boun...@lists.opensips.org> em nome 
de Răzvan Crainea <raz...@opensips.org>
Enviado: quarta-feira, 9 de novembro de 2016 08:29
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by 
configuration, , before dialog timout?

Hi, Rodrigo!

The only HACK that I can think of is when you get the BYE message, set the 
dialog timeout to 0, match it against the dialog, and then drop the message. 
OpenSIPS will behave as if the dialog expired in that moment.

However, you seem to have a flow logic - most likely the Contact header in the 
BYE is not correct. Could you send  us a trace to help you figure out what the 
problem is? Also, did you try to validate the message against the dialog[1] and 
fix it accordingly[2]?

[1] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295894
[2] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295982

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 11/08/2016 10:07 PM, Rodrigo Pimenta Carvalho wrote:

Hi.


Dialogs in my OpenSIPS is programmed to finish after 60 seconds. (timeout = 1 
minute).

So, when 2 peers are in a dialog, OpenSIPS sends SIP BYE to both peers, 
automatically after 60 seconds.


Is it possible to make OpenSIPS send this exact kind of SIP BYE to both peers, 
before the dialog timeout? I mean, in a configured way (opensips.cfg)?


When OpenSISP sends SIP BYE automatically, both peers receive the SIP BYE 
correctly.

However, when a peer sends SIP BYE, it reaches the OpenSIPS, but OpenSIPS is 
unable to forward this SIP BYE. Due to some unknown reason, in this moment 
there is no open socket to communicate with such peer. That is why I would like 
to make OpenSIPS send 'its own' SIP BYE, and see if such idea will simulate a 
normal situation, until I discover why there is a socket problem.


Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



___
Users mailing list
Users@lists.opensips.org<mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by configuration, , before dialog timout?

2016-11-09 Thread Răzvan Crainea

Hi, Rodrigo!

The only HACK that I can think of is when you get the BYE message, set 
the dialog timeout to 0, match it against the dialog, and then drop the 
message. OpenSIPS will behave as if the dialog expired in that moment.


However, you seem to have a flow logic - most likely the Contact header 
in the BYE is not correct. Could you send  us a trace to help you figure 
out what the problem is? Also, did you try to validate the message 
against the dialog[1] and fix it accordingly[2]?


[1] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295894
[2] http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295982

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 11/08/2016 10:07 PM, Rodrigo Pimenta Carvalho wrote:


Hi.


Dialogs in my OpenSIPS is programmed to finish after 60 seconds. 
(timeout = 1 minute).


So, when 2 peers are in a dialog, OpenSIPS sends SIP BYE to both 
peers, automatically after 60 seconds.



Is it possible to make OpenSIPS send this exact kind of SIP BYE to 
both peers, before the dialog timeout? I mean, in a configured way 
(opensips.cfg)?



When OpenSISP sends SIP BYE automatically, both peers receive the SIP 
BYE correctly.


However, when a peer sends SIP BYE, it reaches the OpenSIPS, but 
OpenSIPS is unable to forward this SIP BYE. Due to some unknown 
reason, in this moment there is no open socket to communicate with 
such peer. That is why I would like to make OpenSIPS send 'its own' 
SIP BYE, and see if such idea will simulate a normal situation, until 
I discover why there is a socket problem.



Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by configuration, , before dialog timout?

2016-11-08 Thread Rodrigo Pimenta Carvalho
Hi.


Dialogs in my OpenSIPS is programmed to finish after 60 seconds. (timeout = 1 
minute).

So, when 2 peers are in a dialog, OpenSIPS sends SIP BYE to both peers, 
automatically after 60 seconds.


Is it possible to make OpenSIPS send this exact kind of SIP BYE to both peers, 
before the dialog timeout? I mean, in a configured way (opensips.cfg)?


When OpenSISP sends SIP BYE automatically, both peers receive the SIP BYE 
correctly.

However, when a peer sends SIP BYE, it reaches the OpenSIPS, but OpenSIPS is 
unable to forward this SIP BYE. Due to some unknown reason, in this moment 
there is no open socket to communicate with such peer. That is why I would like 
to make OpenSIPS send 'its own' SIP BYE, and see if such idea will simulate a 
normal situation, until I discover why there is a socket problem.


Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users