> On Friday 11 September 2009 11:05:36 am Patrick wrote:
>>
>> I've migrated from CSV CDR to MySql CDR and the customization of my 
>> CDR's is not working anymore.
>>
>> Do you know if the cdr_mysql is supporting custom cdr's ? If not, is 
>> there any alternative/workaround ?

On Fri, 11 Sep 2009, Tilghman Lesher wrote:

> This module doesn't support custom CDRs, but starting in 1.6.0, it 
> supports something even better:  the ability to automatically map CDR 
> variables directly into columns of the same name.  You can also alias 
> various CDR variables into columns of different names, with the 
> [aliases] configuration section.  See the sample configuration file for 
> more details.

I'm a 1.2 Luddite, but I found cdr_addon_mysql.c pretty easy to hack on. 
For example, I added a channel variable named PRODUCT. Here's the code I 
used:

        channel_pointer = ast_get_channel_by_name_locked(channel);
        product_pointer = pbx_builtin_getvar_helper(channel_pointer
                , "PRODUCT");

and then add ",product", ",'%s'" and product_pointer to the sprintf that 
builds the insert statement.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to