aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-01 22:49:07 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-01 22:49:07 +0000
commitdfe075a20495a17de30e986982a98dd763ee5b9d (patch)
treeacf3bfa8800adac5664edc8cf5e6cd5dbfed441f /channels
parente6f7fe5a815ec919c4fd149d7eed50eab4a9eb06 (diff)
Only wipe the redirected audio & video IP/port if it's specified, and trigger a reinvite.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@41768 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index aa6e69a89..7c7552f63 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12937,14 +12937,18 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
if (!p)
return -1;
ast_mutex_lock(&p->lock);
- if (rtp)
+ if (rtp) {
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));
- if (vrtp)
+ changed = 1;
+ }
+ if (vrtp) {
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));
+ changed = 1;
+ }
if (codecs && (p->redircodecs != codecs)) {
p->redircodecs = codecs;
changed = 1;