Is it possible to tell asterisk to store cdr records into different tables? I’d preferably like to do it based on the account code field.
I could do a script to do this periodically but I wondered if there was a better way
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, this is doable. You didn’t specify a CDR backend, and not all CDR backends are capable of this – but this is possible in cdr_adaptive_odbc.
You would set up a separate context for each table that you want to store a CDR record in, then use a filter to match on columns. Any CDR record that does not explicitly match a filter gets discarded. Note that the filters do support negation using the ‘!’ character.
For example, say we have accountcode foo and accountcode bar – to be stored in tables cdr_foo and cdr_bar. We could set this up as follows: