diff options
author | Richard Mudgett <rmudgett@digium.com> | 2015-03-10 16:04:32 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-03-10 16:04:32 +0000 |
commit | cae712d986211c636f669101bf8071975570fbcf (patch) | |
tree | 98927cf0a348a064390081a65f0338b813922571 /include/asterisk | |
parent | 110b99646cec9128d9dec4bc764dfb585b3e9844 (diff) |
res_pjsip_refer: Fix occasional unexpected BYE sent after receiving a REFER.
A race condition happened between initiating a transfer and requesting
that a dialog termination be delayed. Occasionally, the transferrer
channels would exit the bridge and hangup before the dialog termination
delay was requested.
* Made request dialog termination delay before initiating the transfer
action. If the transfer fails then cancel the delayed dialog termination
request.
ASTERISK-24755 #close
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/4460/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/res_pjsip_session.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h index 75e7f1397..93238010a 100644 --- a/include/asterisk/res_pjsip_session.h +++ b/include/asterisk/res_pjsip_session.h @@ -139,6 +139,8 @@ struct ast_sip_session { struct ast_dsp *dsp; /*! Whether the termination of the session should be deferred */ unsigned int defer_terminate:1; + /*! Termination requested while termination deferred */ + unsigned int terminate_while_deferred:1; /*! Deferred incoming re-invite */ pjsip_rx_data *deferred_reinvite; /*! Current T.38 state */ @@ -447,8 +449,18 @@ void ast_sip_session_terminate(struct ast_sip_session *session, int response); * \brief Defer local termination of a session until remote side terminates, or an amount of time passes * * \param session The session to defer termination on + * + * \retval 0 Success + * \retval -1 Failure + */ +int ast_sip_session_defer_termination(struct ast_sip_session *session); + +/*! + * \brief Cancel a pending deferred termination. + * + * \param session The session to cancel a deferred termination on. */ -void ast_sip_session_defer_termination(struct ast_sip_session *session); +void ast_sip_session_defer_termination_cancel(struct ast_sip_session *session); /*! * \brief Register an SDP handler |