On Mon, 2005-02-14 at 11:37 +0200, Kostas Kalevras wrote:
>
> No. If you want to call modules, just use radrelay which will relay
> accounting
> records to the radius server, instead of sql.
i've noticed it doesn't recognize some AVPairs even when i add them to a
custom dictionary such as the ff. Cisco AVP's:
release-source
gw-rxd-cgn
gw-final-xlated-cgn
remote-media-address
i have attached the sample detail file that i'm trying to parse.
here's how my query string looks like:
accounting_stop_query = "insert into test \
(callingstationid,calledstationid,h323confid,h323inconfid, \
h323callorigin,h323calltype,h323setuptime,h323connecttime, \
h323disconnecttime,h323disconnectcause,releasesource, \
h323remoteaddress,remotemediaaddress,gwrxdcdn,gwrxdcgn, \
gwfinalxlatedcdn,gwfinalxlatedcgn,nasipaddress,cisconasport, \
acctdelaytime,acctuniquesessionid) \
values ('%{Calling-Station-Id}','%{Called-Station-Id}',\
'%{h323-conf-id}','%{h323-incoming-conf-id}', \
'%{h323-call-origin}','%{h323-call-type}', \
chg_tz('%{h323-setup-time}'),chg_tz('%{h323-connect-time}'), \
chg_tz('%{h323-disconnect-time}'),'%{h323-disconnect-cause}', \
'%{release-source}','%{h323-remote-address:-0.0.0.0}', \
'%{remote-media-address:-0.0.0.0}',clean_cdn('%{gw-rxd-cdn}'), \
clean_cgn('%{gw-rxd-cgn}'),clean_cdn('%{gw-final-xlated-cdn}'), \
clean_cgn('%{gw-final-xlated-cgn}'),'%{NAS-IP-Address:-0.0.0.0}', \
'%{Cisco-NAS-Port:-NONE}','%{Acct-Delay-Time}', \
'%{Acct-Unique-Session-Id}')"
what the sqltrace looks like:
insert into test
(callingstationid,calledstationid,h323confid,h323inconfid,h323callorigin,h323calltype,h323setuptime,h323connecttime,h323disconnecttime,h323disconnectcause,releasesource,h323remoteaddress,remotemediaaddress,gwrxdcdn,gwrxdcgn,gwfinalxlatedcdn,gwfinalxlatedcgn,nasipaddress,cisconasport,acctdelaytime,acctuniquesessionid)
values ('123456789','987654321','0BFA6AC3 7D8911D9 8089000B
FDA20326','0BFA6AC3 7D8911D9 8089000B
FDA20326','answer','Telephony',chg_tz('14:32:34.913 HKG Mon Feb 14
2005'),chg_tz('14:32:36.349 HKG Mon Feb 14 2005'),chg_tz('14:32:40.055 HKG Mon
Feb 14
2005'),'10','','0.0.0.0','0.0.0.0',clean_cdn('ton:2=2Cnpi:1=2C=23:987654321'),clean_cgn(''),clean_cdn(''),clean_cgn(''),'10.10.10.114','ISDN
6/7:D:1','13078','');
insert into test
(callingstationid,calledstationid,h323confid,h323inconfid,h323callorigin,h323calltype,h323setuptime,h323connecttime,h323disconnecttime,h323disconnectcause,releasesource,h323remoteaddress,remotemediaaddress,gwrxdcdn,gwrxdcgn,gwfinalxlatedcdn,gwfinalxlatedcgn,nasipaddress,cisconasport,acctdelaytime,acctuniquesessionid)
values ('123456789','987654321','0BFA6AC3 7D8911D9 8089000B
FDA20326','0BFA6AC3 7D8911D9 8089000B
FDA20326','originate','VoIP',chg_tz('14:32:34.917 HKG Mon Feb 14
2005'),chg_tz('14:32:36.345 HKG Mon Feb 14 2005'),chg_tz('14:32:42.057 HKG Mon
Feb 14
2005'),'10','','10.10.10.251','0.0.0.0',clean_cdn('ton:2=2Cnpi:1=2C=23:987654321'),clean_cgn(''),clean_cdn('ton:2=2Cnpi:1=2C=23:987654321'),clean_cgn(''),'10.10.10.114','NONE','13076','');
notice the blank fields for the attributes metioned above (i understand
remote-media-address should be null for Telephony leg).
my dictionary.custom:
ATTRIBUTE remote-media-address 3000 string
ATTRIBUTE release-source 3001 string
ATTRIBUTE gw-rxd-cgn 3002 string
ATTRIBUTE gw-final-xlated-cgn 3003 string
any ideas?
thanks,
roy
Mon Feb 14 14:32:40 2005
Acct-Session-Id = "000013E0"
Calling-Station-Id = "123456789"
Called-Station-Id = "987654321"
h323-setup-time = "14:32:34.913 HKG Mon Feb 14 2005"
h323-gw-id = "AS5400"
h323-conf-id = "0BFA6AC3 7D8911D9 8089000B FDA20326"
h323-call-origin = "answer"
h323-call-type = "Telephony"
Cisco-AVPair = "h323-incoming-conf-id=0BFA6AC3 7D8911D9 8089000B
FDA20326"
Cisco-AVPair = "subscriber=RegularLine"
Cisco-AVPair = "gw-rxd-cdn=ton:2,npi:1,#:987654321"
Cisco-AVPair = "calling-party-category=9"
Cisco-AVPair = "transmission-medium-req=0"
h323-connect-time = "14:32:36.349 HKG Mon Feb 14 2005"
Acct-Input-Octets = 28160
Acct-Output-Octets = 28480
Acct-Input-Packets = 176
Acct-Output-Packets = 178
Acct-Session-Time = 4
h323-disconnect-time = "14:32:40.055 HKG Mon Feb 14 2005"
h323-disconnect-cause = "10"
Cisco-AVPair = "h323-ivr-out=Tariff:Unknown"
Cisco-AVPair = "release-source=1"
h323-voice-quality = "0"
Cisco-AVPair = "gw-rxd-cgn=ton:2,npi:0,pi:0,si:0,#:123456789"
User-Name = "123456789"
Acct-Status-Type = Stop
NAS-Port-Type = Async
Cisco-NAS-Port = "ISDN 6/7:D:1"
NAS-Port = 0
Service-Type = Login-User
NAS-IP-Address = 10.10.10.114
Acct-Delay-Time = 0
h323-incoming-conf-id = "0BFA6AC3 7D8911D9 8089000B FDA20326"
subscriber = "RegularLine"
gw-rxd-cdn = "ton:2,npi:1,#:987654321"
release-source = "1"
gw-rxd-cgn = "ton:2,npi:0,pi:0,si:0,#:123456789"
Client-IP-Address = 10.10.10.114
Acct-Unique-Session-Id = "11af5a078fdde5839e858a3a6bc3d7a2"
Timestamp = 1108362760
Mon Feb 14 14:32:42 2005
Acct-Session-Id = "000013E1"
Calling-Station-Id = "123456789"
Called-Station-Id = "987654321"
Cisco-AVPair = "call-id=0BFB06EB 7D8911D9 81B2FFA4 F952FCFF"
h323-setup-time = "14:32:34.917 HKG Mon Feb 14 2005"
h323-gw-id = "AS5400"
h323-conf-id = "0BFA6AC3 7D8911D9 8089000B FDA20326"
h323-call-origin = "originate"
h323-call-type = "VoIP"
Cisco-AVPair = "h323-incoming-conf-id=0BFA6AC3 7D8911D9 8089000B
FDA20326"
Cisco-AVPair = "subscriber=RegularLine"
Cisco-AVPair = "session-protocol=cisco"
Cisco-AVPair = "gw-rxd-cdn=ton:2,npi:1,#:987654321"
h323-connect-time = "14:32:36.345 HKG Mon Feb 14 2005"
Acct-Input-Octets = 30880
Acct-Output-Octets = 28160
Acct-Input-Packets = 193
Acct-Output-Packets = 176
Acct-Session-Time = 6
h323-disconnect-time = "14:32:42.057 HKG Mon Feb 14 2005"
h323-disconnect-cause = "10"
h323-remote-address = "10.10.10.251"
Cisco-AVPair = "release-source=1"
h323-voice-quality = "0"
Cisco-AVPair = "alert-timepoint=14:32:35.857 HKG Mon Feb 14 2005"
Cisco-AVPair = "remote-media-address=10.10.10.254"
Cisco-AVPair = "gw-rxd-cgn=ton:2,npi:0,pi:0,si:0,#:123456789"
Cisco-AVPair = "gw-final-xlated-cdn=ton:2,npi:1,#:987654321"
Cisco-AVPair = "gw-final-xlated-cgn=ton:2,npi:0,pi:0,si:0,#:123456789"
User-Name = "123456789"
Acct-Status-Type = Stop
Service-Type = Login-User
NAS-IP-Address = 10.10.10.114
Acct-Delay-Time = 0
call-id = "0BFB06EB 7D8911D9 81B2FFA4 F952FCFF"
h323-incoming-conf-id = "0BFA6AC3 7D8911D9 8089000B FDA20326"
subscriber = "RegularLine"
session-protocol = "cisco"
gw-rxd-cdn = "ton:2,npi:1,#:987654321"
release-source = "1"
remote-media-address = "10.10.10.254"
gw-rxd-cgn = "ton:2,npi:0,pi:0,si:0,#:123456789"
gw-final-xlated-cdn = "ton:2,npi:1,#:987654321"
gw-final-xlated-cgn = "ton:2,npi:0,pi:0,si:0,#:123456789"
Client-IP-Address = 10.10.10.114
Acct-Unique-Session-Id = "4e77d29a4f62ee81a00836ed4edf45ca"
Timestamp = 1108362762