[asterisk-users] Setting custom field in CDR

Atis Lezdins atis at iq-labs.net
Thu Dec 6 10:39:47 CST 2007


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



More information about the asterisk-users mailing list