<div dir="ltr">If you need something quick you could create a batch script with sed or awk to remove the log lines you want and attach it to the prerotate script of logrotate (in case you use any of these in your env). Certainly this is not a final solution but it is already something that doesn't depend on an asterisk patch.....<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 10 Jul 2021 at 01:13, Dovid Bender <<a href="mailto:dovid@telecurve.com">dovid@telecurve.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 9, 2021 at 10:49 AM George Joseph <<a href="mailto:gjoseph@sangoma.com" target="_blank">gjoseph@sangoma.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 8, 2021 at 3:58 PM Dovid Bender <<a href="mailto:dovid@telecurve.com" target="_blank">dovid@telecurve.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>We have a project where people will be making payments over the phone. I would like block Asterisk from logging any time the system is processing a card. So be it SayDigits(123456789), when the user enters DTMF or when I pass a card number as a variable to an AGI etc. I assume this affects others and I would like to have the patch created in a way that a. will be accepted by Sangoma and b. will work for anyone else that has this issue.</div></div></blockquote><div><br></div><div>Are you talking strictly about normal messages generated by the dialplan or all messages, even warnings, errors, etc generated internally? </div><div><br></div></div></div></blockquote><div>Mainly verbose messages (so no warnings, errors etc.) </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> My idea was to have a channel variable for exampleSet(CHANNEL(LOG_DIGITS)=OFF) and then have ast_logger check to see if the variable is set.</div></div></blockquote><div><br></div><div>Would you need to do this on a channel-by-channel basis or could you set a global variable?</div></div></div></blockquote><div>Because we would want to enable and disable it. Meaning we want all the logging on in general however at certain times where there is sensitive information we would not want it logged</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>The problem I faced that wherever the logger is called a string is passed. So any digits (e.g. channel ID, thread ID etc.) would have the digits removed which I assume would hurt people. My solution was to have a configuration file where you would put in regex strings that we would replace. For instance if I set LOG_DIGITS=OFF and in the Dialplan I had<br>CARD=4111111111111111</div><div>EXP_MOTH=12</div><div>EXP_YEAR=2025</div></div></blockquote><div><br></div><div>Are those variables set on the channel?</div></div></div></blockquote><div>Yes they are. For instance Exten => _XX,1,Set(Month=${EXTEN}) </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>In the configuration file I would have</div><div>CARD=([0-9]{15,16})</div><div>EXP_MONTH=([1-2]?[0-9])</div><div>EXP_YEAR=(202[5-9])</div></div></blockquote><div><br></div><div>I'd skip the config file and make teh regexes global dialplan variables.</div></div></div></blockquote><div>But then how would you have multiple? Have the strings comma delimited or one large string (e.g. CARD=([0-9]{15,16})|EXP_MONTH=([1-2]?[0-9])|EXP_YEAR=(202[5-9])). One possible is the limit of a line in Asterisk if I recall correctly, was 256 characters.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br>The system would then look for any of the above expressions and then replace the numbers with an X. Does that seem like a patch that would get accepted? is that completely in left field? Any thoughts on a better way of doing it? I know I can change the verbosity to 0 but then I would get nothing at all in the logs.</div><div><br></div><div>TIA.</div><div><br></div><div>Dovid</div><div><br></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div>