This there a Variable IVR that will write to CDR?

Looking for an IVR option that will allow a database look up and also report to CDR report. For example, an employee needs to call off, calls into the IVR, enters the employee number, system verifies the employee number, the employee would then select the reason for call off. In the CDR report you’d be able to see the employee number, reason for call off. Currently the DTMF for the IVR isn’t included in the CDR report.

You can use the CDR() dialplan function to write user-defined data to the “userfield” field in the CDR records. For example, something like this would probably work (I haven’t tested) to write the string “Out sick” to the userfield field and then hangup the call.

[sample-ivr]
exten => 1,1,Set(CDR(userfield)=Out sick)
exten => 1,2,Playback(vm-goodbye)
exten => 1,3,Hangup()

For more information on the CDR dialplan function, see https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_CDR

There are no native features to do this, but all the GUI stuff can be done using the third party module Dynroutes. You will probably need some dialplan/agi/script to do the database checks.