summaryrefslogtreecommitdiff
path: root/main/app.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-09-11 22:16:54 +0000
committerMark Michelson <mmichelson@digium.com>2014-09-11 22:16:54 +0000
commit0f2bd8d85512b810d5df2bf3c51d84dccc115bc3 (patch)
tree93f572e92bf03deb538368310dd4d91555b37110 /main/app.c
parent43c4529f15c9d09865a9a9d05c99f7f7a2f14a10 (diff)
Remove undocumented default behavior of ast_play_and_record_full acceptdtmf.
ast_play_and_record_full() has a parameter called "acceptdtmf" that is a string of acceptable DTMF digits that may be pressed by a caller to end and accept the recording. ARI uses this function in order to perform recording, and it provides options for what is passed as acceptdtmf to ast_play_and_record_full(). By default, ARI passes an empty string, with the intention that no DTMF can be used to end the recording. The problem is that ast_play_and_record_full() attempts to be "helpful" by setting "#" as the acceptdtmf if an empty string or NULL pointer has been passed in. With ARI, this results in unexpected behavior occurring if you have attempted to intercept "#" yourself in order to perform some other manipulation of the live recording. This change removes the "helpful" behavior by no longer accepting "#" as a default acceptdtmf if none is specified by the caller of ast_play_and_record_full(). This makes the ARI scenario work as expected. The other callers of ast_play_and_record_full() are app_voicemail and app_minivm, and in both cases, they pass an explicit "#" to ast_play_and_record_full() as acceptdtmf, so they are unaffected by this change. ........ Merged revisions 422964 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@422965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/app.c b/main/app.c
index 82237479c..a6c7514cd 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1829,7 +1829,7 @@ static const char default_canceldtmf[] = "";
int ast_play_and_record_full(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int *sound_duration, int beep, int silencethreshold, int maxsilence, const char *path, const char *acceptdtmf, const char *canceldtmf, int skip_confirmation_sound, enum ast_record_if_exists if_exists)
{
- return __ast_play_and_record(chan, playfile, recordfile, maxtime, fmt, duration, sound_duration, beep, silencethreshold, maxsilence, path, 0, S_OR(acceptdtmf, default_acceptdtmf), S_OR(canceldtmf, default_canceldtmf), skip_confirmation_sound, if_exists);
+ return __ast_play_and_record(chan, playfile, recordfile, maxtime, fmt, duration, sound_duration, beep, silencethreshold, maxsilence, path, 0, S_OR(acceptdtmf, ""), S_OR(canceldtmf, default_canceldtmf), skip_confirmation_sound, if_exists);
}
int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int *sound_duration, int silencethreshold, int maxsilence, const char *path)