[asterisk-users] CDR

Philipp Kempgen philipp.kempgen at amooma.de
Tue Oct 16 19:41:27 CDT 2007


Steve Murphy wrote:

> It's not a bad idea, but I think the philosophy would be that whatever
> turns CDR records into billing statements could/should/would decide
> which to skip, and which to process, and not something in Asterisk. It's
> "easier" just to state what happens, and let each org that uses the data
> decide what to do with it.

I like that approach. I think it should be possible to tell exactly
what happened just by looking at the CDRs (e.g. who transferred
which call to whom etc.)

> As far as picking up handsets, and dropping them again, such would
> always have 0 duration and billsec figures, because an answer is needed
> for either field to be greater than zero. I guess in this regime, they'd
> all be dropped if you set your threshold at 1 or more...

Dropping records with duration == 0 is an easy task for custom
post-processing. Even more so if you store your CDRs in an SQL
database.

> For instance, if Zap/52 dials Zap/51,

52 --- dials & talks ---> 51

> who hookflashes and dials Zap/50,

51 ------- dials -------> 50

> and 51 hangs up, leaving 52 and 50 to talk away,

52 ------- talks -------> 50

> we should get 1 cdr
> that records the call from 52 to 51, which would last until the
> hookflash;

No doubt about it.

> and a second CDR that would be from 51 to 50, which would
> start at either chan 50/51 channel creation time, or even at hookflash
> time, have an answer time when 50 picked up, and last until either 50 or
> 52 hang up.

Right. But why should it start at 50->51 channel creation time?
That way you would think (by looking at the CDRs) that 51 talked to
50 for longer than they did. I'd prefer hookflash time.

> Even tho 52 and 50 might talk an hour, 51 is the one who
> dialed, and therefore seems naturally responsible for the call...

51 is responsible, correct. But the fact that it was 52 (not 51)
who talked to 50 might be equally important.

How about splitting the "src" into "rsp" (who's responsible for the
call, i.e. who should pay the bill) and "src" (who was involved in
the audio bridge)?

Example:
rsp  src  dst  duration  billsec
52    52   51       130      120
51    51   50        10        5
51    52   50      3610     3600

> You'd not believe how tricky getting these sequences to generate the
> "right" CDR data can be! It's almost humorous!

This could be much easier if Asterisk did not have fancy
features like transfers etc. ;)

Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
    Let's use IT to solve problems and not to create new ones.
          Asterisk? -> http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998



More information about the asterisk-users mailing list