asterisk billing : Insert account code in call detail records (CDR)

So, in asterisk, you already have your CDR in a file or in a database.

Now, you have customers with different customer id or account code and you want to have a way to know which call belong to which customer.

You can set a channel CDR account field. At the end of the call,  when the cdr will be post in your file or database, the accountcode field will be fill.

To do so, call the following in your dialplan or agi script

exten => 1,n,Set(CDR(accountcode)=XXXXX)

Where XXXXX  should be replace by the customer account code.

You can then join that information to the one you already have in your client table or crm

Comments

Leave a Reply