[Asterisk-cvs] asterisk/apps app_meetme.c, 1.58, 1.59 app_voicemail.c, 1.146, 1.147

markster at lists.digium.com markster at lists.digium.com
Mon Sep 6 11:40:57 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv18890/apps

Modified Files:
	app_meetme.c app_voicemail.c 
Log Message:
Add Czech digit/voicemail support


Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- app_meetme.c	27 Aug 2004 04:12:55 -0000	1.58
+++ app_meetme.c	6 Sep 2004 15:43:43 -0000	1.59
@@ -3,7 +3,7 @@
  *
  * Meet me conference bridge
  * 
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
  *
  * Mark Spencer <markster at linux-support.net>
  *

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- app_voicemail.c	6 Sep 2004 06:19:17 -0000	1.146
+++ app_voicemail.c	6 Sep 2004 15:43:43 -0000	1.147
@@ -3318,6 +3318,82 @@
 	return res;
 }
 
+
+/* CZECH syntax */
+/* in czech there must be declension of word new and message
+ * czech   	: english 	   : czech	: english
+ * --------------------------------------------------------
+ * vm-youhave 	: you have 
+ * vm-novou 	: one new 	   : vm-zpravu 	: message
+ * vm-nove 	: 2-4 new	   : vm-zpravy 	: messages
+ * vm-novych 	: 5-infinite new   : vm-zprav 	: messages
+ * vm-starou	: one old
+ * vm-stare	: 2-4 old 
+ * vm-starych	: 5-infinite old
+ * jednu	: one	- falling 4. 
+ * vm-no	: no  ( no messages )
+ */
+
+static int vm_intro_cz(struct ast_channel *chan,struct vm_state *vms)
+{
+	int res;
+	res = play_and_wait(chan, "vm-youhave");
+	if (!res) {
+		if (vms->newmessages) {
+			if (vms->newmessages == 1) {
+				res = play_and_wait(chan, "digits/jednu");
+			} else {
+				res = say_and_wait(chan, vms->newmessages, chan->language);
+			}
+			if (!res) {
+                                if ((vms->newmessages == 1))
+                                        res = play_and_wait(chan, "vm-novou");
+                                if ((vms->newmessages) > 1 && (vms->newmessages < 5))
+                                        res = play_and_wait(chan, "vm-nove");
+                                if (vms->newmessages > 4)
+                                        res = play_and_wait(chan, "vm-novych");
+			}
+			if (vms->oldmessages && !res)
+                                res = play_and_wait(chan, "vm-and");
+                        else if (!res) {
+                                if ((vms->newmessages == 1))
+                                        res = play_and_wait(chan, "vm-zpravu");
+                                if ((vms->newmessages) > 1 && (vms->newmessages < 5))
+                                        res = play_and_wait(chan, "vm-zpravy");
+                                if (vms->newmessages > 4)
+	                                res = play_and_wait(chan, "vm-zprav");
+			}
+		}
+		if (!res && vms->oldmessages) {
+			res = say_and_wait(chan, vms->oldmessages, chan->language);
+			if (!res) {
+                                if ((vms->oldmessages == 1))
+                                        res = play_and_wait(chan, "vm-starou");
+                                if ((vms->oldmessages) > 1 && (vms->oldmessages < 5))
+                                	res = play_and_wait(chan, "vm-stare");
+                                if (vms->oldmessages > 4)
+                                        res = play_and_wait(chan, "vm-starych");
+			}
+			if (!res) {
+	                	if ((vms->oldmessages == 1))
+					res = play_and_wait(chan, "vm-zpravu");
+				if ((vms->oldmessages) > 1 && (vms->oldmessages < 5))
+                                        res = play_and_wait(chan, "vm-zpravy");
+	                        if (vms->oldmessages > 4)
+	                                res = play_and_wait(chan, "vm-zprav");
+			}
+		}
+		if (!res) {
+			if (!vms->oldmessages && !vms->newmessages) {
+				res = play_and_wait(chan, "vm-no");
+				if (!res)
+					res = play_and_wait(chan, "vm-zpravy");
+			}
+		}
+	}
+	return res;
+}
+
 static int vm_instructions(struct ast_channel *chan, struct vm_state *vms, int skipadvanced)
 {
 	int res = 0;
@@ -3712,6 +3788,8 @@
 			cmd = vm_intro_nl(chan, &vms);
 		} else if (!strcasecmp(chan->language, "pt")) {	/* PORTUGUESE syntax */
 			cmd = vm_intro_pt(chan, &vms);
+		} else if (!strcasecmp(chan->language, "cz")) { /* CZECH syntax */
+			cmd = vm_intro_cz(chan, &vms);
 		} else {	/* Default to ENGLISH */
 			cmd = vm_intro(chan, &vms);
 		}




More information about the svn-commits mailing list