chan_pjsip: add a flag to ignore 183 responses if no SDP present

chan_sip will always ignore 183 responses that do not contain SDP
however, chan_pjsip will currently always translate it into a
183 with SDP.  This new flag allows chan_pjsip to have the same
behavior as chan_sip.

ASTERISK-28322 #close

Change-Id: If81cfaa17c11b6ac703e3d71696f259d86c6be4a
This commit is contained in:
Torrey Searle
2019-03-04 08:50:18 +01:00
committed by Sean Bright
parent 255e374254
commit 4ca41caf38
7 changed files with 75 additions and 1 deletions

View File

@@ -3020,7 +3020,14 @@ static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct
ast_channel_unlock(session->channel);
break;
case 183:
ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
if (session->endpoint->ignore_183_without_sdp) {
pjsip_rdata_sdp_info *sdp = pjsip_rdata_get_sdp_info(rdata);
if (sdp && sdp->body.ptr) {
ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
}
} else {
ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
}
break;
case 200:
ast_queue_control(session->channel, AST_CONTROL_ANSWER);