[asterisk-commits] kmoore: branch 1.8 r358115 - /branches/1.8/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 5 09:54:16 CST 2012
Author: kmoore
Date: Mon Mar 5 09:54:12 2012
New Revision: 358115
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358115
Log:
Ensure Asterisk acknowledges ACKs to 4xx on Replaces errors
Asterisk was not setting pendinginvite in the upper half of
handle_request_invite such that the 4xx was retransmitted repeatedly even
though an ack was received for every retransmission.
(closes issue ASTERISK-19303)
Patch-by: Jeremiah Gowdy
Modified:
branches/1.8/channels/chan_sip.c
Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=358115&r1=358114&r2=358115
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Mon Mar 5 09:54:12 2012
@@ -22304,6 +22304,9 @@
}
}
transmit_response_reliable(p, "491 Request Pending", req);
+ p->pendinginvite = seqno;
+ check_via(p, req);
+ copy_request(&p->initreq, req);
ast_debug(1, "Got INVITE on call where we already have pending INVITE, deferring that - %s\n", p->callid);
/* Don't destroy dialog here */
res = 0;
@@ -22323,6 +22326,9 @@
if (p->owner) {
ast_debug(3, "INVITE w Replaces on existing call? Refusing action. [%s]\n", p->callid);
transmit_response_reliable(p, "400 Bad request", req); /* The best way to not not accept the transfer */
+ p->pendinginvite = seqno;
+ check_via(p, req);
+ copy_request(&p->initreq, req);
/* Do not destroy existing call */
res = -1;
goto request_invite_cleanup;
@@ -22339,6 +22345,9 @@
append_history(p, "Xfer", "INVITE/Replace Failed. Out of memory.");
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
p->invitestate = INV_COMPLETED;
+ p->pendinginvite = seqno;
+ check_via(p, req);
+ copy_request(&p->initreq, req);
res = -1;
goto request_invite_cleanup;
}
@@ -22440,6 +22449,9 @@
}
refer_locked = 0;
p->invitestate = INV_COMPLETED;
+ p->pendinginvite = seqno;
+ check_via(p, req);
+ copy_request(&p->initreq, req);
res = -1;
goto request_invite_cleanup;
}
More information about the asterisk-commits
mailing list