aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-03 10:37:32 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-03 10:37:32 +0000
commitdc084955d5fbaa43f349f10f999153dc0601186c (patch)
treec4c5ee211b82f715ee619f5897085576f2a0ea06 /channels
parentd76b2bde7902b2bee69c5a1ca18a94b1ac35c4fa (diff)
Handle ACK and CANCEL in an invite transaction - even if we get INFO transactions during the actual call setup.
(closes issue #10567) Reported by: jacksch Tested by: oej Patch by: oej inspired by suggestions from neutrino88 in the bug tracker git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102090 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ff09964e5..76f00e090 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15178,12 +15178,17 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
if (option_debug > 3)
ast_log(LOG_DEBUG, "**** Received %s (%d) - Command in SIP %s\n", sip_methods[p->method].text, sip_methods[p->method].id, cmd);
- if (p->icseq && (p->icseq > seqno)) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Ignoring too old SIP packet packet %d (expecting >= %d)\n", seqno, p->icseq);
- if (req->method != SIP_ACK)
- transmit_response(p, "503 Server error", req); /* We must respond according to RFC 3261 sec 12.2 */
- return -1;
+ if (p->icseq && (p->icseq > seqno) ) {
+ if (p->pendinginvite && seqno == p->pendinginvite && (req->method == SIP_ACK || req->method == SIP_CANCEL)) {
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Got CANCEL or ACK on INVITE with transactions in between.\n");
+ } else {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Ignoring too old SIP packet packet %d (expecting >= %d)\n", seqno, p->icseq);
+ if (req->method != SIP_ACK)
+ transmit_response(p, "503 Server error", req); /* We must respond according to RFC 3261 sec 12.2 */
+ return -1;
+ }
} else if (p->icseq &&
p->icseq == seqno &&
req->method != SIP_ACK &&