Ops sorry i thought you were sending avpairs not receiving. Sorry.

 


Andrew Paternoster

Senior System Engineer


2/94 Abbott Road, Hallam, VIC 3083
Phone: 1300 854 223 Fax: 1300 854 228
www.gpk.net.au

 
Did you know that you can now log faults by just sending an email to support@gpk.net.au


From: freeradius-users-bounces+andrew=gpk.net.au@lists.freeradius.org [mailto:freeradius-users-bounces+andrew=gpk.net.au@lists.freeradius.org] On Behalf Of Robert White
Sent: Tuesday, 17 November 2009 6:33 PM
To: FreeRadius users mailing list
Subject: Re: Accessing a second AV Pair

 

My full SQL statement is:

 

accounting_stop_query = "EXEC ${stopacnt_sp} @username = '%{SQL-User-Name}', @av_pair = '%{h323-incoming-conf-id}', @gw_session_id_out = '%{Quintum-h323-conf-id}', @call_origin = '%{Quintum-h323-call-origin}', @dialstring_from = '%{Calling-Station-Id}', @dialstring_to = '%{Called-Station-Id}', @disconnect_code_hex = '%{Quintum-h323-disconnect-cause}', @session_time = '%{Acct-Session-Time}', @gw_ip = '%{NAS-IP-Address}', @gw_name = '' "

2009/11/17 Andrew Paternoster <andrew@gpk.net.au>

What operator are you using? I have multi AVPairs and i have := on the first one and += on the others working for me.

 

 

 


Andrew Paternoster

Senior System Engineer

Error! Filename not specified.

Error! Filename not specified.

2/94 Abbott Road, Hallam, VIC 3083
Phone: 1300 854 223 Fax: 1300 854 228
www.gpk.net.au

 
Did you know that you can now log faults by just sending an email to support@gpk.net.au

 

The information contained in or accompanying this e-mail is intended only for the use of the stated recipient and may contain information that is confidential and/or privileged. If the reader is not the intended recipient or the agent thereof, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited and may constitute a breach of confidence and/or privilege. If you have received this e-mail in error, please notify us immediately. Any views or opinions presented are those solely of the author and do not necessarily represent those of GPK Computers Pty Ltd..

 

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments

 

From: freeradius-users-bounces+andrew=gpk.net.au@lists.freeradius.org [mailto:freeradius-users-bounces+andrew=gpk.net.au@lists.freeradius.org] On Behalf Of Robert White
Sent: Tuesday, 17 November 2009 1:05 PM
To: FreeRadius users mailing list
Subject: Accessing a second AV Pair

 

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

 


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




--
Rob White
Assistant IT Manager
Core Infrastructure & System Development
Global Gossip Group
Address: 14 Wentworth Avenue, Sydney NSW 2010
Telephone: +61 292 630 460
Fax: +61 292 630 404
Mobile: +61 410 700 733
Email: rwhite@globalgossip.net
Skype: robwhite83