Jump to content


< Back to Forum


 

How To Store Cdr Data?


  • Please log in to reply

#1 Maciej 06 June 2017 - 11:33 PM

Can we store CDR data in database and txt local files?



#2 SupportTeam 07 June 2017 - 01:55 PM

VoiceGuide automatically stores CDRs into both a text file and a database.

 

CDR files are saved in VoiceGuide's \cdr\ subdirectory.

 

Please see this help file page for information on CDR format. CDR record format used follows prevailing format used in industry:

 

http://www.voiceguid...ml/log_cdrs.htm

 

 

CDRs are also automatically stored in the main VoiceGuide database, in tables:

 

cdrin - for incoming calls.

 

and:

 

cdrout - for outgoing calls

 

 

The table structure matches the format of data saved saved in files. The actual SQL that created the cdrin and cdrout tables is in the DB_Create*.sql files which are in the VoiceGuide's \system\setup\ subdirectory.

 

The default database that is set up when VoiceGuide is installed is SQLite. VoiceGuide can be made to use a different database as its backed. More information on that is available here: http://www.voiceguid...rnal_config.htm



#3 Maciej 08 June 2017 - 04:43 PM

So database to store CDR's is declared in <Dialer> section?

 

I know we need to create table in database but where to declare CDR's database in VG?



#4 SupportTeam 08 June 2017 - 05:20 PM

When VoiceGuide is installed it creates its own database (by default the database is SQLite based)

 

The cdr tables are created in that database.

 

If you want to use a different backend database engine then you can set that in the Config.xml, as per instructions in the link provided earlier. (Yes, the setting is done in the <Dialer> section of the Config.xml)

 

The DB_Create*.sql files which are in the VoiceGuide's \system\setup\ sub-directory have the SQL for creating all the various tables that are used by VoiceGuide in its backed database.

The DB_Create*.sql provided are for the most commonly used .NET Data Providers.

 

From the link provided earlier: http://www.voiceguid...rnal_config.htm :

 

To use another database engine:

  1. Create the main Database object to be used by VoiceGuide.
  2. Specify the connection string in VoiceGuide's Config.xml, in section <Dialer>

VoiceGuide will create all the necessary Tables/Indexes/etc the first time it uses the user specified database.

 

 

or you can create the tables in the database yourself - in which case you should refer to the DB_Create*.sql files to see what those tables should be...



#5 Maciej 08 June 2017 - 07:10 PM

It's working, but

 

cdrout:

  • Where is declared "account" in c"drout" table or how to declare this value?
  • we have empty clid file but we declare in transfer module in options: <CallerId>number</CallerId>
  • not all "channel" cells are filled not matter disposition status
  • dstchannel is empty

cdrin

  • what is clid in "cdrin" table?
  • not all "channel" cells are filled not matter disposition status
  •  

How to insert additional data to table cdr in separate column?



#6 SupportTeam 08 June 2017 - 08:30 PM

In CDROUT the 'account' is the Campaign Name associated with the outgoing call.

 

'clid' stores the CallerID name for incoming calls. On Outgoing calls the 'clid' is not set.

 

The 'src' field stores the CallerID on outgoing calls.

 

'dstchannel' is not set.

 

 

not all "channel" cells are filled not matter disposition status

 

 

Please .ZIP up and post vgEngine traces from the VoiceGuide system capturing this. We can then see what is happening on the system and advise.

 

 

How to insert additional data to table cdr in separate column?

 

From http://www.voiceguid...ml/log_cdrs.htm :
 

 

Contents of $RV[CDR_amaflags] will be placed in the 16th CDR field.

 

Contents of $RV[CDR_user] will be placed in the 17th CDR field.

 

Those two fields are usually enough to store user data. Are you able to use those $RVs and fields to store your required custom data?