[OpenSIPS-Users] opensips CDR acc with radius

Marcel Sicking Marcel.Sicking at onephone.de
Tue Oct 15 15:01:12 CEST 2013


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






[cid:image94fc53.jpg at 1d1a2828.d6cf4215]

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

[cid:image9f831e.jpg at 38c9f6e7.4d424848] 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

[cid:image8e3366.gif at 84bca4c1.e74240a1] Think green! Please consider the environment before printing this email.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/21c26840/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image94fc53.jpg at 1d1a2828.d6cf4215
Type: image/jpeg
Size: 3882 bytes
Desc: image94fc53.jpg at 1d1a2828.d6cf4215
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/21c26840/attachment-0002.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image9f831e.jpg at 38c9f6e7.4d424848
Type: image/jpeg
Size: 3390 bytes
Desc: image9f831e.jpg at 38c9f6e7.4d424848
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/21c26840/attachment-0003.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image8e3366.gif at 84bca4c1.e74240a1
Type: image/gif
Size: 986 bytes
Desc: image8e3366.gif at 84bca4c1.e74240a1
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/21c26840/attachment-0001.gif>


More information about the Users mailing list