summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2018-03-28 12:27:31 +0000
committerJoshua Colp <jcolp@digium.com>2018-04-06 08:36:54 -0600
commitc7bd5540949cfd701550c43cdefaf3080a27a8b9 (patch)
tree0e5f87ffebc83dc0282b326186c23e64b93abb6b /channels
parent72a8e2106ea4f611a755da1a9c20f7bced300cce (diff)
pjsip / res_rtp_asterisk: Add support for sending REMB
This change allows chan_pjsip to be given an AST_FRAME_RTCP containing REMB feedback and pass it to res_rtp_asterisk. Once res_rtp_asterisk receives the frame a REMB RTCP feedback packet is constructed with the appropriate contents and sent to the remote endpoint. ASTERISK-27776 Change-Id: Ic53f821c1560d8924907ad82c4d9c0bc322b38cd
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_pjsip.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 5cb52a5b2..6b2664819 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -966,6 +966,16 @@ static int chan_pjsip_write_stream(struct ast_channel *ast, int stream_num, stru
case AST_FRAME_CNG:
break;
case AST_FRAME_RTCP:
+ /* We only support writing out feedback */
+ if (frame->subclass.integer != AST_RTP_RTCP_PSFB || !media) {
+ return 0;
+ } else if (media->type != AST_MEDIA_TYPE_VIDEO) {
+ ast_debug(3, "Channel %s stream %d is of type '%s', not video! Unable to write RTCP feedback.\n",
+ ast_channel_name(ast), stream_num, ast_codec_media_type2str(media->type));
+ return 0;
+ } else if (media->write_callback) {
+ res = media->write_callback(session, media, frame);
+ }
break;
default:
ast_log(LOG_WARNING, "Can't send %u type frames with PJSIP\n", frame->frametype);