[Asterisk-Users] CDR query

Alex Brett alex.brett at loho.co.uk
Mon Apr 17 06:58:33 MST 2006


Alex Brett wrote:
> 
> The problem I have, is that the 'billsec' field in the CDR records, only 
> starts ticking if I accept the call, so it isn't including the time that 
> I have answered the call on my mobile, but not actually accepted the 
> call, which means if I reject the call or whatever, then it doesn't log 
> the fact that I have actually spent money making a PSTN phone call...
> 
> What I guess I'm looking for is some sort of command to put into my 
> macro to start the 'billsec' counting, does anybody know if such a thing 
> exists, or if there is some other way of getting round this problem?
> 
> (I could just use the 'duration' field, but this would include time 
> where it was merely ringing and I'm not actually being charged etc).
> 

For anybody interested, I got round this by hacking at app_dial.c and 
adding an extra flag (b) that will set the CDR record as answered as 
soon as it starts the macro. Now billsec is accurate, only downside 
being that it shows all the calls as ANSWERED even if the callee 
rejected it or whatever - I'm looking at finding a way round that, then 
if I can make it nice enough I'll submit a patch etc - contact me 
off-list if you want it in it's present state...

Alex

-- 
Alex Brett
alex.brett at loho.co.uk
http://www.loho.co.uk/




More information about the asterisk-users mailing list