diff options
author | Joshua Colp <jcolp@digium.com> | 2014-12-12 13:05:15 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-12-12 13:05:15 +0000 |
commit | 0c9fbb449f272b826e022499dddda39bc12dda7e (patch) | |
tree | 395256dbbf4ad0c321fb8fd91bf77ab402342917 /include | |
parent | 61fe4f10d230d09b5246c97675637810ffed2fa2 (diff) |
res_pjsip_session: Delay sending BYE if a re-INVITE transaction is in progress.
Given the scenario where a PJSIP channel is in a native RTP bridge with direct
media and the channel is then hung up the code will currently re-INVITE the channel
back to Asterisk and send a BYE at the same time. Many SIP implementations dislike
this greatly.
This change makes it so that if a re-INVITE transaction is in progress the BYE
is queued to occur after the completion of the transaction (be it through normal
means or a timeout).
Review: https://reviewboard.asterisk.org/r/4248/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/res_pjsip_session.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h index 30d325efb..48d5a4712 100644 --- a/include/asterisk/res_pjsip_session.h +++ b/include/asterisk/res_pjsip_session.h @@ -434,6 +434,14 @@ struct ast_sip_session *ast_sip_session_create_outgoing(struct ast_sip_endpoint struct ast_format_cap *req_caps); /*! + * \brief Terminate a session and, if possible, send the provided response code + * + * \param session The session to terminate + * \param response The response code to use for termination if possible + */ +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 |