aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-12 14:48:40 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-12 14:48:40 +0000
commitca7d498193384375f9b6ad8cbf164242ce1e2ebc (patch)
tree837bc9d8bac02f7f8aef37b1afb577fcdb1dfdec /include
parentb6f719c43c91a495a49537040fa013f6f8111d2e (diff)
Merged revisions 163449 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r163449 | russell | 2008-12-12 07:55:30 -0600 (Fri, 12 Dec 2008) | 34 lines Merged revisions 163448 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r163448 | russell | 2008-12-12 07:44:08 -0600 (Fri, 12 Dec 2008) | 26 lines Resolve issues that could cause DTMF to be processed out of order. These changes come from team/russell/issue_12658 1) Change autoservice to put digits on the head of the channel's frame readq instead of the tail. If there were frames on the readq that autoservice had not yet read, the previous code would have resulted in out of order processing. This required a new API call to queue a frame to the head of the queue instead of the tail. 2) Change up the processing of DTMF in ast_read(). Some of the problems were the result of having two sources of pending DTMF frames. There was the dtmfq and the more generic readq. Both were used for pending DTMF in various scenarios. Simplifying things to only use the frame readq avoids some of the problems. 3) Fix a bug where a DTMF END frame could get passed through when it shouldn't have. If code set END_DTMF_ONLY in the middle of digit emulation, and a digit arrived before emulation was complete, digits would get processed out of order. (closes issue #12658) Reported by: dimas Tested by: russell, file Review: http://reviewboard.digium.com/r/85/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@163515 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/channel.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 1f458fa13..66cffab7b 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -496,7 +496,7 @@ struct ast_channel {
unsigned short transfercapability; /*!< ISDN Transfer Capbility - AST_FLAG_DIGITAL is not enough */
- char dtmfq[AST_MAX_EXTENSION]; /*!< Any/all queued DTMF characters */
+ char unused_old_dtmfq[AST_MAX_EXTENSION]; /*!< (deprecated, use readq instead) Any/all queued DTMF characters */
char context[AST_MAX_CONTEXT]; /*!< Dialplan: Current extension context */
char exten[AST_MAX_EXTENSION]; /*!< Dialplan: Current extension number */
char macrocontext[AST_MAX_CONTEXT]; /*!< Macro: Current non-macro context. See app_macro.c */
@@ -711,6 +711,20 @@ struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_
*/
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f);
+/*!
+ * \brief Queue an outgoing frame to the head of the frame queue
+ *
+ * \param chan the channel to queue the frame on
+ * \param f the frame to queue. Note that this frame will be duplicated by
+ * this function. It is the responsibility of the caller to handle
+ * freeing the memory associated with the frame being passed if
+ * necessary.
+ *
+ * \retval 0 success
+ * \retval non-zero failure
+ */
+int ast_queue_frame_head(struct ast_channel *chan, struct ast_frame *f);
+
/*!
* \brief Queue a hangup frame
*