mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
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 9284dca636
)
This commit is contained in:
committed by
Asterisk Development Team
parent
4b11eb23c8
commit
28320a9cd8
@@ -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);
|
||||
|
Reference in New Issue
Block a user