Hi,
I have problem with radius accounting. I'm using openser1.0.1 and bsdradius 0.6.0
I'd like to send Accounting-Start packet on INVITE and ACK messages, And i would like to differentiate it. I'd like to use Sip-Method radius attribute for this, but it doesn't work
I've added the following lines to the dictionary of radiusclient-ng ### Sip-Method Values ###
VALUE Sip-Method INVITE 1 # Proprietary, acc VALUE Sip-Method CANCEL 2 # Proprietary, acc VALUE Sip-Method ACK 4 # Proprietary, acc VALUE Sip-Method BYE 8 # Proprietary, acc
in openser.cfg the lines in question are:
modparam("acc", "radius_extra", "Sip-Method-Str=$avp(s:method)") route { #....
# set Sip-Method for accounting if (is_method("INVITE")) { avp_printf("s:method", "1"); } else if (is_method("ACK")) { avp_printf("s:method", "4"); } else if (is_method("BYE")) { avp_printf("s:method", "8"); };
#.... }
But i've a more serious problem:
In radius i receive accounting packets for INVITE and ACK in the same time. I'd like to use INVITE for set setuptime, and ACK to set conncettime of a call. But in this way the setuptime is incorrect..
INVITE: [2006-09-05 13:41:37] --AcctPacket-------------------------------------------------- 'NAS-IP-Address': '127.0.0.1' 'User-Name': '222@callshop' 'Acct-Status-Type': 'Start' 'Error-Cause': 1L 'Acct-Delay-Time': 0L 'Called-Station-Id': 'sip:22@192.168.1.8' 'Client-IP-Address': '127.0.0.1' 'Acct-Session-Id': '6PvDX6sDfK3ndBxl@192.168.1.129' 'Sip-Translated-Request-URI': 'sip:222@192.168.1.10' 'Service-Type': 'IAPP-Register' 'Sip-Cseq': '2' 'Sip-From-Tag': 'fTgBvqElrM7eckW6' 'Sip-Src-Port': '5061' 'Sip-To-Tag': 'as797c64fb' 'Sip-Response-Code': 200L 'Sip-Src-IP': '192.168.1.129' 'Calling-Station-Id': 'sip:222@192.168.1.8' 'NAS-Port': 5060L
ACK [2006-09-05 13:41:37] --AcctPacket-------------------------------------------------- 'NAS-IP-Address': '127.0.0.1' 'User-Name': '222@192.168.1.8' 'Acct-Status-Type': 'Start' 'Error-Cause': 4L 'Acct-Delay-Time': 0L 'Called-Station-Id': 'sip:22@192.168.1.8' 'Client-IP-Address': '127.0.0.1' 'Acct-Session-Id': '6PvDX6sDfK3ndBxl@192.168.1.129' 'Sip-Translated-Request-URI': 'sip:222@192.168.1.10' 'Service-Type': 'IAPP-Register' 'Sip-Cseq': '2' 'Sip-From-Tag': 'fTgBvqElrM7eckW6' 'Sip-Src-Port': '5061' 'Sip-To-Tag': 'as797c64fb' 'Sip-Response-Code': 200L 'Sip-Src-IP': '192.168.1.129' 'Calling-Station-Id': 'sip:222@192.168.1.8' 'NAS-Port': 5060L
When are INVITE messages sent to radius? When openser got an INVITE message? I think should be... Or when the session is establised?
Thanks any help, Tamas