diff options
author | Joshua Colp <jcolp@digium.com> | 2016-07-07 12:38:45 -0300 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2016-07-07 11:46:18 -0500 |
commit | 302be4809aefc850f9b2335e074e5c88c4655fb6 (patch) | |
tree | 646269a948d2b5d1c86eb1c0742539b44395fc9d /res | |
parent | 9e10aa84969b3b6e57dde5a637c47f17f1fd4ef7 (diff) |
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
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip_t38.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index c02517104..76720acee 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; } |