[Home]

Summary:ASTERISK-28420: In WebRTC video call scenario, packet loss lead to frozen video。
Reporter:Aaron An (aaron)Labels:webrtc
Date Opened:2019-05-20 07:20:31Date Closed:2019-06-04 12:00:02
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_srtp
Versions:16.3.0 Frequency of
Occurrence
Related
Issues:
Environment:CentOS 7.5 Attachments:
Description:In WebRTC video call scenario, calls from Chrome to asterisk. When network is pool, asterisk reports warnings like "SRTP unprotect failed" "SRTP try to re-create" and then the video is frozen, the same time asterisk console report "SRTCP unprotect failed on SSRC xxx" every 1-2 seconds until the call ended. I have investigated this issue for several days and find that there is something wrong with the srtp re-create process. The srtp->policy is store in the hash buckets which is initialized with 5.  This should change from 5 to 1 to avoid indeterminacy policy order when re-create the srtp session。

in res_srtp.c function res_srtp_new()
srtp->policies = ao2_t_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0, 5,
policy_hash_fn, NULL, policy_cmp_fn, "SRTP policy container");
Comments:By: Asterisk Team (asteriskteam) 2019-05-20 07:20:32.768-0500

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.

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.

By: Benjamin Keith Ford (bford) 2019-05-20 11:38:11.373-0500

What are you referring to with "network is pool"? What version of libsrtp are you running? Are you using Cyber Mega Phone? Is it a standard video call? How many endpoints are in the call?

By: Aaron An (aaron) 2019-05-20 20:09:46.191-0500

network pool means packet loss and SEQ error.
libsrtp v2.2.0 and v1.5.4 have the same issue.
I use the sipjs in chrome.
Yes, standard video call, just peerA dial peerB, both peerA and peerB are webrtc endpoint.
Only 2 endpoints

By: Benjamin Keith Ford (bford) 2019-05-21 09:32:28.425-0500

I'm not sure changing the policy count is a solution here. We do checks for the policy within the code as well. I'm guessing when the video experiences a freeze, it never recovers? It remains frozen? It would be worthwhile to look at some debug from Chrome too. You can look at "chrome://webrtc-internals" for graphs that will show packets being lost, received, and things of that nature, and if you start Chrome from the terminal with debug on [1], you can gather some other useful information as well. You may want to pipe the output to a file, it spits out a lot of information!

[1]: https://gist.github.com/ibc/3a10b27812d99c8abd1b

By: Asterisk Team (asteriskteam) 2019-06-04 12:00:02.067-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines