mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
pjsip: Generate progress (once) when receiving a 180 with a SDP
ASTERISK-29105 Change-Id: If1615fe7115fe544ef974b044d3cea5c48b94a38
This commit is contained in:
committed by
Joshua Colp
parent
2ea75ed3d5
commit
48ed4f670f
@@ -3193,15 +3193,23 @@ static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct
|
||||
}
|
||||
|
||||
switch (status.code) {
|
||||
case 180:
|
||||
ast_trace(-1, "%s: Queueing RINGING\n", ast_sip_session_get_name(session));
|
||||
ast_queue_control(session->channel, AST_CONTROL_RINGING);
|
||||
case 180: {
|
||||
pjsip_rdata_sdp_info *sdp = pjsip_rdata_get_sdp_info(rdata);
|
||||
if (sdp && sdp->body.ptr) {
|
||||
ast_trace(-1, "%s: Queueing PROGRESS\n", ast_sip_session_get_name(session));
|
||||
ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
|
||||
} else {
|
||||
ast_trace(-1, "%s: Queueing RINGING\n", ast_sip_session_get_name(session));
|
||||
ast_queue_control(session->channel, AST_CONTROL_RINGING);
|
||||
}
|
||||
|
||||
ast_channel_lock(session->channel);
|
||||
if (ast_channel_state(session->channel) != AST_STATE_UP) {
|
||||
ast_setstate(session->channel, AST_STATE_RINGING);
|
||||
}
|
||||
ast_channel_unlock(session->channel);
|
||||
break;
|
||||
}
|
||||
case 183:
|
||||
ast_trace(-1, "%s: Queueing PROGRESS\n", ast_sip_session_get_name(session));
|
||||
if (session->endpoint->ignore_183_without_sdp) {
|
||||
|
Reference in New Issue
Block a user