mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Merge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR."
This commit is contained in:
		| @@ -134,6 +134,8 @@ static int chanavail_exec(struct ast_channel *chan, const char *data) | ||||
| 	} | ||||
| 	peers = args.reqchans; | ||||
| 	if (peers) { | ||||
| 		struct ast_custom_function *cdr_prop_func = ast_custom_function_find("CDR_PROP"); | ||||
|  | ||||
| 		cur = peers; | ||||
| 		do { | ||||
| 			/* remember where to start next time */ | ||||
| @@ -179,7 +181,9 @@ static int chanavail_exec(struct ast_channel *chan, const char *data) | ||||
| 					ast_str_append(&tmp_availcause, 0, "%s%s", ast_str_strlen(tmp_availcause) ? "&" : "", tmp); | ||||
|  | ||||
| 					/* Disable CDR for this temporary channel. */ | ||||
| 					ast_cdr_set_property(ast_channel_name(tempchan), AST_CDR_FLAG_DISABLE_ALL); | ||||
| 					if (cdr_prop_func) { | ||||
| 						ast_func_write(tempchan, "CDR_PROP(disable)", "1"); | ||||
| 					} | ||||
|  | ||||
| 					ast_hangup(tempchan); | ||||
| 					tempchan = NULL; | ||||
| @@ -212,4 +216,9 @@ static int load_module(void) | ||||
| 		AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS; | ||||
| } | ||||
|  | ||||
| AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Check channel availability"); | ||||
| AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Check channel availability", | ||||
| 	.support_level = AST_MODULE_SUPPORT_EXTENDED, | ||||
| 	.load = load_module, | ||||
| 	.unload = unload_module, | ||||
| 	.optional_modules = "func_cdr" | ||||
| ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user