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
This commit is contained in:
Joshua Colp
2018-03-28 12:27:31 +00:00
parent 72a8e2106e
commit c7bd554094
2 changed files with 103 additions and 36 deletions

View File

@@ -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);