diff options
author | Joshua Colp <jcolp@digium.com> | 2014-12-16 15:43:51 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-12-16 15:43:51 +0000 |
commit | ad85e54fd9b545aa6c1dd43a14bdf92344cf4fa0 (patch) | |
tree | 98c4874d694d50f01351f3731b8c9fd99054049f /res/res_pjsip_t38.c | |
parent | 89617370ec0e0cd0384ee24c451d2c70b51ec222 (diff) |
res_pjsip_t38: Fix T.38 failure when peer reinvites immediately.
If a remote endpoint reinvites to T.38 immediately the state machine
will go into a peer reinvite state. If a T.38 capable application
(such as ReceiveFax) queries it will receive this state. Normally
the application will then indicate so that the channel driver will
queue up the T.38 offer previously received. Once it receives this
offer the application will act normally and negotiate.
The res_pjsip_t38 module incorrectly partially squashed this indication.
This would cause the application to think the request had failed when
in reality it had actually worked.
This change makes it so that no T.38 control frames (or indications)
are squashed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_t38.c')
-rw-r--r-- | res/res_pjsip_t38.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index d1ec07610..1dba15a12 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -113,7 +113,11 @@ static struct t38_parameters_task_data *t38_parameters_task_data_alloc(struct as data->session = session; ao2_ref(session, +1); - data->frame = frame; + data->frame = ast_frdup(frame); + if (!data->frame) { + ao2_ref(data, -1); + data = NULL; + } return data; } @@ -396,8 +400,6 @@ static struct ast_frame *t38_framehook_write(struct ast_sip_session *session, st if (ast_sip_push_task(session->serializer, t38_interpret_parameters, data)) { ao2_ref(data, -1); } - - f = &ast_null_frame; } else if (f->frametype == AST_FRAME_MODEM) { RAII_VAR(struct ast_sip_session_media *, session_media, NULL, ao2_cleanup); |