Hi all. I’m fairly new to asterisk/freepbx, so please bear with me.
We have a call file being created and being dropped into the asterisk/outbound folder. Asterisk promptly picks up the file and makes the call. It then logs the results (duration, etc.) in the asteriskcdrdb.cdr table.
I’m trying to find out how I can link these up 100% of the time. If I have a call go out, I want to be able to go back and look up the duration of that call in the CDR table. But, I want to be sure I got the same call. I can’t just look for a match on source and destination because the same call could have been made more than once.
What I was thinking was that there is a ‘uniqueid’ column in the cdr table that doesn’t seem to be used. I’m wondering if there is a way I can set a ‘uniqueid’ in the call file so that when the call is made and the CDR table is updated, the uniqueid will get populated into the cdr table.
Is this possible? Or is there a better way to accomplish what I’m trying to do and be sure I’ve got the duration of the right call?