diff options
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 42894d3bc..d5483cb30 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -17863,14 +17863,16 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc memset(&p->tredirip, 0, sizeof(p->tredirip)); changed = 1; } - if (codecs && (p->redircodecs != codecs)) { - p->redircodecs = codecs; - changed = 1; - } - if ((p->capability & codecs) != p->capability) { - p->jointcapability &= codecs; - p->capability &= codecs; - changed = 1; + if (codecs) { + if ((p->redircodecs != codecs)) { + p->redircodecs = codecs; + changed = 1; + } + if ((p->capability & codecs) != p->capability) { + p->jointcapability &= codecs; + p->capability &= codecs; + changed = 1; + } } if (changed && !ast_test_flag(&p->flags[0], SIP_GOTREFER)) { if (chan->_state != AST_STATE_UP) { /* We are in early state */ |