Hi, The Asterisk Wiki (page: http://www.voip-info.org/wiki/view/Asterisk+func+cdr) mentions I can set any custom CDR field I want. Here is the example it gives: ; Update our accountcode field and then save some random music facts too exten => s,1,Set(CDR(accountcode)=8675309) exten => s,2,Set(CDR(MyFavoriteBand)=Foo Fighters) exten => s,3,Set(CDR(MyFavoriteSong)=Hero) I am using CDR on MySQL. I tried this, with a new colum called MyFavoriteSong. Guess what? That field wasn`t populated at all. Anything else I should be doing? Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071206/9427c4c6/attachment.htm
Mike wrote:> Hi, > > The Asterisk Wiki (page: > http://www.voip-info.org/wiki/view/Asterisk+func+cdr) mentions I can set > any custom CDR field I want. Here is the example it gives: > > ; Update our accountcode field and then save some random music facts too > exten => s,1,Set(CDR(accountcode)=8675309) > exten => s,2,Set(CDR(MyFavoriteBand)=Foo Fighters) > exten => s,3,Set(CDR(MyFavoriteSong)=Hero) > > I am using CDR on MySQL. I tried this, with a new colum called > MyFavoriteSong. Guess what? That field wasn`t populated at all. > > Anything else I should be doing?Won't work yet, not implemented for MySQL CDR engine. Maybe in 1.6. Only custom field you can use for now is CDR(userfield) and if you want multiple values, you can separate them by something like # Regards, Atis
On Thu, 2007-12-06 at 10:37 -0500, Mike wrote:> Hi, > > The Asterisk Wiki (page: http://www.voip-info.org/wiki/view/Asterisk > +func+cdr) mentions I can set any custom CDR field I want. Here is > the example it gives: > > ; Update our accountcode field and then save some random music facts too > exten => s,1,Set(CDR(accountcode)=8675309) > exten => s,2,Set(CDR(MyFavoriteBand)=Foo Fighters) > exten => s,3,Set(CDR(MyFavoriteSong)=Hero) > > I am using CDR on MySQL. I tried this, with a new colum called > MyFavoriteSong. Guess what? That field wasn`t populated at all. > > Anything else I should be doing?The custom fields in CDR only work in the CSV file. CDR in Mysql cannot accept those custom fields.>-- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez Prats Director de Tecnolog?a +52-55-91169161 ext 2001 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20071206/7e06d220/attachment.pgp
On Thu, 6 Dec 2007, Atis Lezdins wrote:> Only custom field you can use for now is CDR(userfield) and if you want > multiple values, you can separate them by something like #Adding multiple fields using userfield is a major hack that will repeatedly bite you for years. cdr_addon_mysql.c in the Asterisk addons package works great. It will take a minor bit of C skills to cut and paste to add new columns. Thanks in advance, ------------------------------------------------------------------------ Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000