[asterisk-dev] [Code Review]: Lightweight NAT Support
Joshua Colp
reviewboard at asterisk.org
Tue Feb 21 08:01:41 CST 2012
> On Feb. 21, 2012, 7:56 a.m., schmidts wrote:
> > there are two basically problems i have with this patch.
> > 1.) sending out keep alive messages on a sip reload will do this for all peers at once and imho this will happens everytime the keep alive timer fires. its basically the same problem for poke_peers but the scheduled time for repoking is spread and not just the same time interval. In a scenario with many peers this could even slow down the do_monitor thread cause of the big bunch of schedules to run in a very short amount of time.
> >
> > 2.) the string which will be sent to the peer should be also configurable cause i know atleast one router which ignores keep alive with a CRLF and still close the port but this could also be solved by using normal qualify instead.
1) Unlike a qualify this doesn't create a dialog, do any SIP message creation, none of that. The scheduled function should run pretty darn quick and won't block nowhere near as long. I suspect even without spreading them out this could handle quite a few, but I can also spread it out.
2) Out of curiosity - what string would you use instead?
- Joshua
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1756/#review5562
-----------------------------------------------------------
On Feb. 21, 2012, 7:26 a.m., Joshua Colp wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1756/
> -----------------------------------------------------------
>
> (Updated Feb. 21, 2012, 7:26 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This patch implements extremely lightweight NAT support, specifically sending a CRLF at a defined interval to keep the NAT mapping open. It does not use this mechanism to determine if the remote server is available or not, that is the trade off.
>
>
> Diffs
> -----
>
> /trunk/channels/chan_sip.c 355996
> /trunk/channels/sip/include/sip.h 355996
> /trunk/configs/sip.conf.sample 355996
>
> Diff: https://reviewboard.asterisk.org/r/1756/diff
>
>
> Testing
> -------
>
> Confirmed packet is sent at default interval as well as configured interval. Also wrote testsuite test which will be in another review.
>
>
> Thanks,
>
> Joshua
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120221/a0dde95e/attachment.htm>
More information about the asterisk-dev
mailing list