diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e086711c2cabde260ca0acab2258e137661cd5ca..28379ff85d996fec83d2c62651e9fa182d7e19c3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7669,7 +7669,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); change_t38_state(p, T38_ENABLED); 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; ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp); change_t38_state(p, T38_LOCAL_REINVITE); diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index c02517104b12a60caf141d322d54f83eec94d95e..76720acee2b460b39cdc7bed6c2d60ca7c683243 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -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); t38_change_state(data->session, session_media, state, T38_ENABLED); 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)) { break; }