diff options
author | Joshua Colp <jcolp@digium.com> | 2017-04-24 15:59:44 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-04-27 10:39:46 +0000 |
commit | 2b22c3c84b8894c5663fec8655b0670b6bca4078 (patch) | |
tree | 119cd5ee07ec1d1ca60ff7c5765f6fd21cce1a28 /include/asterisk/channel.h | |
parent | dc6654d969224129bdd7b4080eda6e027c6454b9 (diff) |
channel: Add ability to request an outgoing channel with stream topology.
This change extends the ast_request functionality by adding another
function and callback to create an outgoing channel with a requested
stream topology. Fallback is provided by either converting the
requested stream topology into a format capabilities structure if
the channel driver does not support streams or by converting the
requested format capabilities into a stream topology if the channel
driver does support streams.
The Dial application has also been updated to request an outgoing
channel with the stream topology of the calling channel.
ASTERISK-26959
Change-Id: Ifa9037a672ac21d42dd7125aa09816dc879a70e6
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 32c9c7f67..70856a96f 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -203,6 +203,8 @@ enum ast_bridge_result { typedef unsigned long long ast_group_t; +struct ast_stream_topology; + /*! \todo Add an explanation of an Asterisk generator */ struct ast_generator { @@ -630,6 +632,26 @@ struct ast_channel_tech { */ struct ast_channel *(* const requester)(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause); + /*! + * \brief Requester - to set up call data structures (pvt's) with stream topology + * + * \param type type of channel to request + * \param topology Stream topology for requested channel + * \param assignedid Unique ID string to assign to channel + * \param requestor channel asking for data + * \param addr destination of the call + * \param cause Cause of failure + * + * \details + * Request a channel of a given type, with addr as optional information used + * by the low level module + * + * \retval NULL failure + * \retval non-NULL channel on success + */ + struct ast_channel *(* const requester_with_stream_topology)(const char *type, struct ast_stream_topology *topology, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause); + + int (* const devicestate)(const char *device_number); /*!< Devicestate call back */ int (* const presencestate)(const char *presence_provider, char **subtype, char **message); /*!< Presencestate callback */ @@ -1393,6 +1415,25 @@ struct ast_channel *ast_channel_release(struct ast_channel *chan); */ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request_cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause); +/*! + * \brief Requests a channel (specifying stream topology) + * + * \param type type of channel to request + * \param topology Stream topology for requested channel + * \param assignedids Unique ID to create channel with + * \param requestor channel asking for data + * \param addr destination of the call + * \param cause Cause of failure + * + * \details + * Request a channel of a given type, with addr as optional information used + * by the low level module + * + * \retval NULL failure + * \retval non-NULL channel on success + */ +struct ast_channel *ast_request_with_stream_topology(const char *type, struct ast_stream_topology *topology, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause); + enum ast_channel_requestor_relationship { /*! The requestor is the future bridge peer of the channel. */ AST_CHANNEL_REQUESTOR_BRIDGE_PEER, |