summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2013-07-23 12:27:03 +0000
committerJoshua Colp <jcolp@digium.com>2013-07-23 12:27:03 +0000
commit16885ffda50a03bc4b5420d8a5d550dd377e4dc8 (patch)
treea4d67d2db832c4873b1f03c122f352ab78711b96 /include
parentb4c2eecca65f60d518affc2eb5b48aa21701deb6 (diff)
Expose the chan_pjsip implementation pvt and session in a defined manner.
This allows modules outside of chan_pjsip itself to get the session given only an Asterisk channel. Review: https://reviewboard.asterisk.org/r/2674/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_sip_session.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asterisk/res_sip_session.h b/include/asterisk/res_sip_session.h
index 71e9be1c4..26299eb3e 100644
--- a/include/asterisk/res_sip_session.h
+++ b/include/asterisk/res_sip_session.h
@@ -273,6 +273,27 @@ struct ast_sip_session_sdp_handler {
};
/*!
+ * \brief A structure which contains a channel implementation and session
+ */
+struct ast_sip_channel_pvt {
+ /*! \brief Pointer to channel specific implementation information, must be ao2 object */
+ void *pvt;
+ /*! \brief Pointer to session */
+ struct ast_sip_session *session;
+};
+
+/*!
+ * \brief Allocate a new SIP channel pvt structure
+ *
+ * \param pvt Pointer to channel specific implementation
+ * \param session Pointer to SIP session
+ *
+ * \retval non-NULL success
+ * \retval NULL failure
+ */
+struct ast_sip_channel_pvt *ast_sip_channel_pvt_alloc(void *pvt, struct ast_sip_session *session);
+
+/*!
* \brief Allocate a new SIP session
*
* This will take care of allocating the datastores container on the session as well