I added a new field in the CDR table.
The intention is that this field will receive a unique code that I send when creating the call.
So I added the alias to cdr_adaptive_odbc.conf, and everything works fine for calls that are answered.
However, when any call fails, the custom field is not filled in the CDR, and 3 records are inserted for the failed call.
All calls are outgoing only.
I use a PHP script to create the calls.