[Asterisk-Users] CDR writing incorrect data to pgsql tables

Peter Corlett abuse at cabal.org.uk
Fri Feb 25 08:37:35 MST 2005


James Bean <james at hdcs.com.au> wrote:
[...]
> Is the kludge done at the software side when the data is pulled out
> for accounting and being under say 45 seconds is a no answer or
> busy? Or is there a tweak that can be done at the database itself?

Since you're using PostgreSQL, you can use a trigger to mangle the
data before it hits the database. In fact, there's no reason why you
couldn't log to a view rather than a table (but again, you will need a
trigger for the actual INSERT.)

For MySQL and other glorified flat-file databases, you would need to
postprocess the data. You may feel more confident skipping triggers
and doing this anyway.

> So by that any calls that go out over the net using IAX to the telco
> are considered digital and will report correctly?

Yes. You will probably be able to make the simple assumption that if
dstchannel ILIKE 'Zap/%' , you're going to have to fudge it, otherwise
it's correctly recorded.

-- 
The intuitive mind is a sacred gift and the rational mind is a faithful
servant. We have created a society that honors the servant and has forgotten
the gift.
							- Albert Einstein



More information about the asterisk-users mailing list