[OpenSIPS-Users] opensips CDR acc with radius

Miha miha at softnet.si
Tue Oct 15 15:11:44 CEST 2013


Marcel,

I do not understand you just right.

So, accouting is send or is not send:)?

Did you include:


ATTRIBUTE Sip-Call-Duration    227  integer

ATTRIBUTE Sip-Call-Setuptime   228  integer

alse this on radius server site or just on client?

miha

Dne 10/15/2013 3:01 PM, pis(e Marcel Sicking:
>
> Hello,
>
> I have a problem sending CDRs to my radius server.
>
> I have setup accounting properly in opensips.conf:
>
> #### ACCounting module
>
> loadmodule "acc.so"
>
> modparam("acc", "aaa_url", 
> "radius:/etc/radiusclient-ng/radiusclient.conf")
>
> modparam("acc", "aaa_extra", "User-Name=$Au")
>
> modparam("acc", "early_media", 0)
>
> modparam("acc", "report_cancels", 0)
>
> modparam("acc", "detect_direction", 0)
>
> modparam("acc", "failed_transaction_flag", "ACC_FAILED")
>
> modparam("acc", "log_flag", "ACC_DO")
>
> modparam("acc", "log_missed_flag", "ACC_MISSED")
>
> modparam("acc", "aaa_flag", "ACC_DO")
>
> modparam("acc", "cdr_flag", "CDR_FLAG")
>
> I set the flag correct for INVITEs:
>
> if (is_method("INVITE")) {
>
>  setflag(CDR_FLAG);
>
>         setflag(ACC_DO); # do accounting
>
> }
>
> The radius client is also setup correctly.
>
> I know that because I can see the "normal" accounting messages are 
> sent (accounting request/response).
>
> With "normal" I mean those without the extra information for e.g. call 
> duration (which have the flag "ACC_DO")
>
> I have also extended the dictionary with these two entries:
>
> ATTRIBUTE Sip-Call-Duration    227  integer
>
> ATTRIBUTE Sip-Call-Setuptime   228  integer
>
> When looking into the syslog, there is a line wich contains the cdr data:
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:dlg_onroute: BYE successfully processed - dst_leg = 0
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:run_dlg_callbacks: dialog=0xb4ae016c, type=32
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_core>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <#006>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_log>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_leg>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_created>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <<B1>5]R>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:acc:acc_log_cdrs: core+extra = 6 - nr_legs = 0 - nr_vals = 0
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:acc:acc_log_cdrs: not entering
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: ACC: call 
> ended: 
> created=1381840305;call_start_time=1381840311;duration=5;setuptime=6;method=INVITE;from_tag=216620847;to_tag=C9D83241313536414778ED9F;call_id=00238360-0334-E311-8D1B-08002700E8C5 at 10.10.1.242;code=200;reason=OK
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_core>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <#006>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_aaa>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <#001>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_leg>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <>!
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: looking for <accX_created>
>
> Oct 15 14:31:56 opsbc-2 /usr/local/sbin/opensips[16958]: 
> DBG:dialog:fetch_dlg_value: var found-> <<B1>5]R>!
>
> Any ideas?
>
> I am using opensips 1.9.
>
> Regards,
>
> Marcel
>
>
>
>
>
> Marcel Sicking - Core Network Engineer
>
> phone: 	+49 (211) 5423 5010
> fax: 	+49 (211) 5423 5099
> email: 	Marcel.Sicking at onephone.de
> web: 	http://www.onephone.de
>
>
> 	*OnePhone - Gewinner Innovationspreis 2012*
> Best in Cloud Award der Computerwoche
>
>
> Geschäftsführer: Michael Hegemann, Christoph Wichmann
> OnePhone Deutschland GmbH, Düsseldorfer Str.16, D-40699 Erkrath
> Sitz der Gesellschaft: Erkrath, HRB 21674 Wuppertal
>
> /Think green! Please consider the environment before printing this email.
> /
>
>
>
>
>
>
> _______________________________________________
> 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/20131015/1fb42c70/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3882 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/1fb42c70/attachment-0002.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3390 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/1fb42c70/attachment-0003.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 986 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/1fb42c70/attachment-0001.gif>


More information about the Users mailing list