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

Douglas Lane doug at wd.co.za
Thu May 6 20:40:35 CEST 2010


Hi Adrian,

Any further suggestions on this? I just don't know where to look, as I 
can't see any errors being generated other than the dialog expiring and 
cdrtool failing to execute the debitbalance call.

What else shall I provide you to diagnose further? Or where else can I 
look to understand whats failing?

Thanks
Doug


On 2010/05/05 6:11 PM, Adrian Georgescu wrote:
> Are you also using MediaProxy to close the calls that have RTP timeout?
>
> Adrian
>
> On May 5, 2010, at 6:05 PM, Douglas Lane wrote:
>
>    
>> Hi Adrian,
>>
>> Below is a log from our billing server - the server that runs cdrtool,
>> freeradius and mysql:
>> May  5 09:29:40 billing cdrtool[17219]: Maximum duration for session
>> 4885f4b54051459e714848e243ecd742 at domain.com of telefusion at domain.com to
>> destination 2783 having balance=15060.9566 is 3190
>> May  5 09:29:43 billing cdrtool[17219]: Session
>> 4885f4b54051459e714848e243ecd742 at domain.com for telefusion at domain.com
>> has expired since 121 seconds May  5 09:40:45 billing cdrtool[17219]:
>> DebitBalance Duration=1075.50027394
>> CallId=4885f4b54051459e714848e243ecd742 at domain.com
>> From=sip:telefusion at domain.com Gateway=1.2.3.4 To=sip:0837256524 at domain.com
>> May  5 09:40:45 billing cdrtool[17219]: ConnectFee=0.0000
>> CallId=4885f4b54051459e714848e243ecd742 at domain.com Span=1 Duration=1075
>> DestId=2783 subscriber=telefusion at domain.com
>> Profile=telefusion_spl_wkday Period=weekday Rate=telefusion_spl_peak
>> Interval=7-19 Cost=1.0500/60 Price=18.8125 PriceIn=17.9167
>> May  5 09:40:45 billing cdrtool[17219]: Error: session
>> 4885f4b54051459e714848e243ecd742 at domain.com of telefusion at domain.com
>> does not exist
>> May  5 09:45:02 billing cdrtool[20233]: ConnectFee=0.0000
>> CallId=4885f4b54051459e714848e243ecd742 at domain.com Span=1 Duration=1075
>> DestId=2783 subscriber=telefusion at domain.com
>> Profile=telefusion_spl_wkday Period=weekday Rate=telefusion_spl_peak
>> Interval=7-19 Cost=1.0500/60 Price=18.8125 PriceIn=17.9167
>>
>>
>> And below is the log extract from OpenSIPS:
>> May  5 09:40:46 sbc1 call-control[4358]: warning: Rating engine failed
>> query: DebitBalance Duration=1075.50027394
>> CallId=4885f4b54051459e714848e243ecd742 at domain.com
>> From=sip:telefusion at domain.com Gate
>> way=1.2.3.4 To=sip:0837256524 at domain.com
>> May  5 09:40:46 sbc1 call-control[4358]: Could not debit balance for
>> call id 4885f4b54051459e714848e243ecd742 at domain.com of
>> telefusion at domain.com to sip:0837256524 at domain.com
>> May  5 09:40:46 sbc1 /opt/opensips/sbin/opensips[27232]:
>> DBG:dialog:destroy_dlg: dlg expired or not in list - dlg 0x7f529edae8c8
>> [2773:299621302] with clid '4885f4b54051459e714848e243ecd742 at domain.com' an
>> d tags 'as4b9756d1' 'as2e1a01fc'
>>
>> Now my concern is why this is happening. About 80% of all calls on this
>> account are fine, its just these odd calls that don't get billed
>> correctly by the prepaid service.
>>
>> Any ideas on this?
>>
>> Thanks
>> Doug
>>
>>
>> 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
>>>
>>>        
>> _______________________________________________
>> 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
>    



More information about the Users mailing list