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
This commit is contained in:
Joshua Colp
2013-07-23 12:27:03 +00:00
parent b4c2eecca6
commit 16885ffda5
4 changed files with 129 additions and 82 deletions

View File

@@ -272,6 +272,27 @@ struct ast_sip_session_sdp_handler {
AST_LIST_ENTRY(ast_sip_session_sdp_handler) next;
};
/*!
* \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
*