mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 03:07:59 +00:00
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) Reported by: Jon Tsiros Patches: fix-19303.patch uploaded by Jeremiah Gowdy (license 6358) ........ Merged revisions 358115 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358116 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -23194,6 +23194,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
transmit_response_reliable(p, "491 Request Pending", req);
|
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);
|
ast_debug(1, "Got INVITE on call where we already have pending INVITE, deferring that - %s\n", p->callid);
|
||||||
/* Don't destroy dialog here */
|
/* Don't destroy dialog here */
|
||||||
res = INV_REQ_FAILED;
|
res = INV_REQ_FAILED;
|
||||||
@@ -23213,6 +23216,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
|
|||||||
if (p->owner) {
|
if (p->owner) {
|
||||||
ast_debug(3, "INVITE w Replaces on existing call? Refusing action. [%s]\n", p->callid);
|
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 */
|
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 */
|
/* Do not destroy existing call */
|
||||||
res = INV_REQ_ERROR;
|
res = INV_REQ_ERROR;
|
||||||
goto request_invite_cleanup;
|
goto request_invite_cleanup;
|
||||||
@@ -23230,6 +23236,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
|
|||||||
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
|
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
|
||||||
p->invitestate = INV_COMPLETED;
|
p->invitestate = INV_COMPLETED;
|
||||||
res = INV_REQ_ERROR;
|
res = INV_REQ_ERROR;
|
||||||
|
p->pendinginvite = seqno;
|
||||||
|
check_via(p, req);
|
||||||
|
copy_request(&p->initreq, req);
|
||||||
goto request_invite_cleanup;
|
goto request_invite_cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23331,6 +23340,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
|
|||||||
refer_locked = 0;
|
refer_locked = 0;
|
||||||
p->invitestate = INV_COMPLETED;
|
p->invitestate = INV_COMPLETED;
|
||||||
res = INV_REQ_ERROR;
|
res = INV_REQ_ERROR;
|
||||||
|
p->pendinginvite = seqno;
|
||||||
|
check_via(p, req);
|
||||||
|
copy_request(&p->initreq, req);
|
||||||
goto request_invite_cleanup;
|
goto request_invite_cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user