I’ve got a part of dialplan, I’m using to test dialplan expressions. For these expressions, I don’t want any CDR entry to be generated while executing the corresponding dialplan part.
How can I do that ?
I’ve lately discovered CDR_PROP() function I’m probably mis-using it.
My Asterisk version is 20.9.
My unsuccessful attempts used Set(CDR_PROP(disable)=1) or Set(CDR_PROP(disable)=yes).
[foo]
exten = 1,1,Set(CDR_PROP(disable)=yes)
same = n,Set(FOO=foobar)
same = n,Verbose(0,Stripped FOO is ${FOO:1:3} )
same = n,Hangup()
In [1], it is mentioned that “This application is deprecated. Please use the CDR_PROP function to disable CDRs on a channel.”
I’ll try to better understand CDR_PROP function’s limits before retrying with NoCDR() (which is absent from Asterisk 22).
With the following dialplan and channel originate Local/1@foo application Noop, a CDR is generated. I would expect no CDR to be generated.
Maybe, this comes from Local to PJSIP inheritance.
[foo]
exten = 1,1,Set(CDR_PROP(disable)=1)
same = n,Set(FOO=foobar)
same = n,Verbose(0,Stripped FOO is ${FOO:1:3} )
same = n,Hangup()
No, because there are two channels as a result of that each with their own CDR. A ;1 leg which has CDR_PROP called on it to disable, and another that merely calls NoOp which I would expect to have a CDR.
What shall I expect with originate Local/1@bar extension 2@bar and :
[bar]
exten = 1,1,Set(CDR_PROP(disable)=1)
same = n,Set(FOO=foobar)
same = n,Verbose(0,Stripped FOO is ${FOO:1:3} )
same = n,Hangup()
exten = 2,1,Set(CDR_PROP(disable)=1)
same = n,Hangup()
I’ve got a cdr_adaptive_odbc.conf configured. It requires some CDR variables which are not set in the above [bar] context. This triggers errors which are the reason I tried to disable CDR creation.
I can simplify things to the point these errors (the ones due to missing variables) disappear.
Do you want me to try this ?