[sr-dev] git:master:498d7649: rtpengine: add `flags` field for every command

Richard Fuchs rfuchs at sipwise.com
Tue Apr 14 19:15:50 CEST 2020


Module: kamailio
Branch: master
Commit: 498d7649339edfc07f40fe3e37e66376b2817d6c
URL: https://github.com/kamailio/kamailio/commit/498d7649339edfc07f40fe3e37e66376b2817d6c

Author: Richard Fuchs <rfuchs at sipwise.com>
Committer: Richard Fuchs <rfuchs at sipwise.com>
Date: 2020-04-14T13:15:21-04:00

rtpengine: add `flags` field for every command

---

Modified: src/modules/rtpengine/rtpengine.c

---

Diff:  https://github.com/kamailio/kamailio/commit/498d7649339edfc07f40fe3e37e66376b2817d6c.diff
Patch: https://github.com/kamailio/kamailio/commit/498d7649339edfc07f40fe3e37e66376b2817d6c.patch

---

diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 7be7968660..d56e88e003 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -2401,8 +2401,9 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
 	bencode_list_add_string(item, "load limit");
 
 	body.s = NULL;
+	ng_flags.flags = bencode_list(bencbuf);
+
 	if (op == OP_OFFER || op == OP_ANSWER) {
-		ng_flags.flags = bencode_list(bencbuf);
 		ng_flags.direction = bencode_list(bencbuf);
 		ng_flags.replace = bencode_list(bencbuf);
 		ng_flags.rtcp_mux = bencode_list(bencbuf);
@@ -2428,11 +2429,6 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
 		else
 			bencode_dictionary_add_str(ng_flags.dict, "sdp", &body);
 	}
-	else if (op == OP_BLOCK_DTMF || op == OP_BLOCK_MEDIA || op == OP_UNBLOCK_DTMF
-			|| op == OP_UNBLOCK_MEDIA || op == OP_START_FORWARDING || op == OP_STOP_FORWARDING)
-	{
-		ng_flags.flags = bencode_list(bencbuf);
-	}
 
 	/*** parse flags & build dictionary ***/
 




More information about the sr-dev mailing list