Difference between revisions of "Automatic CDR Export"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Automatic CDR Export is available from MOR X9.
Automatic CDR Export allows to create periodic CDR Export tasks that will be executed automatically on configured time with specific query parameters. Exported data will be archived and sent via Email to User or specific Email address.
Automatic CDR Export allows to create periodic CDR Export tasks that will be executed automatically on configured time with specific query parameters. Exported data will be archived and sent via Email to User or specific Email address.


Line 21: Line 23:
==New Automatic CDR Export==
==New Automatic CDR Export==


[[File:Mor automatic cdr export create.png]]
[[File:Automatic cdr export create.png]]


When creating new Automatic CDR Export  you will see two sections: '''Query''' and '''Settings'''.
When creating new Automatic CDR Export  you will see two sections: '''Query''' and '''Settings'''.
Line 84: Line 86:


For example, if CDR export was executed on 2016-11-01 00:00:00, then CDR will be for 2016-10-01 00:00:00 - 2016-10-31 23:59:59 period. Data period is always first day of the month - last day of the month (whole month).
For example, if CDR export was executed on 2016-11-01 00:00:00, then CDR will be for 2016-10-01 00:00:00 - 2016-10-31 23:59:59 period. Data period is always first day of the month - last day of the month (whole month).
If you choose specific day of the month, for example, 15, then CDR will be generated for 2016-10-15 00:00:00 - 2016-11-14 23:59:59 and will be sent at 2016-11-15 00:00:00
*Example.
Today is 15th of April.
If we choose 14th or 15th day (Past or Today), then CDR will be generated only next month.
If we choose 17th day (Future), then CDR will be generated for previous month till 16th of April 23:59:59


=====Only once=====
=====Only once=====
Line 106: Line 115:


Select which [[CDR_Export_Templates|CDR Export Template]] to use.
Select which [[CDR_Export_Templates|CDR Export Template]] to use.
====Filename Prefix====
Select a prefix of how file name will be started from.
==== Archive extension====
Select extension type to archive: tgz, zip or gzip


====Send CDR to====
====Send CDR to====


Select who should receive CDR Export. It can be either User or specific Email address. If User is selected then Email address will be taken from Users settings (make sure that User has email).
Select who should receive CDR Export. It can be either User, a specific Email address, an FTP, or an SFTP server. If User is selected then Email address will be taken from Users settings (make sure that User has email).


Also make sure that email sending is configured correctly.
Also make sure that email sending is configured correctly.
Line 118: Line 135:


'''Note:''' archive size is limited to '''10MB'''! If CDR archive is larger, then archive will not be sent via Email and User will receive error Email instead.
'''Note:''' archive size is limited to '''10MB'''! If CDR archive is larger, then archive will not be sent via Email and User will receive error Email instead.
'''Note:''' if '''Custom Email''' option is yous and you want to send CDRs to more than one email, please separate the emails with ''';''' sign.
'''FTP''' - Please fill FTP server details at [https://wiki.kolmisoft.com/index.php/Configuration_from_GUI#FTP FTP] tab.
'''SFTP''' - Please fill SFTP server details at [https://wiki.kolmisoft.com/index.php/Configuration_from_GUI#SFTP SFTP] tab.


==Next run at==
==Next run at==

Latest revision as of 08:24, 7 May 2024

Automatic CDR Export is available from MOR X9.

Automatic CDR Export allows to create periodic CDR Export tasks that will be executed automatically on configured time with specific query parameters. Exported data will be archived and sent via Email to User or specific Email address.

CDR Export Templates

Automatic CDR Export requires to create at least one CDR Export Template so be sure to create one before proceeding.

Automatic CDR Export

Automatic CDR export is configured in SETTINGS -> Billing -> CDR -> Export -> Automatic:

Automatic cdr export menu.png

Here you will find a list of already configured Automatic CDR Exports:

Mor automatic cdr export list.png

In this list you may active/deactive CDR export tasks, edit or delete existing tasks and create new ones by pressing Add new Automatic CDR Export.

Note that Last run at and Next run at are shown in timezone defined by Time Zone setting.

New Automatic CDR Export

Automatic cdr export create.png

When creating new Automatic CDR Export you will see two sections: Query and Settings.

Query section

This section is very similar to filters in Last Calls page. You can set various filters for CDR Export query. These filters work in the same way as they work in Last Call page therefore you may test you query in Last Calls page and if you are happy with result, set same parameters in this Query section.

Note that date filters (From and Till) are missing. These filters depend on CDR Export Repeat period and will be described bellow.

Settings section

Name

Name is only for information purposes. This name is shown in Automatic CDR Export list.

Time Zone

Time Zone is important setting and should be set correctly depending on situation. All other time related settings will use this Time Zone.

For example, if you want to generate daily CDR Export to your User who lives in specific region, let’s say London, you should set timezone to GMT (+00:00) London. This way User will get CDR data starting from 00:00:00 till 23:59:59 in User’s timezone.

Server and User may be in different timezones therefore it is important to set Time Zone to User’s timezone if you intend to generate CDR for this User.

Another thing to consider is when you set Start CDR Export at setting (will be described later). This variable will also depends on Time Zone setting. For example, maybe you server off-peer hours are 00:00:00 - 06:00:00, but in selected Time Zone off-peer hours may be different.

Repeat period

Repeat period defines how often CDR Export is executed and which period is used for data retrieval. For this reason Query section is missing From and Till.

Note that this setting depends on Time Zone variable.

Hourly

CDR export will be executed each hour. CDR data will correspond to whole previous hour.

For example, if CDR export was executed on 2016-11-11 10:00:00, then CDR will be for 2016-11-11 09:00:00 - 2016-11-11 09:59:59 period.

In other words, it will work as if you set From to 2016-11-11 09:00:00 and Till to 2016-11-11 09:59:59 in date filters.

Daily

CDR export will be executed each day. CDR data will correspond to whole previous day.

For example, if CDR export was executed on 2016-11-11 00:00:00, then CDR will be for 2016-11-10 00:00:00 - 2016-11-10 23:59:59 period.

Weekly

CDR export will be executed each week. CDR data will correspond to whole previous week.

For example, if CDR export was executed on 2016-11-14 00:00:00 (monday), then CDR will be for 2016-11-07 00:00:00 (monday) - 2016-11-13 23:59:59 (sunday) period. Data period is always monday - sunday.

Bi-weekly

CDR export will be executed each twice a month. CDR data will correspond either to 1-15 day of month or 16 - end of month.

For example, if CDR export was executed on 2016-11-16 00:00:00, then CDR will be for 2016-11-01 00:00:00 - 2016-11-15 23:59:59 period. If CDR export was executed on 2016-12-01 00:00:00, then CDR will be for 2016-11-16 00:00:00 - 2016-11-30 23:59:59 period.

Monthly

CDR export will be executed each month. CDR data will correspond to whole previous month.

For example, if CDR export was executed on 2016-11-01 00:00:00, then CDR will be for 2016-10-01 00:00:00 - 2016-10-31 23:59:59 period. Data period is always first day of the month - last day of the month (whole month).

If you choose specific day of the month, for example, 15, then CDR will be generated for 2016-10-15 00:00:00 - 2016-11-14 23:59:59 and will be sent at 2016-11-15 00:00:00

  • Example.

Today is 15th of April. If we choose 14th or 15th day (Past or Today), then CDR will be generated only next month. If we choose 17th day (Future), then CDR will be generated for previous month till 16th of April 23:59:59

Only once

CDR export will be executed on specific date and time. Also, in Query section two additional filters will be displayed - From and Till. These filters allow to specify date period for CDR Export query (in selected Time Zone).

Start CDR Export at

If you have selected Daily, Weekly, Bi-weekly or Monthly periods, you may select specific hours when Automatic CDR export should be executed. This is useful because you may choose off-peek hours. Automatic CDR Export is executed only during selected hour period.

If you have selected Only once period, you have to set full date (days and hours). This is because Only once is not periodic and should have specific date and time.

Things to consider:

  • Choose off-peek hours, this will reduce load on system;
  • Be carefull when midnight is selected (00:00) because User may start new Call just before midnight and that Call may last for more than an hour. In this case, you may want to start CDR export few hours after midnight so all User’s Calls have time to finish;
  • Hourly period may be inaccurate for the reason described above.

Note that this setting depends on Time Zone variable.

Template

Select which CDR Export Template to use.

Filename Prefix

Select a prefix of how file name will be started from.

Archive extension

Select extension type to archive: tgz, zip or gzip

Send CDR to

Select who should receive CDR Export. It can be either User, a specific Email address, an FTP, or an SFTP server. If User is selected then Email address will be taken from Users settings (make sure that User has email).

Also make sure that email sending is configured correctly.

CDRs will be archived and sent to User/Email.

If archive is sent successfully, User should receive success email which can be customised in Emails settings. CDR archive will be attached.

Note: archive size is limited to 10MB! If CDR archive is larger, then archive will not be sent via Email and User will receive error Email instead.

Note: if Custom Email option is yous and you want to send CDRs to more than one email, please separate the emails with ; sign.

FTP - Please fill FTP server details at FTP tab.

SFTP - Please fill SFTP server details at SFTP tab.

Next run at

In Automatic CDR Export list you should see Next run at column. This shows date and time (in selected Timezone) when CDR export will be executed.

What happens when you create new Automatic CDR Export? When CDR Export will be executed? It depends on Repeat period. New Automatic CDR Export is executed on next period. For example, if you have created Hourly Automatic CDR Export on 2016-11-11 09:11:45, then the first time CDR Export is executed will be on 2016-11-11 10:00:00.

If you have created Daily Automatic CDR Export on 2016-11-11 09:11:45, then the first time CDR Export is executed will be on 2016-11-12 00:00:00.

If you have created Monthly Automatic CDR Export on 2016-11-11 09:11:45, then the first time CDR Export is executed will be on 2016-12-01 00:00:00.

Of course hours may be different depending on Start CDR Export at, but the idea is that CDR Export is executed on next period, either it is next hour, next day, next week or next month.

File names

CDR Export output is a CSV file compressed in tgz archive. Filename is based on dates, for example if CDR Export was executed for 2016-11-01 00:00:00 - 2016-11-30 23:59:59 period, then file names will be:

CSV filename: MOR_CDR_export_20161122_000000_20161122_235959.csv
TGZ filename: MOR_CDR_export_20161122_000000_20161122_235959.tgz

CDR Export and performance

CDR Export is resource intensive task. Consider having as little Automatic CDR Export tasks as possible. Also shorter Repeat periods have better peformance.

It is advisable to set Start CDR Export at to off-peak hours. Also, Start CDR Export at allows to spread tasks across hours during the day.

How old CDR Export tasks are handled

There might be situations when script responsible for CDR Export functionality was not running for long time. What happens to all CDRs that were supposed to be generated during that time when script was not running? Only single CDR for latest period will be generated. This is done intentionally to prevent high amount of CDR Export tasks to run at a time.

For example, if Monthly CDR Export tasks was created on January but for some reason CDR Export script was not executed until November, then CDR Export for January-September will be skipped. Script will generate CDR Export for October and sets Next run at to December.

This logic does not apply to Only once period. All tasks with Only once period will be executed.

See also

CDR Export Templates
Emails Templates variables