[OpenSIPS-Users] CDRTool Prepaid and Radius don't match

Douglas Lane doug at wd.co.za
Tue Apr 27 11:59:13 CEST 2010


On 2010/04/26 9:19 PM, Adrian Georgescu wrote:
> Prepaid history is updated when DebitBalance is called by Call control
> module from OpenSIPS.
>
> If this function is called when the call ends (for which you must
> properly configure OpenSIPS and MediaProxy ) than you do not lose
> money but rather your simply have duplicated radius records likely
> caused by multiple messages being retransmitted or wrong configuration
> of the accounting part.
>
> You can check the syslog on OpenSIPS and CallControl for the calls in
> question (namely when they start and when they stop) and match them
> against the syslog entries for MaxSessionTime and DebitBalance in
> CDRTool rating engine. The Call Id is the key that can be matched in
> all logs.
>
> Than you have a better picture of what happens, if you loose or not
> any records in prepaid table.
>
> Adrian
>
> On Apr 26, 2010, at 9:09 PM, Douglas Lane wrote:
>
>    
>> Hey Guys,
>>
>> Sorry for all the dumb questions lately, been trying to work out whats
>> going wrong.
>>
>> I make use of the prepaid_history table in CDRTool to calculate the
>> daily usage for clients, and then email them a summary as well as
>> their
>> remaining balance. What I've recently noticed when doing an LEFT JOIN
>> between Radius and prepaid_history, is that radius has a load more
>> callid entries that prepaid_history does for the same user (and yes I
>> did a filter on SipMethod = 200) This concerns me as technically,
>> cdrtool is not updating the prepaid_history database correctly, and
>> therefore is actually loosing money.
>>      
>    
>> Anyone else having the same issues, or perhaps can point me in the
>> direction I need to troubleshoot at. I've check the logs and there is
>> nothing for mysql errors. Every call I've checked has a debit balance
>> request, but my concern is that some of them are not updating the
>> table.
>>
>> Thanks
>> Doug
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>      
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>    
Hi Adrian,

I took an example of a session that was in Radius but not in 
prepaid_history, and found that when the Debit Balance was run, cdrtool 
returned : "Error session does not exist". And a little further up the 
log files I see a report from cdrtool - "Session has expired since 135 
seconds".

I will admit that it seems to have stopped after the 23rd of this month. 
Previously I had an issue with callcontrol, but this was due to me 
running callcontrol(), then calling xlog to show the retcode, and then 
doing a switch on the retcode after the xlog (therefore the switch was 
acting on the xlog return code and not callcontrol).

I'll monitor it closely, but do you think the above retcode thing would 
have caused an issue with cdrtool not finding the odd session?

Any suggestions on this one?

Thanks
Doug




More information about the Users mailing list