diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-12-11 13:06:30 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-12-11 13:06:30 +0000 |
commit | ce423d2ea47501a829711ff957e78729f38925ff (patch) | |
tree | cbeaeafaba32bb60b551c7a24979b7783a0d94d3 /channels/pjsip/include/chan_pjsip.h | |
parent | f46b30bd36457cf349ef18ee854cce9f4dd0daaf (diff) |
func_channel, chan_pjsip: Add CHANNEL read function support for chan_pjsip
This patch adds CHANNEL read support for chan_pjsip. This allows the dialplan
to use the CHANNEL function on a chan_pjsip channel to obtain run-time
information about the channel from the PJSIP channel driver and the PJSIP
stack. This includes:
* RTP information, including source/destination media addresses, whether or
not the media is secure, held, and other properties.
* RTCP information. This includes sets of parseable information, as well as
individual statistic attriutes.
* PJSIP information. This includes URIs, local/remote signalling addresses,
whether or not the signalling is secure, and other properties.
* The endpoint name. This can be used in conjunction with the PJSIP_ENDPOINT
function to obtain more detailed endpoint information.
Review: https://reviewboard.asterisk.org/r/3038/
........
Merged revisions 403618 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/pjsip/include/chan_pjsip.h')
-rw-r--r-- | channels/pjsip/include/chan_pjsip.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/channels/pjsip/include/chan_pjsip.h b/channels/pjsip/include/chan_pjsip.h new file mode 100644 index 000000000..b229a0487 --- /dev/null +++ b/channels/pjsip/include/chan_pjsip.h @@ -0,0 +1,58 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 2013, Digium, Inc. + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +/*! + * \file + * \brief PJSIP Channel Driver shared data structures + */ + +#ifndef _CHAN_PJSIP_HEADER +#define _CHAN_PJSIP_HEADER + +struct ast_sip_session_media; + +/*! + * \brief Transport information stored in transport_info datastore + */ +struct transport_info_data { + /*! \brief The address that sent the request */ + pj_sockaddr remote_addr; + /*! \brief Our address that received the request */ + pj_sockaddr local_addr; +}; + +/*! + * \brief Positions of various media + */ +enum sip_session_media_position { + /*! \brief First is audio */ + SIP_MEDIA_AUDIO = 0, + /*! \brief Second is video */ + SIP_MEDIA_VIDEO, + /*! \brief Last is the size for media details */ + SIP_MEDIA_SIZE, +}; + +/*! + * \brief The PJSIP channel driver pvt, stored in the \ref ast_sip_channel_pvt + * data structure + */ +struct chan_pjsip_pvt { + /*! \brief The available media sessions */ + struct ast_sip_session_media *media[SIP_MEDIA_SIZE]; +}; + +#endif /* _CHAN_PJSIP_HEADER */ |