Add a new feature for Music on Hold. If you set the "digit" option for a

class in musiconhold.conf, a caller on hold may press this digit to switch
to listening to that music class.
  This involved adding a new callback for generators, which allow generators
to get notified of DTMF from the channel they are running on.  Then, a callback
was implemented for the music on hold generators.
(patch from bbryant)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-05-22 18:52:59 +00:00
parent d3ee017682
commit 90d6885701
5 changed files with 57 additions and 4 deletions

View File

@@ -182,6 +182,8 @@ struct ast_generator {
void *(*alloc)(struct ast_channel *chan, void *params);
void (*release)(struct ast_channel *chan, void *data);
int (*generate)(struct ast_channel *chan, void *data, int len, int samples);
/*! This gets called when DTMF_END frames are read from the channel */
void (*digit)(struct ast_channel *chan, char digit);
};
/*! \brief Structure for a data store type */