How to get iphop attributes coming into cisco av-pairs?

Khalukhin Alexander khalukhin at gmail.com
Tue Feb 19 13:20:43 CET 2008


Greetings! I'm using freeradius 1.1.6 on gentoo (2.6.15-gentoo-r5) to account
sip calls via radius client on cisco 26xx and have a problem: I need to get
iphop attributes from radius accounting packets, but I can't :( While running
freeradius in debug mode (-X key), I see required attributes as shown below:

        Acct-Session-Id = "4D00000000005CBF"
        Calling-Station-Id = "1004603"
        Called-Station-Id = "1111#7495100"
        Cisco-AVPair = "call-id=ZDgxMWUwZDFlODQ5Yzc1MmViZTZmM2UyMmY1ZjdiNzc."
->      Cisco-AVPair = "iphop=count:3"
->      Cisco-AVPair = "iphop=hop1:213.248.63.122"
->      Cisco-AVPair = "iphop=hop2:213.248.63.122"
->      Cisco-AVPair = "iphop=hop3:213.248.12.121"
        h323-setup-time = "h323-setup-time=12:15:03.844 MSK Tue Feb 19 2008"
        h323-gw-id = "h323-gw-id=voice5.di-net.ru"
        h323-conf-id = "h323-conf-id=FD2F9C59 DE0111DC A013E229 E5B23AB5"
        h323-call-origin = "h323-call-origin=answer"
        h323-call-type = "h323-call-type=VoIP"
        Cisco-AVPair = "h323-incoming-conf-id=FD2F9C59 DE0111DC
A013E229 E5B23AB5"
        Cisco-AVPair = "subscriber=Unknown"
        Cisco-AVPair = "session-protocol=sipv2"
        Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:0,#:1111#7495100"
        Cisco-AVPair = "feature-vsa=fn:TWC,ft:02/19/2008
12:15:03.844,cgn:1004603,cdn:1111#7495100,frs:0,fid:3195,fcid:FD2F9C59DE0111DCA013E229E5B23AB5,legID:D05"
        User-Name = "1004603"
        Cisco-AVPair = "connect-progress=Call Up"
        Acct-Status-Type = Start
        Service-Type = Login-User
        NAS-IP-Address = 213.219.200.35
        Acct-Delay-Time = 0

I'm using oracle freeradius driver of sql module to log all the packets into
database. I can use all other atrributes in my sql queries (with using
cisco_avpair_hack of course). All other, but not thouse ones - they're always
comes empty. Here is one of the queries in oraclesql.conf:

accounting_start_query = "INSERT INTO ACC (\"ACCT-STATUS-TYPE\",
\"NAS-IP-ADDRESS\", \"H323-CALL-ORIGIN\", \"CALLED-STATION-ID\",
\"CALLING-STATION-ID\", \"ACCT-SESSION-ID\", \"CALL-ID\", \"SIP-TO-TAG\",
\"SIP-FROM-TAG\", \"SIP-TRANSLATED-REQUEST-URI\", \"USER-NAME\",
\"SIP-SOURCE-IP-ADDRESS\", \"SIP-SOURCE-PORT\", \"ACCT-SESSION-TIME\",
\"H323-CONNECT-TIME\", \"H323-SETUP-TIME\", \"H323-DISCONNECT-TIME\",
\"H323-DISCONNECT-CAUSE\", \"PREV-HOP-VIA\", \"PREV-HOP-IP\", \"NEXT-HOP-IP\",
\"NEXT-HOP-DN\") VALUES ('%{ACCT-STATUS-TYPE}', '%{NAS-IP-ADDRESS}',
'%{H323-CALL-ORIGIN}', '%{CALLED-STATION-ID}', '%{CALLING-STATION-ID}',
'%{ACCT-SESSION-ID}', '%{CALL-ID}', '%{SIP-TO-TAG}', '%{SIP-FROM-TAG}',
'%{SIP-TRANSLATED-REQUEST-URI}', '%{USER-NAME}', '%{SIP-SOURCE-IP-ADDRESS}',
'%{SIP-SOURCE-PORT}', '%{ACCT-SESSION-TIME}', '%{H323-CONNECT-TIME}',
'%{H323-SETUP-TIME}', '%{H323-DISCONNECT-TIME}', '%{H323-DISCONNECT-CAUSE}',
'%{PREV-HOP-VIA}', '%{PREV-HOP-IP}', '%{NEXT-HOP-IP}', '%{IPHOP}')"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20080219/80474741/attachment.html>


More information about the Freeradius-Users mailing list