aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-07 17:15:00 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-07 17:15:00 +0000
commitd9d400cb6bcdab29bdd3c5c15d0aec1ba036afbe (patch)
tree3522074c1aa376934974a2997e861251a530b843 /channels
parentf1d56233fabe20279ed3a6d3d88226f7cb179a30 (diff)
Merged revisions 192938 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r192938 | tilghman | 2009-05-07 12:13:36 -0500 (Thu, 07 May 2009) | 6 lines Send DTMF frame before playing back audio. (closes issue #14858) Reported by: barryf Patches: 20090507__bug14858.diff.txt uploaded by tilghman (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@192941 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_unistim.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 52102af94..9e2a32e08 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -2470,14 +2470,17 @@ static void HandleCallIncoming(struct unistimsession *s)
static int unistim_do_senddigit(struct unistimsession *pte, char digit)
{
-
- struct ast_frame f = { 0, };
+ struct ast_frame f = { .frametype = AST_FRAME_DTMF, .subclass = digit, .src = "unistim" };
struct unistim_subchannel *sub;
sub = pte->device->lines->subs[SUB_REAL];
if (!sub->owner || sub->alreadygone) {
ast_log(LOG_WARNING, "Unable to find subchannel in dtmf senddigit\n");
return -1;
}
+
+ /* Send DTMF indication _before_ playing sounds */
+ ast_queue_frame(sub->owner, &f);
+
if (unistimdebug)
ast_verb(0, "Send Digit %c\n", digit);
switch (digit) {
@@ -2534,10 +2537,6 @@ static int unistim_do_senddigit(struct unistimsession *pte, char digit)
}
usleep(150000); /* XXX Less than perfect, blocking an important thread is not a good idea */
send_tone(pte, 0, 0);
- f.frametype = AST_FRAME_DTMF;
- f.subclass = digit;
- f.src = "unistim";
- ast_queue_frame(sub->owner, &f);
return 0;
}