mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user