chan_pjsip: add allow_sending_180_after_183 option

added new global config option "allow_sending_180_after_183"
that if enabled will preserve 180 after a 183

ASTERISK-29842

Change-Id: I8a53f8c35595b6d16d8e86e241b5f110d92f3d18
This commit is contained in:
Mark Petersen
2022-02-21 14:23:21 +01:00
committed by Friendly Automation
parent ae1373d12d
commit 16e59db514
7 changed files with 94 additions and 1 deletions

View File

@@ -1630,8 +1630,12 @@ static int chan_pjsip_indicate(struct ast_channel *ast, int condition, const voi
if (channel->session->endpoint->inband_progress ||
(channel->session->inv_session && channel->session->inv_session->neg &&
pjmedia_sdp_neg_get_state(channel->session->inv_session->neg) == PJMEDIA_SDP_NEG_STATE_DONE)) {
response_code = 183;
res = -1;
if (ast_sip_get_allow_sending_180_after_183()) {
response_code = 180;
} else {
response_code = 183;
}
} else {
response_code = 180;
}