[Asterisk-cvs] asterisk/apps app_voicemail.c,1.140,1.141

markster at lists.digium.com markster at lists.digium.com
Thu Sep 2 23:23:19 CDT 2004


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

Modified Files:
	app_voicemail.c 
Log Message:
Use exitcontext when available (bug #2363)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- app_voicemail.c	2 Sep 2004 19:18:35 -0000	1.140
+++ app_voicemail.c	3 Sep 2004 03:26:29 -0000	1.141
@@ -1769,14 +1769,20 @@
 			ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno));
 
 		/* Check current or macro-calling context for special extensions */
-		if (ast_exists_extension(chan, chan->context, "o", 1, chan->callerid))
+		if (!ast_strlen_zero(vmu->exit)) {
+			if (ast_exists_extension(chan, vmu->exit, "o", 1, chan->callerid))
+				strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1);
+		} else if (ast_exists_extension(chan, chan->context, "o", 1, chan->callerid))
 			strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1);
 		else if (!ast_strlen_zero(chan->macrocontext) && ast_exists_extension(chan, chan->macrocontext, "o", 1, chan->callerid)) {
 			strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1);
 			ousemacro = 1;
 		}
 
-		if (ast_exists_extension(chan, chan->context, "a", 1, chan->callerid))
+		if (!ast_strlen_zero(vmu->exit)) {
+			if (ast_exists_extension(chan, vmu->exit, "a", 1, chan->callerid))
+				strncat(ecodes, "*", sizeof(ecodes) -  strlen(ecodes) - 1);
+		} else if (ast_exists_extension(chan, chan->context, "a", 1, chan->callerid))
 			strncat(ecodes, "*", sizeof(ecodes) -  strlen(ecodes) - 1);
 		else if (!ast_strlen_zero(chan->macrocontext) && ast_exists_extension(chan, chan->macrocontext, "a", 1, chan->callerid)) {
 			strncat(ecodes, "*", sizeof(ecodes) -  strlen(ecodes) - 1);




More information about the svn-commits mailing list