[asterisk-commits] kmoore: branch kmoore/say_alpha_tweaks r397242 - /team/kmoore/say_alpha_tweak...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 20 22:11:34 CDT 2013


Author: kmoore
Date: Tue Aug 20 22:11:31 2013
New Revision: 397242

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397242
Log:
Create a new builtin app for SayAlpha case sensitivity

Modified:
    team/kmoore/say_alpha_tweaks/main/pbx.c

Modified: team/kmoore/say_alpha_tweaks/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/say_alpha_tweaks/main/pbx.c?view=diff&rev=397242&r1=397241&r2=397242
==============================================================================
--- team/kmoore/say_alpha_tweaks/main/pbx.c (original)
+++ team/kmoore/say_alpha_tweaks/main/pbx.c Tue Aug 20 22:11:31 2013
@@ -489,6 +489,24 @@
 		</synopsis>
 		<syntax>
 			<parameter name="string" required="true" />
+		</syntax>
+		<description>
+			<para>This application will play the sounds that correspond to the letters of the
+			given <replaceable>string</replaceable>.</para>
+		</description>
+		<see-also>
+			<ref type="application">SayDigits</ref>
+			<ref type="application">SayNumber</ref>
+			<ref type="application">SayPhonetic</ref>
+			<ref type="function">CHANNEL</ref>
+		</see-also>
+	</application>
+	<application name="SayAlphaCase" language="en_US">
+		<synopsis>
+			Say Alpha.
+		</synopsis>
+		<syntax>
+			<parameter name="string" required="true" />
 			<parameter name="casetype">
 				<optionlist>
 					<option name="i">
@@ -1144,6 +1162,7 @@
 static int pbx_builtin_saynumber(struct ast_channel *, const char *);
 static int pbx_builtin_saydigits(struct ast_channel *, const char *);
 static int pbx_builtin_saycharacters(struct ast_channel *, const char *);
+static int pbx_builtin_saycharacters_case(struct ast_channel *, const char *);
 static int pbx_builtin_sayphonetic(struct ast_channel *, const char *);
 static int matchcid(const char *cidpattern, const char *callerid);
 #ifdef NEED_DEBUG
@@ -1319,6 +1338,7 @@
 	{ "RaiseException", pbx_builtin_raise_exception },
 	{ "Ringing",        pbx_builtin_ringing },
 	{ "SayAlpha",       pbx_builtin_saycharacters },
+	{ "SayAlphaCase",   pbx_builtin_saycharacters_case },
 	{ "SayDigits",      pbx_builtin_saydigits },
 	{ "SayNumber",      pbx_builtin_saynumber },
 	{ "SayPhonetic",    pbx_builtin_sayphonetic },
@@ -11282,7 +11302,7 @@
 	return res;
 }
 
-static int pbx_builtin_saycharacters(struct ast_channel *chan, const char *data)
+static int pbx_builtin_saycharacters_case(struct ast_channel *chan, const char *data)
 {
 	int res = 0;
 	int casesensitive = 0;
@@ -11311,6 +11331,17 @@
 	}
 
 	res = ast_say_character_str(chan, args.characters, "", ast_channel_language(chan), casesensitive);
+
+	return res;
+}
+
+static int pbx_builtin_saycharacters(struct ast_channel *chan, const char *data)
+{
+	int res = 0;
+
+	if (data) {
+		res = ast_say_character_str(chan, data, "", ast_channel_language(chan), 0);
+	}
 
 	return res;
 }




More information about the asterisk-commits mailing list