]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
rtp_engine: Add type field for JSON RTCP Report stasis messages
authorBoris P. Korzun <drtr0jan@yandex.ru>
Mon, 8 Nov 2021 19:59:02 +0000 (22:59 +0300)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Thu, 18 Nov 2021 23:39:35 +0000 (17:39 -0600)
ASTERISK-29727 #close

Change-Id: I2eca8aeb591cb63ac2238d08eab662367453cb82

main/rtp_engine.c

index f88b877d63ff07e52924787262c0d815b10d0332..b50420ac5ad46fcca4f8b0decd76097d2776feec 100644 (file)
@@ -3455,7 +3455,8 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
                }
        }
 
-       return ast_json_pack("{s: o?, s: o, s: O?}",
+       return ast_json_pack("{s: s, s: o?, s: o, s: O?}",
+               "type", stasis_message_type(msg) == ast_rtp_rtcp_received_type() ? "RTCPReceived" : "RTCPSent",
                "channel", json_channel,
                "rtcp_report", json_rtcp_report,
                "blob", payload->blob);