CDR Accounting Problem

I have a problem with the CDR.
We terminate through a pstn provider to the pstn network.
The problem is now the cdr accounts the connection to the gateway. Coz the gateway is answering our call and then forward to the pstn number.
So i have billsecs all the time even it is only ringing or so.
Somebody has a solution for that?

-- Executing Dial("SIP/1000114-fcf8", "SIP/|60") in new stack
-- Called 409204*
-- SIP/ is making progress passing it to SIP/1000114-fcf8
-- SIP/ answered SIP/1000114-fcf8
-- Attempting native bridge of SIP/1000114-fcf8 and SIP/

Regards rene

I can’t see how there can be a solution to that - Asterisk can’t know what’s happening at the other end, apart from what the gateway tells it. You could either ask your service provider to change the way they operate, or change service providers.

Does the service provider charge from when they answer the call, or from when the called party answers the call?

they only charge when the connect from them to the 3th party is connected but i have to account this for my customers :frowning:

Well, it’s just possible that somebody else may have a solution that hasn’t occurred to me…

this is a problem with how your gateway (and many others) operates.

Asterisk sets up the call, the gateway accepts it, and dials. As soon as it’s done dialing, it considers the call ‘connected’ and starts passing audio from the line to the SIP user. If there’s an error tone of some kind, the user hears it verbatim. The problem is it screws up CDR.

If this was a zaptel channel you could turn on call progress detection which might help, but it’s not zaptel. Your gateway however may have something equivalent. It’s difficult tho to detect when ringing exactly ends (talking theoretically now), it can listen for voice or the absence of a ring, but without some kind of out of band signalling, it’s just guessing.

If you want to be able to rectify your CDR against your telco bills, an analog gateway device isn’t the way, the best it will ever get is to be accurate to within 5-10 seconds even if it has the most awesome call progress detection. You need some kind of system with out-of-band call signalling, that can be BRI ISDN, a PRI (T1/E1/etc), or a VoIP channel to a VoIP service provider if you want very accurate records.