Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-13 Thread Bogdan Andrei IANCU
Hi, @saghul , @aerringer is indeed right - I wasn;t paying too much attached to the inners of the timer routing. But starting with 2.1, there is no such concept as timer process. The timer routines are executed in any (ballanced) opensips process (worker). So using static vars between the

Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-13 Thread Saúl Ibarra Corretgé
Hey @bogdan-iancu, thanks for chiming in :-) > that may simplify your patch a lot - the nat_helper timer routing is > registered with "TIMER_FLAG_DELAY_ON_DELAY" - this guarantees that (even > executed in various processes) the handler will not be run in parallel (all > its executions will be

Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-13 Thread Bogdan Andrei IANCU
@saghul , I push a fix based on what we discussed above. This will obsolete the original PR. @aerringer many thanks for spotting the problem and coming up with the solution - I think it was a good discussion and outcome ! --- Reply to this email directly or view it on GitHub:

Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-13 Thread Bogdan Andrei IANCU
Closed #751. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/pull/751#event-513611708___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-12 Thread Saúl Ibarra Corretgé
Hi, thanks for the patch! Can you please elaborate / link some documentation on why this is needed? According to the [development guide](http://www.opensips.org/Documentation/Development-Manual#toc23) `register_timer` works on some "global timer process" which doesn't appear to be the case

Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-12 Thread aerringer
Saúl, I see that each process registers a timer. I would expect to see that the timer would fire in each process once per interval. What I see is that once per second the timer callback to keepalive_timer is called on just one process at a time. A second later it's called on another process.

[OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)

2016-01-11 Thread aerringer
Earlier, one process handled nat_traversal timeouts, so static iteration counter correctly distributed keepalives across timeout interval. Now timeouts are sent to various processes, each of which had its own counter, resulting in erratic keepalive delivery. Fix moves the iteration counter into