[asterisk-commits] kmoore: branch 10 r358116 - in /branches/10: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 5 09:59:50 CST 2012


Author: kmoore
Date: Mon Mar  5 09:59:46 2012
New Revision: 358116

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358116
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
........

Merged revisions 358115 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_sip.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_sip.c?view=diff&rev=358116&r1=358115&r2=358116
==============================================================================
--- branches/10/channels/chan_sip.c (original)
+++ branches/10/channels/chan_sip.c Mon Mar  5 09:59:46 2012
@@ -22974,6 +22974,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 = INV_REQ_FAILED;
@@ -22993,6 +22996,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 = INV_REQ_ERROR;
 			goto request_invite_cleanup;
@@ -23010,6 +23016,9 @@
 			sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 			p->invitestate = INV_COMPLETED;
 			res = INV_REQ_ERROR;
+			p->pendinginvite = seqno;
+			check_via(p, req);
+			copy_request(&p->initreq, req);
 			goto request_invite_cleanup;
 		}
 
@@ -23111,6 +23120,9 @@
 			refer_locked = 0;
 			p->invitestate = INV_COMPLETED;
 			res = INV_REQ_ERROR;
+			p->pendinginvite = seqno;
+			check_via(p, req);
+			copy_request(&p->initreq, req);
 			goto request_invite_cleanup;
 		}
 	}




More information about the asterisk-commits mailing list