[Asterisk-code-review] ChanIsAvail() generates a CDR when unanswered=yes in cdr.conf. (...asterisk[16])
Joshua Colp
asteriskteam at digium.com
Wed Sep 11 09:27:01 CDT 2019
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/12848 )
Change subject: ChanIsAvail() generates a CDR when unanswered=yes in cdr.conf.
......................................................................
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
---
M apps/app_chanisavail.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 70325b3..446bce1 100644
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -178,6 +178,9 @@
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;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12848
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I7b0555c6909c7d322e452dde97c9ea5b111552d1
Gerrit-Change-Number: 12848
Gerrit-PatchSet: 1
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190911/0cbab1ac/attachment.html>
More information about the asterisk-code-review
mailing list