Creating a Custom Dest to record values in CDR

(Lorne Gaetz) #1

I don’t think I’ve ever shared this before and it’s a request that comes up from time to time. If you want to use the CDR userfield to store information during a call flow, you can do that with a Custom Destination and this dialplan in extensions_custom.conf

exten => s,1,Noop(Entering user defined context set-cdr-userfield in extensions_custom.conf)
exten => s,n,Set(CDR(userfield)=${ARG1})
exten => s,n,Return

Create a Custom Destination for each value you want to store, it will look something like this:

You pass the value you want recorded in the CDR in the parentheses of the target, it does not have to be numeric. The return option must be enabled and you must select a destination to proceed to after the Custom Dest.

With the above you could use this destination in an IVR in order to record a value associated with an IVR option, etc. You need a separate Custom Destination for each call flow, but you can reuse the dialplan over and over for them all. You can even use Asterisk channel variables in the parentheses like normal enclosing in ${xxxx}.

(Lorne Gaetz) closed #2

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.