aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c5
-rw-r--r--main/rtp.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index b1358175a..3bc29bb75 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18559,11 +18559,8 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
changed = 1;
}
if (codecs) {
- if ((p->redircodecs != codecs)) {
+ if (p->redircodecs != codecs && (p->jointcapability & codecs) != p->jointcapability) {
p->redircodecs = codecs;
- changed = 1;
- }
- if ((p->capability & codecs) != p->capability) {
p->jointcapability &= codecs;
p->capability &= codecs;
changed = 1;
diff --git a/main/rtp.c b/main/rtp.c
index de4ab9a2f..4250661d3 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -3019,7 +3019,8 @@ static enum ast_bridge_result bridge_native_loop(struct ast_channel *c0, struct
oldcodec1 = codec1;
}
if ((inaddrcmp(&t0, &ac0)) ||
- (vp0 && inaddrcmp(&vt0, &vac0))) {
+ (vp0 && inaddrcmp(&vt0, &vac0)) ||
+ (codec0 != oldcodec0)) {
if (option_debug > 1) {
ast_log(LOG_DEBUG, "Oooh, '%s' changed end address to %s:%d (format %d)\n",
c0->name, ast_inet_ntoa(t0.sin_addr), ntohs(t0.sin_port), codec0);