|
|
@ -12937,14 +12937,18 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
|
|
|
|
if (!p)
|
|
|
|
if (!p)
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
ast_mutex_lock(&p->lock);
|
|
|
|
ast_mutex_lock(&p->lock);
|
|
|
|
if (rtp)
|
|
|
|
if (rtp) {
|
|
|
|
changed |= ast_rtp_get_peer(rtp, &p->redirip);
|
|
|
|
changed |= ast_rtp_get_peer(rtp, &p->redirip);
|
|
|
|
else
|
|
|
|
} else if (p->redirip.sin_addr.s_addr || ntohs(p->redirip.sin_port) != 0) {
|
|
|
|
memset(&p->redirip, 0, sizeof(p->redirip));
|
|
|
|
memset(&p->redirip, 0, sizeof(p->redirip));
|
|
|
|
if (vrtp)
|
|
|
|
changed = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (vrtp) {
|
|
|
|
changed |= ast_rtp_get_peer(vrtp, &p->vredirip);
|
|
|
|
changed |= ast_rtp_get_peer(vrtp, &p->vredirip);
|
|
|
|
else
|
|
|
|
} else if (p->vredirip.sin_addr.s_addr || ntohs(p->vredirip.sin_port) != 0) {
|
|
|
|
memset(&p->vredirip, 0, sizeof(p->vredirip));
|
|
|
|
memset(&p->vredirip, 0, sizeof(p->vredirip));
|
|
|
|
|
|
|
|
changed = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (codecs && (p->redircodecs != codecs)) {
|
|
|
|
if (codecs && (p->redircodecs != codecs)) {
|
|
|
|
p->redircodecs = codecs;
|
|
|
|
p->redircodecs = codecs;
|
|
|
|
changed = 1;
|
|
|
|
changed = 1;
|
|
|
|