[asterisk-commits] russell: trunk r209839 - in /trunk: ./ apps/app_milliwatt.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 1 06:02:11 CDT 2009


Author: russell
Date: Sat Aug  1 06:02:07 2009
New Revision: 209839

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209839
Log:
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
........

Modified:
    trunk/   (props changed)
    trunk/apps/app_milliwatt.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_milliwatt.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_milliwatt.c?view=diff&rev=209839&r1=209838&r2=209839
==============================================================================
--- trunk/apps/app_milliwatt.c (original)
+++ trunk/apps/app_milliwatt.c Sat Aug  1 06:02:07 2009
@@ -32,6 +32,7 @@
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
 #include "asterisk/pbx.h"
+#include "asterisk/indications.h"
 
 /*** DOCUMENTATION
 	<application name="Milliwatt" language="en_US">
@@ -142,19 +143,13 @@
 static int milliwatt_exec(struct ast_channel *chan, const char *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);




More information about the asterisk-commits mailing list