diff options
author | Terry Wilson <twilson@digium.com> | 2010-09-10 22:15:47 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2010-09-10 22:15:47 +0000 |
commit | d04046fbe7ab5876bc08c5e0d273a96b08dfe5f8 (patch) | |
tree | 4c88adbabae477066be2fb66ab59069f84ce1d44 /include/asterisk/channel.h | |
parent | b51f922a3461ab3b6d10fb8b8b923e064b1e68f8 (diff) |
Merged revisions 286189 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r286189 | twilson | 2010-09-10 17:04:53 -0500 (Fri, 10 Sep 2010) | 30 lines
Merged revisions 286115 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines
Merged revisions 286059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
Inherit CHANNEL() writes to both sides of a Local channel
Having Local (/n) channels as queue members and setting the language in the
extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
channel. Hold time report playbacks happen on the Local/...,1 channel and
therefor do not play in the specified language.
This patch modifies func_channel_write to call the setoption callback and pass
the CHANNEL() write info to the callback. chan_local uses this information to
look up the other side of the channel and apply the same changes to it.
(closes issue #17673)
Reported by: Guggemand
Review: https://reviewboard.asterisk.org/r/903/
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index b0f589a9d..8b8094e37 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -468,6 +468,27 @@ struct ast_set_party_redirecting { struct ast_set_party_id to; }; +/*! \brief Typedef for a custom read function */ +typedef int (*ast_acf_read_fn_t)(struct ast_channel *, const char *, char *, char *, size_t); + +/*! \brief Typedef for a custom read2 function */ +typedef int (*ast_acf_read2_fn_t)(struct ast_channel *, const char *, char *, struct ast_str **, ssize_t); + +/*! \brief Typedef for a custom write function */ +typedef int (*ast_acf_write_fn_t)(struct ast_channel *, const char *, char *, const char *); + +/*! \brief Structure to handle passing func_channel_write info to channels via setoption */ +typedef struct { + /*! \brief ast_chan_write_info_t version. Must be incremented if structure is changed */ + #define AST_CHAN_WRITE_INFO_T_VERSION 1 + uint32_t version; + ast_acf_write_fn_t write_fn; + struct ast_channel *chan; + const char *function; + char *data; + const char *value; +} ast_chan_write_info_t; + /*! * \brief * Structure to describe a channel "technology", ie a channel driver |