I'm writing CDR to mssql table with cdr_adaptive_odbc. This works fine in the sense that the record is written after the call.
But I'd like to write a cdr_record when the call comes in, before it is answered/aborted.
Reason: I'd like to add a function in our CRM-system: click this button and see the phonenumber of the incoming call, where the CDR-record is "ringing" or something. Then match the phonenumber with customer records, and show caller info on screen.
(I don't want to push the number to the CRM, it has to be a pull)
I have tried this:
exten => 13,1,noop() same => n,forkcdr() same => n,Wait(2) same => n,dial(SIP/L13) same => n,hangup()
but that does not create a new record in the database.