[Asterisk-code-review] res_pjsip_sdp_rtp.c: Support keepalive for video streams. (asterisk[16])
Joshua Colp
asteriskteam at digium.com
Thu Jan 20 11:30:44 CST 2022
Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/17911 )
Change subject: res_pjsip_sdp_rtp.c: Support keepalive for video streams.
......................................................................
res_pjsip_sdp_rtp.c: Support keepalive for video streams.
ASTERISK-28890 #close
Change-Id: Iad269a8dc36f892ede90fe8ceb3010560c0f70d1
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
Kevin Harwell: Looks good to me, approved
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 8630a67..c62fa6f 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -2089,7 +2089,7 @@
ast_rtp_instance_activate(session_media->rtp);
/* audio stream handles music on hold */
- if (media_type != AST_MEDIA_TYPE_AUDIO) {
+ if (media_type != AST_MEDIA_TYPE_AUDIO && media_type != AST_MEDIA_TYPE_VIDEO) {
if ((pjmedia_sdp_neg_was_answer_remote(session->inv_session->neg) == PJ_FALSE)
&& (session->inv_session->state == PJSIP_INV_STATE_CONFIRMED)) {
ast_queue_control(session->channel, AST_CONTROL_UPDATE_RTP_PEER);
@@ -2121,7 +2121,8 @@
session_media->encryption = session->endpoint->media.rtp.encryption;
if (session->endpoint->media.rtp.keepalive > 0 &&
- session_media->type == AST_MEDIA_TYPE_AUDIO) {
+ (session_media->type == AST_MEDIA_TYPE_AUDIO ||
+ session_media->type == AST_MEDIA_TYPE_VIDEO)) {
ast_rtp_instance_set_keepalive(session_media->rtp, session->endpoint->media.rtp.keepalive);
/* Schedule the initial keepalive early in case this is being used to punch holes through
* a NAT. This way there won't be an awkward delay before media starts flowing in some
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17911
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Iad269a8dc36f892ede90fe8ceb3010560c0f70d1
Gerrit-Change-Number: 17911
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220120/a8eb6aae/attachment.html>
More information about the asterisk-code-review
mailing list