(RADIATOR) Sending Accounting details to a postgres database

Hugh Irvine hugh at open.com.au
Thu Jan 20 22:56:43 CST 2005


Hello -

This looks to us like a problem with the DBD module for Postgres.

Could you please tell us what hardware/software platform you are using  
and what version of Perl, DBI and DBD-pg?

For testing purposes you could try the same thing with MySQL to verify  
where the problem lies.

regards

Hugh


On 21 Jan 2005, at 04:45, dthaba at uunet.co.ke wrote:

>  Hi there,
>
>  I have installed Raditator 3.11 and am trying to send some accounting  
> details to a postgres database.
>  The problem is that all non-integer values appear as blank in the  
> insert query. What could I be missing.
>  Attached find my config file as well as level 4 trace.
>
>
>   
> ##############################################radius.cfg############### 
> ######################################
> LogDir         /var/log/radius
>  DbDir          /usr/local/radiator/db
>  AuthPort       1812
>  AcctPort       1813
>  Trace          4
>  LogFile                 %L/voip-cdr-logfile.%Y%m%d
>   
>                                                                         
>                                                      
>  # For testing: this allows us to honour requests from radpwtst
>  # on the same host.
>  <Client localhost>
>          Secret mysecret
>          DupInterval 0
>  </Client>
>
>  <Client 195.202.80.91>
>          Secret mysecret
>          DupInterval 0
>  </Client>
>
>
>  <AuthBy SQL>
>                  DBSource         
> dbi:Pg:dbname=voip_cdr_accounting;host=195.202.80.89
>                  DBUsername      voipradius
>                  DBAuth          voipradius
>   
>                  Identifier Voip_Cdr_Accounting
>                  AuthSelect
>                  AccountingTable VOIP_CDR_ACCOUNTING
>                  AcctColumnDef NASIPADDRESS,NAS-IP-Address
>                  AcctColumnDef QUINTUMNASPORT,Quintum-NAS-Port
>                  AcctColumnDef NASPORTTYPE,NAS-Port-Type
>                  AcctColumnDef USERNAME,User-Name
>                  AcctColumnDef CALLEDSTATIONID,Called-Station-Id
>                  AcctColumnDef CALLINGSTATIONID,Calling-Station-Id
>                  AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type
>                  AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
>                  AcctColumnDef ACCTINPUTOCTES,Acct-Input-Octets,integer
>                  AcctColumnDef ACCTSESSIONID,Acct-Session-Id
>                  AcctColumnDef  
> ACCTSESSIONTIME,Acct-Session-Time,integer
>                  AcctColumnDef  
> ACCTINPUTPACKETS,Acct-Input-Packets,integer
>                  AcctColumnDef  
> ACCTOUTPUTACKETS,Acct-Input-Packets,integer
>                  AcctColumnDef SERVICETYPE,Service-Type
>                  AcctColumnDef  
> quintum_h323_conf_id,Quintum-h323-conf-id
>                  AcctColumnDef quintum_avpair,Quintum-AVPair
>                  AcctColumnDef quintum_h323_gw_id,Quintum-h323-gw-id
>                  AcctColumnDef  
> quintum_h323_call_origin,Quintum-h323-call-origin
>                  AcctColumnDef  
> quintum_h323_call_type,Quintum-h323-call-type
>                  AcctColumnDef  
> quintum_h323_setup_time,Quintum-h323-setup-time
>                  AcctColumnDef  
> quintum_h323_connect_time,Quintum-h323-connect-time
>                  AcctColumnDef  
> quintum_h323_disconnect_time,Quintum-h323-disconnect-time
>                  AcctColumnDef  
> quintum_h323_disconnect_cause,Quintum-h323-disconnect-cause
>                  AcctColumnDef  
> quintum_h323_voice_quality,Quintum-h323-voice-quality
>                  AcctColumnDef timestamp,Timestamp,integer
>  </AuthBy>
>
>  #<Realm DEFAULT>
>  #       <AuthBy FILE>
>  #               # The filename defaults to %D/users
>  #       </AuthBy>
>  #       # Log accounting to the detail file in LogDir
>  #       AcctLogFileName %L/detail/voip-cdr-detail.%Y%m%d
>  #</Realm>
>  <Handler>
>                  AuthBy Voip_Cdr_Accounting
>  </Handler>
>
> ####################################################################### 
> ###############################
>
> Code:       Accounting-Request
> Identifier: 128
> Authentic:  -x<153><179><223><4>=<19>S<230>T<192><12>j<138><182>
> Attributes:
>         NAS-IP-Address = 195.202.80.91
>         Quintum-NAS-Port = "0 2/1/1"
>         NAS-Port-Type = Async
>         User-Name = "195.202.80.91"
>         Called-Station-Id = "102"
>         Calling-Station-Id = "6988*"
>         Acct-Status-Type = Stop
>         Acct-Delay-Time = 0
>         Acct-Input-Octets = 0
>         Acct-Output-Octets = 0
>         Acct-Session-Id = "00005D44000014A0"
>         Acct-Session-Time = 5
>         Acct-Input-Packets = 0
>         Acct-Output-Packets = 0
>         Service-Type = Annex-Framed-Tunnel
>         Quintum-h323-conf-id = "h323-conf-id=34316566 65633731  
> 32313166 63313633"
>         Quintum-AVPair = "h323-incoming-conf-id=34316566 65633731  
> 32313166 63313633"
>         Quintum-h323-gw-id = "h323-gw-id="
>         Quintum-h323-call-origin = "h323-call-origin=answer"
>         Quintum-h323-call-type = "h323-call-type=Telephony"
>         Quintum-h323-setup-time = "h323-setup-time=17:37:53.945 UTC  
> Thu Jan 20 2005"
>         Quintum-h323-connect-time = "h323-connect-time=17:38:10.205  
> UTC Thu Jan 20 2005"
>         Quintum-h323-disconnect-time =  
> "h323-disconnect-time=17:38:15.070 UTC Thu Jan 20 2005"
>         Quintum-h323-disconnect-cause = "h323-disconnect-cause=10"
>         Quintum-h323-voice-quality = "h323-voice-quality=0"
>
> Thu Jan 20 20:38:15 2005: DEBUG: Handling request with Handler ''
> Thu Jan 20 20:38:15 2005: DEBUG:  Deleting session for 195.202.80.91,  
> 195.202.80.91,
> Thu Jan 20 20:38:15 2005: DEBUG: Handling with Radius::AuthSQL
> Thu Jan 20 20:38:15 2005: DEBUG: Handling accounting with  
> Radius::AuthSQL
> Thu Jan 20 20:38:15 2005: DEBUG: do query is: 'insert into  
> VOIP_CDR_ACCOUNTING
>   
> (ACCTDELAYTIME,ACCTINPUTOCTES,ACCTINPUTPACKETS,ACCTOUTPUTACKETS,ACCTSES 
> SIONID,ACCTSESSIONTIME,
> ACCTSTATUSTYPE,CALLEDSTATIONID,CALLINGSTATIONID,NASIPADDRESS,NASPORTTYP 
> E,QUINTUMNASPORT,
> SERVICETYPE,USERNAME,quintum_avpair,quintum_h323_call_origin,quintum_h3 
> 23_call_type,
> quintum_h323_conf_id,quintum_h323_connect_time,quintum_h323_disconnect_ 
> cause,
> quintum_h323_disconnect_time,quintum_h323_gw_id,quintum_h323_setup_time 
> ,
> quintum_h323_voice_quality,timestamp) values  
> (0,0,0,0,,5,,,,,,,,,,,,,,,,,,,1106242695)':
>
>
>
>

NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive  
(www.open.com.au/archives/radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list