[asterisk-bugs] [Asterisk 0015802]: chan_sip will not retransmit an ACK
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Sep 7 01:21:44 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15802
======================================================================
Reported By: nmav
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 15802
Category: Channels/chan_sip/General
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: 1.4.26.1
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-08-31 10:10 CDT
Last Modified: 2009-09-07 01:21 CDT
======================================================================
Summary: chan_sip will not retransmit an ACK
Description:
In commit 204243 it was added a check on whether to retransmit an ACK or
not. In my case this breaks retransmission in the following scenario:
-> INVITE
<- 100 Trying
<- 180 Ringing
<- 200 OK SDP
[ACK is lost]
<- 200 OK SDP
<- 200 OK SDP
======================================================================
----------------------------------------------------------------------
(0110263) astman (reporter) - 2009-09-07 01:21
https://issues.asterisk.org/view.php?id=15802#c110263
----------------------------------------------------------------------
static void __sip_ack(struct sip_pvt *p, int seqno, int resp, int
sipmethod)
{
struct sip_pkt *cur, *prev = NULL;
/* Just in case... */
char *msg;
int res = FALSE;
msg = sip_methods[sipmethod].text;
ast_mutex_lock(&p->lock);
for (cur = p->packets; cur; prev = cur, cur = cur->next) {
if ((cur->seqno == seqno) && ((ast_test_flag(cur, FLAG_RESPONSE)) ==
resp) &&
((ast_test_flag(cur, FLAG_RESPONSE)) ||
(!strncasecmp(msg, cur->data, strlen(msg)) && (cur->data[strlen(msg)]
< 33)))) {
if (!resp && (seqno == p->pendinginvite)) {
if (option_debug)
ast_log(LOG_DEBUG, "Acked pending invite %d\n", p->pendinginvite);
p->pendinginvite = 0;
}
/* this is our baby */
res = TRUE;
UNLINK(cur, p->packets, prev);
if (cur->retransid > -1) {
if (sipdebug && option_debug > 3)
ast_log(LOG_DEBUG, "** SIP TIMER: Cancelling retransmit of packet
(reply received) Retransid #%d\n", cur->retransid);
ast_sched_del(sched, cur->retransid);//HERE,seems no effect
cur->retransid = -1;
}
free(cur);
break;
}
}
ast_mutex_unlock(&p->lock);
if (option_debug)
ast_log(LOG_DEBUG, "Stopping retransmission on '%s' of %s %d: Match
%s\n", p->callid, resp ? "Response" : "Request", seqno, res ? "Not Found" :
"Found");// "Not Found" should placed by "Found"
}
Issue History
Date Modified Username Field Change
======================================================================
2009-09-07 01:21 astman Note Added: 0110263
======================================================================
More information about the asterisk-bugs
mailing list