summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-03-05 16:23:44 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-03-05 16:23:44 +0000
commit8a411ccf839654d3c15452c2f25831693e741baf (patch)
treef1786eed45ddc28e1bf43faafd02bcc917747afd /apps/app_dial.c
parentc6585e5b5d8679cdb2b258145455606c23e217bb (diff)
Create a centralized configuration option for silencethreshold
(closes issue #11236) Reported by: philipps Patches: 20080218__bug11236.diff.txt uploaded by Corydon76 (license 14) Tested by: philipps git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index f93ba0de9..5698c1945 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -60,6 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/privacy.h"
#include "asterisk/stringfields.h"
#include "asterisk/global_datastores.h"
+#include "asterisk/dsp.h"
static char *app = "Dial";
@@ -1115,6 +1116,7 @@ static int setup_privacy_args(struct privacy_args *pa,
char callerid[60];
int res;
char *l;
+ int silencethreshold;
if (!ast_strlen_zero(chan->cid.cid_num)) {
l = ast_strdupa(chan->cid.cid_num);
@@ -1188,8 +1190,9 @@ static int setup_privacy_args(struct privacy_args *pa,
"At the tone, please say your name:"
*/
+ silencethreshold = ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE);
ast_answer(chan);
- res = ast_play_and_record(chan, "priv-recordintro", pa->privintro, 4, "gsm", &duration, 128, 2000, 0); /* NOTE: I've reduced the total time to 4 sec */
+ res = ast_play_and_record(chan, "priv-recordintro", pa->privintro, 4, "gsm", &duration, silencethreshold, 2000, 0); /* NOTE: I've reduced the total time to 4 sec */
/* don't think we'll need a lock removed, we took care of
conflicts by naming the pa.privintro file */
if (res == -1) {