How to get AMDSTATUS as a result running AMD() in CDR

I have written a routine to deliver spoken messages with the following scheme

call file is generate

this file calls local channel (which is in fact a context, extension, priority combination)

this local channel calls phone number with the Dial() cmd and use of the M option (after setting the connection the channel run into a macro)

In this macro AMD() is used (answering machine detection) and it works pretty well so it is interesting to store the status in cdr so I can show how many calls are delivered to a real person and how many ends up in a recording machine/mobile voicemail box. AMD() also takes care about the proper start (after the beep) of the message to be delivered.

AMD() generates a status variable AMDSTATUS wich can have a couple of different values like HUMAN MACHINE UNSURE.

What I want is to store this value into the CDR(userfield) but for some reason I can’t get this up and running. The stupid thing is that it has worked but I have been to enthousiastic with cleaning up my code without proper preperation like doing an old fashioned thing like making a backup and today I found out that it isn’t working anymore. I run but I also tried . What is the easiest way to get this info into the CDR mysql database as part of the record with al the other relevant info.

Thank in advance.

I start using a local file because calls generated by a call file weren’t properly logged in cdr and using a local channel that made the actual call solved this problem.

With the newest version ( there is no need to use a local channel and the call file itself can set up the call.

After some testing and trying I found out that with the newest version and without the workaround everything works fine.