How to intercept the CDR

Hello,

I need to be able to correct the call source before entering the record into the CDR table.

How to implement?

Thanks

Create an sql trigger. If you need vars from asterisk add them with CDR()