[Asterisk-code-review] chan_sip: chan_sip does not process 400 response to an INVITE. (asterisk[13])

Friendly Automation asteriskteam at digium.com
Thu Jun 25 09:15:48 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14598 )

Change subject: chan_sip: chan_sip does not process 400 response to an INVITE.
......................................................................

chan_sip: chan_sip does not process 400 response to an INVITE.

chan_sip handle_response() function, for a 400 response to an INVITE,
calls handle_response_invite() and does not generate ACK.
handle_response_invite() does not recognize 400 response and has no
default response processing for unexpected responses, thus it does not
generate ACK either.
The ACK on response repetition comes from handle_response() mechanism
"We must re-send ACKs to re-transmitted final responses".

According to code history, 400 response specific processing was
introduced with commit
"channels/chan_sip: Add improved support for 4xx error codes"
This commit added support for :
- 400/414/493 in handle_response_subscribe() handle_response_register()
  and handle_response().
- 414/493 only in handle_response_invite().

This fix adds 400 response support in handle_response_invite().

ASTERISK-28957

Change-Id: Ic71a087e5398dfc7273946b9ec6f9a36960218ad
---
M channels/chan_sip.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index edb08e9..c67081c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -24194,6 +24194,7 @@
 		}
 		break;
 
+	case 400: /* Bad Request */
 	case 414: /* Bad request URI */
 	case 493: /* Undecipherable */
 	case 404: /* Not found */

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14598
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ic71a087e5398dfc7273946b9ec6f9a36960218ad
Gerrit-Change-Number: 14598
Gerrit-PatchSet: 2
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200625/c1b44b8c/attachment.html>


More information about the asterisk-code-review mailing list