mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 02:18:31 +00:00
chan_sip/res_pjsip_t38: Handle a request to negotiate T.38 after it is enabled.
Some T.38 implementations may send another re-invite after the initial one which adds additional negotiation details (such as the max bitrate). Currently this will fail when passthrough is being done in chan_sip as we do nothing if T.38 is already active. Other handlers of T.38 inside of Asterisk (such as res_fax) handle this scenario so this change adds support for it to chan_sip and res_pjsip_t38. If a request to negotiate is received while T.38 is already enabled a new re-INVITE is sent and negotiation is done again. ASTERISK-26179 #close Change-Id: I0298494d3da6df3219bbfa4be9aa04015043145c
This commit is contained in:
@@ -7665,7 +7665,8 @@ static int interpret_t38_parameters(struct sip_pvt *p, const struct ast_control_
|
|||||||
ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp);
|
ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp);
|
||||||
change_t38_state(p, T38_ENABLED);
|
change_t38_state(p, T38_ENABLED);
|
||||||
transmit_response_with_t38_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
|
transmit_response_with_t38_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
|
||||||
} else if (p->t38.state != T38_ENABLED) {
|
} else if ((p->t38.state != T38_ENABLED) || ((p->t38.state == T38_ENABLED) &&
|
||||||
|
(parameters->request_response == AST_T38_REQUEST_NEGOTIATE))) {
|
||||||
p->t38.our_parms = *parameters;
|
p->t38.our_parms = *parameters;
|
||||||
ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp);
|
ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp);
|
||||||
change_t38_state(p, T38_LOCAL_REINVITE);
|
change_t38_state(p, T38_LOCAL_REINVITE);
|
||||||
|
@@ -361,7 +361,9 @@ static int t38_interpret_parameters(void *obj)
|
|||||||
ast_udptl_set_local_max_ifp(session_media->udptl, state->our_parms.max_ifp);
|
ast_udptl_set_local_max_ifp(session_media->udptl, state->our_parms.max_ifp);
|
||||||
t38_change_state(data->session, session_media, state, T38_ENABLED);
|
t38_change_state(data->session, session_media, state, T38_ENABLED);
|
||||||
ast_sip_session_resume_reinvite(data->session);
|
ast_sip_session_resume_reinvite(data->session);
|
||||||
} else if (data->session->t38state != T38_ENABLED) {
|
} else if ((data->session->t38state != T38_ENABLED) ||
|
||||||
|
((data->session->t38state == T38_ENABLED) &&
|
||||||
|
(parameters->request_response == AST_T38_REQUEST_NEGOTIATE))) {
|
||||||
if (t38_initialize_session(data->session, session_media)) {
|
if (t38_initialize_session(data->session, session_media)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user