Accessing a second AV Pair

Robert White rwhite at globalgossip.net
Tue Nov 17 03:05:15 CET 2009


Hi,

I have a Radius message which has two AV Pairs and I want to insert them
both in to a database.  However, I'm unable to access the second AVPair.

Here is the Radius packet....

rad_recv: Accounting-Request packet from host 10.152.0.7 port 20001, id=87,
length=662
        NAS-IP-Address = 10.152.0.7
        Quintum-NAS-Port = "0 7/7/24"
        NAS-Port-Type = Async
        User-Name = "99999999"
        Called-Station-Id = "990006"
        Calling-Station-Id = "1002"
        Acct-Status-Type = Stop
        Acct-Delay-Time = 0
        Acct-Input-Octets = 0
        Acct-Output-Octets = 0
        Acct-Session-Id = "000000AA00000039"
        Acct-Session-Time = 75
        Acct-Input-Packets = 0
        Acct-Output-Packets = 0
        Service-Type = Login-User
        Quintum-AVPair = "h323-ivr-out=ACCESSCODE:990006"
        Quintum-h323-conf-id = "h323-conf-id=34623032 38616662 32630030
37333300"
        Quintum-AVPair = "h323-incoming-conf-id=34623032 38616662 32630030
37333300"
        Quintum-h323-gw-id = "h323-gw-id=au-syd-test1"
        Quintum-h323-call-origin = "h323-call-origin=answer"
        Quintum-h323-call-type = "h323-call-type=Telephony"
        Quintum-h323-setup-time = "h323-setup-time=01:37:31.685 UTC Tue Nov
17 2009"
        Quintum-h323-connect-time = "h323-connect-time=01:37:31.885 UTC Tue
Nov 17 2009"
        Quintum-h323-disconnect-time = "h323-disconnect-time=01:38:46.495
UTC Tue Nov 17 2009"
        Quintum-h323-disconnect-cause = "h323-disconnect-cause=10"
        Quintum-h323-voice-quality = "h323-voice-quality=0"
        Quintum-Trunkid-In = "0 7/7/24"
        Quintum-Trunkid-Out = "10.0.20.36"

When using the standard dictionary.quintum %{Quintum-AVPair}
= h323-ivr-out=ACCESSCODE:990006.  I couldn't read the second AVPair.

I did some Googling and read

"if it [the preprocess module] founds Cisco-AVPair attribute like
Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:XXXXXXXX"
and there's dictionary attribute gw-rxd-cdn, then it adds new attribute
"gw-rxd-cdn" with value "ton:0,npi:1,#:XXXXXXXX".
So if you have Cisco-AVPair attributes which you would like to insert
into SQL, you need to create them in cisco dictionary."

As Quintum and Cisco are very similar I tried the same thing and edited the
dictionary.quintum file adding in the following lines:

ATTRIBUTE      h323-ivr-out                            3000    string
ATTRIBUTE      h323-incoming-conf-id               3001    string

I noted that there is already a very similar attribute for
h323-incoming-conf-id - it just has the word 'Quintum' prepended to it.

However, after the dictionary edit, Radius failed to load. I got the
following error:

"Errors reading dictionary: dict_init:
/usr/local/share/freeradius/dictionary.quintum[53]: dict_init:
/usr/local/share/freeradius/dictionary.quintum[53]:"

Am I on the right track here?

Any help appreciated.

Thanks,

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20091117/c9100660/attachment.html>


More information about the Freeradius-Users mailing list