Skip to content
Snippets Groups Projects
Commit 2d0eee54 authored by Frederic LE FOLL's avatar Frederic LE FOLL
Browse files

ChanIsAvail() generates a CDR when unanswered=yes in cdr.conf.

ChanIsAvail() creates a temporary channel with ast_request() to test
resource availability. It should not generate a CDR when it hangs up
this temporary channel.

This patch disables CDR generation for the temporary channel with
ast_cdr_set_property().

ASTERISK-28527

Change-Id: I7b0555c6909c7d322e452dde97c9ea5b111552d1
parent 1839224c
No related branches found
No related tags found
No related merge requests found
......@@ -178,6 +178,9 @@ static int chanavail_exec(struct ast_channel *chan, const char *data)
snprintf(tmp, sizeof(tmp), "%d", status);
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);
ast_hangup(tempchan);
tempchan = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment