summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjsip_session.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2015-03-10 16:08:40 +0000
committerRichard Mudgett <rmudgett@digium.com>2015-03-10 16:08:40 +0000
commite7ee83ea9031c6a80da6f6838083b7608d32a828 (patch)
treefad79ade52711c4968c92c8b74b635e0cba44011 /include/asterisk/res_pjsip_session.h
parent1ce529d30e900054b9d2417380945d451012313f (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/ ........ Merged revisions 432668 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/res_pjsip_session.h')
-rw-r--r--include/asterisk/res_pjsip_session.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index 8efecb62b..728b2c33c 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -141,6 +141,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 */
@@ -449,8 +451,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