mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	func_callerid: Always format ANI2 as two digits.
ANI II is always supposed to be formatted as two digits, so zero pad when formatting it if necessary. Resolves: #1222
This commit is contained in:
		
				
					committed by
					
						![github-actions[bot]](/avatar/af2ab225b7c0eec44a8d0eba6b5c869a?size=40) github-actions[bot]
						github-actions[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							f6ceeff523
						
					
				
				
					commit
					923e6d471a
				
			| @@ -1048,7 +1048,9 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, | ||||
| 				ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data); | ||||
| 			} | ||||
| 		} else if (member.argc == 1 && !strcasecmp("ani2", member.subnames[0])) { | ||||
| 			snprintf(buf, len, "%d", ast_channel_caller(chan)->ani2); | ||||
| 			/* ANI2 is always formatted as two digits: | ||||
| 			 * https://nanpa.com/numbering/ani-ii-digits */ | ||||
| 			snprintf(buf, len, "%02d", ast_channel_caller(chan)->ani2); | ||||
| 		} else if (!strcasecmp("ani", member.subnames[0])) { | ||||
| 			if (member.argc == 1) { | ||||
| 				/* Setup as if user had given ani-num instead. */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user