[Asterisk-Users] Call Rate in CDR

Ernest W. Lessenger ernest at oacys.com
Sat Nov 8 14:39:09 MST 2003


At 01:08 PM 11/8/2003, you wrote:
>So what do people think about adding the "call rate" to the CDR
>structure??

Sounds great, but there's one problem. How does asterisk know what the 
current rate in effect is? I can think of several ways to do this, but they 
all involve some fairly significant C coding.

>or is their a better way to do this.

I just use a perl script. The CDR record tells me the number dialed and the 
channel that handled the far end of the call. Based on that I can tell 
which provider was used, what number was called, how long the call lasted 
and when the call was made. That's more than enough information to 
calculate rates. Parse that file once an hour/day and there you go.

--Ernest 




More information about the asterisk-users mailing list