[asterisk-bugs] [JIRA] (ASTERISK-29276) Asterisk STUN implementation causes delay and doed not work in all network topologies.
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Feb 3 02:26:01 CST 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253695#comment-253695 ]
Asterisk Team commented on ASTERISK-29276:
------------------------------------------
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].
> Asterisk STUN implementation causes delay and doed not work in all network topologies.
> --------------------------------------------------------------------------------------
>
> Key: ASTERISK-29276
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29276
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Resources/res_rtp_asterisk
> Affects Versions: 16.16.0
> Reporter: Chris
> Severity: Major
>
> Despite of the documentation here https://wiki.asterisk.org/wiki/display/~jcolp/ICE,+STUN,+and+TURN+Support Asterisk does *not* implement this RFC rfc5389. Id rather implements RFC https://tools.ietf.org/html/rfc3489 which is known for it's design flaws.
> {quote}
> However, experience since the publication
> of RFC 3489 has found that classic STUN simply does not work
> sufficiently well to be a deployable solution. The address and port
> learned through classic STUN are sometimes usable for communications
> with a peer, and sometimes not. Classic STUN provided no way to
> discover whether it would, in fact, work or not, and it provided no
> remedy in cases where it did not. Furthermore, classic STUN's
> algorithm for classification of NAT types was found to be faulty, as
> many NATs did not fit cleanly into the types defined there.
> {quote}
> The current rfc3489 implementation in stun.c also has serious flaws. E.g. it always waits for 3 seconds before doing a retry.
> This means, if the UDP packet is dropped, you immediately have a delay of 3 seconds before the call starts.
> {quote}
> /* Wait for response. */
> {
> struct pollfd pfds = { .fd = s, .events = POLLIN };
> int ms;
> //** Reduce to < 200MS
> ms = ast_remaining_ms(start, 3000);
> if (ms <= 0) {
> /* No response, timeout */
> res = 1;
> continue;
> }
> res = ast_poll(&pfds, 1, ms);
> if (res < 0) {
> /* Error */
> continue;
> }
> if (!res) {
> /* No response, timeout */
> res = 1;
> continue;
> }
> }
> {quote}
> What should be improved :
> - Implement RFC rfc5389 or use 3rd party STUN library (pjsip ?)
> - Improve wait-loop in stun.c
> - Update the docs reflecting correct RFC
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list