[OpenSIPS-Users] call duration problem

Francisco Franco francisco.franco at recargaexpress.com
Wed Aug 8 16:45:53 CEST 2012


Hi,

I solve the problem.

The issue was that freeradius was not accounting the STOP event because 
an sql error ocurred in a call to procedure /update_radacct_record

/I modified sql.conf and problem is solved.

This is the original

/accounting_stop_query       = "\
           CALL update_radacct_record( \
                 'radius', \
                 '%S', \
                 '%{Acct-Delay-Time}', \
                 '%{Connect-Info}', \
                 '%{X-RTP-Stat}', \
                 '%{Acct-Session-Id}', \
                 '%{Sip-To-Tag}', \
                 '%{Sip-From-Tag}' \
                 )"/


and this is the modified

/accounting_stop_query       = "\
           CALL update_radacct_record( \
                 'radius', \
                 '%S', \
                 '%{Acct-Delay-Time}', \
                 '', \
                 '', \
                 '%{Acct-Session-Id}', \
                 '%{Sip-To-Tag}', \
                 '%{Sip-From-Tag}' \
                 )"/


I hope that this help someone!!
/

/El 25/07/12 15:31, Stefano Pisani escribió:
> That seems to be fine.
> Are you sure that the call duration are more than OK-BYE time?
>
> s
>
> Il 25/07/2012 14:02, Francisco Franco ha scritto:
>> I am using this options
>>
>> /# ----- acc params -----
>>
>> modparam("acc", "early_media", 0)
>> modparam("acc", "report_ack", 0)
>> modparam("acc", "report_cancels", 0)
>>
>> modparam("acc", "detect_direction", 0)
>>
>> modparam("acc", "failed_transaction_flag", 3)
>> modparam("acc", "log_level", 1)
>> modparam("acc", "log_flag", 1)
>> modparam("acc", "log_missed_flag", 2)
>>
>> modparam("acc", "db_flag", 1)
>> modparam("acc", "db_missed_flag", 2)
>> modparam("acc", "db_url", "mysql://opensips:*******@localhost/opensips")
>> modparam("acc", "aaa_url", "radius:/etc/opensips/radius/client.conf")
>> modparam("acc", "aaa_flag", 1)
>> modparam("acc", "aaa_missed_flag", 2)
>> modparam("acc", "aaa_extra", "User-Name=$Au; \
>>                                  Calling-Station-Id=$from; \
>>                                  Called-Station-Id=$to; \
>> Sip-Translated-Request-URI=$ru; \
>>                                  Sip-RPid=$avp(s:rpid); \
>> Source-IP=$avp(s:source_ip); \
>> Source-Port=$avp(s:source_port); \
>> SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>> Canonical-URI=$avp(s:can_uri); \
>> Billing-Party=$avp(s:billing_party); \
>> Divert-Reason=$avp(s:divert_reason); \
>> User-Agent=$hdr(user-agent); \
>>                                  Contact=$hdr(contact); \
>>                                  Event=$hdr(event); \
>>                                  ENUM-TLD=$avp(s:enum_tld)")/
>> ___________________________________________________________________________
>> Francisco Franco Gallego
>> Analista Programador
>> Grupo IdeaSoluciones.com
>> Calle Jerónimo Santa Fe, 80 1º
>> 30800 Lorca (Murcia) España
>> Tlf: +34 968 970 037
>> El 24/07/12 20:53, Stefano Pisani escribió:
>>> Try using this option
>>>
>>> modparam("acc", "early_media", 0)
>>>
>>> regards,
>>> s
>>>
>>> Il 24/07/2012 19:55, Francisco Franco ha scritto:
>>>> Hi,
>>>>
>>>> I have opensips 1.6 runing with mediaproxy and have a problem with 
>>>> call duration accounting.
>>>>
>>>> The session duration that is stored in database is total time from 
>>>> call start ringing, but for billing correctly, time should be start 
>>>> when callee pick up.
>>>>
>>>> How can i solve it?
>>>>
>>>> regards.
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120808/d7aa3341/attachment.htm>


More information about the Users mailing list