[sr-dev] git:master:134c6b4b: rtpengine: fix wrong codec action strings being used

Richard Fuchs rfuchs at sipwise.com
Mon Oct 26 19:19:59 CET 2020


Module: kamailio
Branch: master
Commit: 134c6b4b63f8fee3b94e3caed956b080477022d4
URL: https://github.com/kamailio/kamailio/commit/134c6b4b63f8fee3b94e3caed956b080477022d4

Author: Richard Fuchs <rfuchs at sipwise.com>
Committer: Richard Fuchs <rfuchs at sipwise.com>
Date: 2020-10-26T14:19:09-04:00

rtpengine: fix wrong codec action strings being used

---

Modified: src/modules/rtpengine/rtpengine.c

---

Diff:  https://github.com/kamailio/kamailio/commit/134c6b4b63f8fee3b94e3caed956b080477022d4.diff
Patch: https://github.com/kamailio/kamailio/commit/134c6b4b63f8fee3b94e3caed956b080477022d4.patch

---

diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index c3e7e75601..7b2573b246 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -2084,7 +2084,7 @@ static const char *transports[] = {
 };
 
 static int parse_codec_flag(struct ng_flags_parse *ng_flags, const str *key, const str *val,
-		const char *cmp1, const char *cmp2,
+		const char *cmp1, const char *cmp2, const char *dictstr,
 		bencode_item_t **dictp)
 {
 	str s;
@@ -2098,7 +2098,7 @@ static int parse_codec_flag(struct ng_flags_parse *ng_flags, const str *key, con
 
 	if (!*dictp) {
 		*dictp = bencode_list(ng_flags->dict->buffer);
-		bencode_dictionary_add(ng_flags->codec, "transcode",
+		bencode_dictionary_add(ng_flags->codec, dictstr,
 			*dictp);
 	}
 	bencode_list_add_str(*dictp, &s);
@@ -2159,17 +2159,17 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu
 			goto next;
 		}
 
-		if (parse_codec_flag(ng_flags, &key, &val, "transcode", "codec-transcode", &ng_flags->codec_transcode))
+		if (parse_codec_flag(ng_flags, &key, &val, "transcode", "codec-transcode", "transcode", &ng_flags->codec_transcode))
 			goto next;
-		if (parse_codec_flag(ng_flags, &key, &val, "codec-strip", NULL, &ng_flags->codec_strip))
+		if (parse_codec_flag(ng_flags, &key, &val, "codec-strip", NULL, "strip", &ng_flags->codec_strip))
 			goto next;
-		if (parse_codec_flag(ng_flags, &key, &val, "codec-offer", NULL, &ng_flags->codec_offer))
+		if (parse_codec_flag(ng_flags, &key, &val, "codec-offer", NULL, "offer", &ng_flags->codec_offer))
 			goto next;
-		if (parse_codec_flag(ng_flags, &key, &val, "codec-mask", NULL, &ng_flags->codec_mask))
+		if (parse_codec_flag(ng_flags, &key, &val, "codec-mask", NULL, "mask", &ng_flags->codec_mask))
 			goto next;
-		if (parse_codec_flag(ng_flags, &key, &val, "codec-set", NULL, &ng_flags->codec_set))
+		if (parse_codec_flag(ng_flags, &key, &val, "codec-set", NULL, "set", &ng_flags->codec_set))
 			goto next;
-		if (parse_codec_flag(ng_flags, &key, &val, "codec-except", NULL, &ng_flags->codec_except))
+		if (parse_codec_flag(ng_flags, &key, &val, "codec-except", NULL, "except", &ng_flags->codec_except))
 			goto next;
 
 		/* check for specially handled items */




More information about the sr-dev mailing list