aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-01 11:03:17 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-01 11:03:17 +0000
commit572d429e8ad7fe7310b6e461dc262aa8ac69e3ed (patch)
tree75537e8f35e5cfc9b90b423a3aff3a0368815caa
parentf20ef313d021be53e18c2adf115226abfeae3ebb (diff)
Merged revisions 209839 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r209839 | russell | 2009-08-01 06:02:07 -0500 (Sat, 01 Aug 2009) | 20 lines Merged revisions 209838 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r209838 | russell | 2009-08-01 05:59:05 -0500 (Sat, 01 Aug 2009) | 13 lines Modify how Playtones() is used in Milliwatt() to resolve gain issue. When Milliwatt() was changed internally to use Playtones() so that the proper tone was used, it introduced a drop in gain in the output signal. So, use the playtones API directly and specify a volume argument such that the output matches the gain of the original Milliwatt() code. (closes issue #15386) Reported by: rue_mohr Patches: issue_15386.rev2.diff uploaded by russell (license 2) Tested by: rue_mohr ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@209840 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_milliwatt.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c
index 57ff4f8db..4fec6d764 100644
--- a/apps/app_milliwatt.c
+++ b/apps/app_milliwatt.c
@@ -36,6 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
+#include "asterisk/indications.h"
static char *app = "Milliwatt";
@@ -133,19 +134,13 @@ static int old_milliwatt_exec(struct ast_channel *chan)
static int milliwatt_exec(struct ast_channel *chan, void *data)
{
const char *options = data;
- struct ast_app *playtones_app;
int res = -1;
if (!ast_strlen_zero(options) && strchr(options, 'o')) {
return old_milliwatt_exec(chan);
}
- if (!(playtones_app = pbx_findapp("Playtones"))) {
- ast_log(LOG_ERROR, "The Playtones application is required to run Milliwatt()\n");
- return -1;
- }
-
- res = pbx_exec(chan, playtones_app, "1004/1000");
+ res = ast_playtones_start(chan, 23255, "1004/1000", 0);
while (!res) {
res = ast_safe_sleep(chan, 10000);