Skip to content

Commit

Permalink
rtpengine: add support for all replace options
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Nov 25, 2021
1 parent 83e0bf6 commit 4f41b09
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions modules/rtpengine/rtpengine.c
Expand Up @@ -1798,6 +1798,7 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg,
continue;
} else if (str_eq(&key, "directional")) {
ng_flags->directional = 1;
continue;
}
break;

Expand Down Expand Up @@ -1876,8 +1877,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 @@ -1888,12 +1893,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 4f41b09

Please sign in to comment.