Skip to content

Commit

Permalink
rtpengine: add support for all replace options
Browse files Browse the repository at this point in the history
(cherry picked from commit 4f41b09)
  • Loading branch information
razvancrainea committed Nov 25, 2021
1 parent d4eecc5 commit fb82bac
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions modules/rtpengine/rtpengine.c
Expand Up @@ -1843,8 +1843,12 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg,
else if (str_eq(&key, "via-branch-param")) {
ng_flags->via = 4;
ng_flags->viabranch = val;
}
else
} else if (str_eq(&key, "replace-username")) {
if (!ng_flags->replace)
LM_DBG("%.*s not supported for %d op\n", key.len, key.s, *op);
else
BCHECK(bencode_list_add_string(ng_flags->replace, "username"));
} else
break;
continue;

Expand All @@ -1855,12 +1859,27 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg,
break;
continue;

case 19:
if (str_eq(&key, "replace-SDP-version")) {
if (!ng_flags->replace)
LM_DBG("%.*s not supported for %d op\n", key.len, key.s, *op);
else
BCHECK(bencode_list_add_string(ng_flags->replace, "SDP version"));
} else
break;
continue;

case 20:
if (str_eq(&key, "replace-zero-address")) {
if (!ng_flags->replace)
LM_DBG("%.*s not supported for %d op\n", key.len, key.s, *op);
else
BCHECK(bencode_list_add_string(ng_flags->replace, "zero address"));
} else if (str_eq(&key, "replace-session-name")) {
if (!ng_flags->replace)
LM_DBG("%.*s not supported for %d op\n", key.len, key.s, *op);
else
BCHECK(bencode_list_add_string(ng_flags->replace, "session name"));
} else
break;
continue;
Expand Down

0 comments on commit fb82bac

Please sign in to comment.