[Asterisk-code-review] res_pjsip_sdp_rtp: Improve detecting of lack of RTP activity (asterisk[16])

Boris P. Korzun asteriskteam at digium.com
Thu Mar 3 10:18:01 CST 2022


Attention is currently required from: Joshua Colp.
Boris P. Korzun has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18071 )

Change subject: res_pjsip_sdp_rtp: Improve detecting of lack of RTP activity
......................................................................


Patch Set 2:

(5 comments)

File res/res_pjsip_sdp_rtp.c:

https://gerrit.asterisk.org/c/asterisk/+/18071/comment/dc1728cb_6b9ca80c 
PS1, Line 124: 	timeout = ast_rtp_instance_get_timeout(rtp);
> timeout doesn't need to be retrieved until it is actually used, after the AST_STATE_UP and direct me […]
timeout is used twice later
Please explain, how to do it better?


https://gerrit.asterisk.org/c/asterisk/+/18071/comment/b94d20c0_f8eb0e27 
PS1, Line 126: 	/* If the channel is not in UP state return for later check. */
> Multi-line comments use: […]
Done


https://gerrit.asterisk.org/c/asterisk/+/18071/comment/6f8db96c_d1b5f6d8 
PS1, Line 129: 		ast_rtp_instance_set_last_rx(rtp, now);
> Add a comment of why this is being done
Done


https://gerrit.asterisk.org/c/asterisk/+/18071/comment/255f0795_2d99cf87 
PS1, Line 131: 		return timeout * 500; /* recheck after half timeout */
> Why a half timeout?
Avoiding possible races and faster reacting to cases while there is no a RTP at all.


https://gerrit.asterisk.org/c/asterisk/+/18071/comment/d78cbd3d_a5f31305 
PS1, Line 2145: 		session_media->timeout_sched_id = ast_sched_add_variable(sched,	500, rtp_check_timeout,
> Why the change here?
For avoiding code duplication and planning next timeout check in the function, instead apply_negotiated_sdp_stream().



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18071
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I07326d5b9c40f25db717fd6075f6f3a8d77279eb
Gerrit-Change-Number: 18071
Gerrit-PatchSet: 2
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Thu, 03 Mar 2022 16:18:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220303/3379f5f9/attachment.html>


More information about the asterisk-code-review mailing list