[Asterisk-cvs] asterisk/channels chan_sip.c,1.209,1.210
markster at lists.digium.com
markster at lists.digium.com
Tue Nov 11 17:47:41 CST 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv11432/channels
Modified Files:
chan_sip.c
Log Message:
Don't reinvite if we got a refer
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -d -r1.209 -r1.210
--- chan_sip.c 11 Nov 2003 20:46:41 -0000 1.209
+++ chan_sip.c 12 Nov 2003 00:13:55 -0000 1.210
@@ -240,6 +240,7 @@
int amaflags; /* AMA Flags */
int pendinginvite; /* Any pending invite */
int pendingbye; /* Need to send bye after we ack? */
+ int gotrefer; /* Got a refer? */
struct sip_request initreq; /* Initial request */
int maxtime; /* Max time for first response */
@@ -5123,6 +5124,7 @@
attempt_transfer(p, p->refer_call);
ast_mutex_unlock(&p->refer_call->lock);
p->refer_call = NULL;
+ p->gotrefer = 1;
} else {
ast_log(LOG_DEBUG,"202 Accepted (blind)\n");
c = p->owner;
@@ -5133,6 +5135,7 @@
ast_async_goto(transfer_to,p->context, p->refer_to,1, 1);
}
}
+ p->gotrefer = 1;
}
/* Always increment on a BYE */
transmit_request_with_auth(p, "BYE", 0, 1);
@@ -6231,8 +6234,10 @@
ast_rtp_get_peer(vrtp, &p->vredirip);
else
memset(&p->vredirip, 0, sizeof(p->vredirip));
- transmit_reinvite_with_sdp(p, rtp, vrtp);
- p->outgoing = 1;
+ if (!p->gotrefer) {
+ transmit_reinvite_with_sdp(p, rtp, vrtp);
+ p->outgoing = 1;
+ }
return 0;
}
return -1;
More information about the svn-commits
mailing list