]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: chan_sip does not process 400 response to an INVITE.
authorFrederic LE FOLL <frederic.lefoll@c-s.fr>
Mon, 22 Jun 2020 09:08:47 +0000 (11:08 +0200)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Thu, 25 Jun 2020 14:21:09 +0000 (09:21 -0500)
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

channels/chan_sip.c

index afc555da6a51a10098975906cfd1cbe9c348df1d..6872dc6121a6332f2f7268a6fa94b2eeffdf3316 100644 (file)
@@ -24427,6 +24427,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
                }
                break;
 
+       case 400: /* Bad Request */
        case 414: /* Bad request URI */
        case 493: /* Undecipherable */
        case 404: /* Not found */