aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_milliwatt.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-01 10:59:05 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-01 10:59:05 +0000
commitc98d99047546a4cbc670b716a737ad0abe242234 (patch)
tree350af64341d4960e3791c11cd1eca0d98445b147 /apps/app_milliwatt.c
parent70c17d62d495c582a266bbba2a6513734b1ef6d4 (diff)
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.4@209838 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_milliwatt.c')
-rw-r--r--apps/app_milliwatt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c
index b63771c38..e9266a683 100644
--- a/apps/app_milliwatt.c
+++ b/apps/app_milliwatt.c
@@ -38,6 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <unistd.h>
#include <errno.h>
+#include <limits.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -46,6 +47,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/utils.h"
+#include "asterisk/indications.h"
static char *app = "Milliwatt";
@@ -145,7 +147,6 @@ 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;
struct ast_module_user *u;
int res = -1;
@@ -156,12 +157,7 @@ static int milliwatt_exec(struct ast_channel *chan, void *data)
goto exit_app;
}
- if (!(playtones_app = pbx_findapp("Playtones"))) {
- ast_log(LOG_ERROR, "The Playtones application is required to run Milliwatt()\n");
- goto exit_app;
- }
-
- 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);