diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-05 16:23:44 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-05 16:23:44 +0000 |
commit | 198829f2db3d8dcaa76188dc4fe6db06e7b8cbb8 (patch) | |
tree | f1786eed45ddc28e1bf43faafd02bcc917747afd /apps/app_dial.c | |
parent | 6f39909904c5ce6a5f817477c936469ac89c44ed (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: http://svn.digium.com/svn/asterisk/trunk@106072 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 5 |
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) { |