res_pjsip_session: Send Session Interval too small response
Handle session interval lower than endpoint's configured minimum timer
when sending first answer. Timer setting is checked during this step and
needs to handled appropriately.
Before this change, no response was sent at all. After this change a
response with 422 Session Interval too small is sent to UAC.
(cherry picked from commit 98665a14b3
)
This commit is contained in:
parent
92ac4efec7
commit
9b1071f259
|
@ -4053,15 +4053,20 @@ static int new_invite(struct new_invite *invite)
|
|||
* so let's go ahead and send a 100 Trying out to stop any
|
||||
* retransmissions.
|
||||
*/
|
||||
if (pjsip_inv_initial_answer(invite->session->inv_session, invite->rdata, 100, NULL, NULL, &tdata) != PJ_SUCCESS) {
|
||||
if (tdata) {
|
||||
pjsip_inv_send_msg(invite->session->inv_session, tdata);
|
||||
} else {
|
||||
pjsip_inv_terminate(invite->session->inv_session, 500, PJ_TRUE);
|
||||
}
|
||||
goto end;
|
||||
}
|
||||
|
||||
ast_trace(-1, "%s: Call (%s:%s) to extension '%s' sending 100 Trying\n",
|
||||
ast_sip_session_get_name(invite->session),
|
||||
invite->rdata->tp_info.transport->type_name,
|
||||
pj_sockaddr_print(&invite->rdata->pkt_info.src_addr, buffer, sizeof(buffer), 3),
|
||||
invite->session->exten);
|
||||
if (pjsip_inv_initial_answer(invite->session->inv_session, invite->rdata, 100, NULL, NULL, &tdata) != PJ_SUCCESS) {
|
||||
pjsip_inv_terminate(invite->session->inv_session, 500, PJ_TRUE);
|
||||
goto end;
|
||||
}
|
||||
ast_sip_session_send_response(invite->session, tdata);
|
||||
|
||||
sdp_info = pjsip_rdata_get_sdp_info(invite->rdata);
|
||||
|
|
Loading…
Reference in New Issue