Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| vendors:cisco:uc:cms [2021/10/16 15:43] – gerardorourke | vendors:cisco:uc:cms [2021/10/20 16:15] (current) – [Verify JSON format of CDR file and correct if necessary] gerardorourke | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| ==== Verify JSON format of CDR file and correct if necessary ==== | ==== Verify JSON format of CDR file and correct if necessary ==== | ||
| * Gather your CDRs into one folder and pipe to a single file e.g. type * > ../ | * Gather your CDRs into one folder and pipe to a single file e.g. type * > ../ | ||
| + | * Add an empty first line which contains all of the headers (as its the first line which the json2CSV checks to create the CSV file) | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| * The File can have some corruption on it. Check it is valid JSON using JQ - https:// | * The File can have some corruption on it. Check it is valid JSON using JQ - https:// | ||
| - | * | ||
| < | < | ||
| C: | C: | ||
| Line 24: | Line 57: | ||
| fixes this issue. | fixes this issue. | ||
| - | Confirm all good by re-running | + | * Even if the file is not corrupt |
| + | < | ||
| + | * Use the output from this this as the input to the json2csv | ||
| ==== JSON2CSV ==== | ==== JSON2CSV ==== | ||
| Line 58: | Line 92: | ||
| GROUP BY CONVERT(Datetime, | GROUP BY CONVERT(Datetime, | ||
| ORDER by CONVERT(Datetime, | ORDER by CONVERT(Datetime, | ||
| + | </ | ||
| + | |||
| + | ==== Number of calls per conf? ==== | ||
| + | |||
| + | How many calls disconnected in the same minute - typically will be the same call. | ||
| + | |||
| + | <code sql> | ||
| + | SELECT | ||
| + | DateTime = CONVERT(Datetime, | ||
| + | ,TotalCalls = Count(*) | ||
| + | | ||
| + | FROM [CMS].[dbo].[CDR_Final] | ||
| + | Where record_type = ' | ||
| + | |||
| + | GROUP BY CONVERT(Datetime, | ||
| + | ORDER by CONVERT(Datetime, | ||
| </ | </ | ||