[asterisk-commits] trunk - r7313 /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Dec 3 14:20:52 CST 2005


Author: tilghman
Date: Sat Dec  3 14:20:51 2005
New Revision: 7313

URL: http://svn.digium.com/view/asterisk?rev=7313&view=rev
Log:
Merging from 1.2, bug 5925 - app_voicemail should check for the callerid it sets for unknown
Also, remove unnecessary res checks (initialized to 0; never set)

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=7313&r1=7312&r2=7313&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sat Dec  3 14:20:51 2005
@@ -3674,7 +3674,7 @@
 	/* Strip off caller ID number from name */
 	ast_log(LOG_DEBUG, "VM-CID: composite caller ID received: %s, context: %s\n", cid, context);
 	ast_callerid_parse(cid, &name, &callerid);
-	if ((!res)&&(!ast_strlen_zero(callerid))){
+	if ((!ast_strlen_zero(callerid)) && strcmp(callerid, "Unknown")) {
 		/* Check for internal contexts and only */
 		/* say extension when the call didn't come from an internal context in the list */
 		for (i = 0 ; i < MAX_NUM_CID_CONTEXTS ; i++){
@@ -3714,9 +3714,8 @@
 	} else {
 		/* Number unknown */
 		ast_log(LOG_DEBUG, "VM-CID: From an unknown number\n");
-		if (!res)
-			/* BB: Say "from an unknown caller" as one phrase - it is already recorded by "the voice" anyhow */
-			res = wait_file2(chan, vms, "vm-unknown-caller");
+		/* Say "from an unknown caller" as one phrase - it is already recorded by "the voice" anyhow */
+		res = wait_file2(chan, vms, "vm-unknown-caller");
 	}
 	return res;
 }
@@ -5535,7 +5534,7 @@
 		if (ast_strlen_zero(tmp)) {
 			LOCAL_USER_REMOVE(u);
 			return 0;
-		}	
+		}
 		argv[0] = ast_strdupa(tmp);
 	}
 



More information about the asterisk-commits mailing list