Commit Graph

106 Commits

Author SHA1 Message Date
demonspork
c11589b1c3 Track Voicemail Message Success/Failure in CDR
Track whether or not a message was actually left in the voicemail box. Previously we only knew that voicemail answered, now we know whether the caller left a message.
Callers who didn't leave a message now show up in the "Cancelled" call filter in xml_cdr.php

Bonus: Fixed a bug with the originating_leg_uuid that was breaking extension summary from a previous commit and some other minor bugs/typos.
2021-02-21 21:09:37 -06:00
demonspork
0ef2551698 Exclude cc_side agent legs from missed_call
Excluded cc_side = agent calls from being marked as missed_call = true

Fixed the previous performance issue with adding the cc_side != 'agent' to the SQL and removed its filter from the rendering loop for the xml_cdr.
2021-02-21 18:26:24 -06:00
demonspork
b5272984d1 Don't filter LOSE_RACE of already filtering originating_leg_uuid
It is redundant to filter out LOSE_RACE when originating_leg_uuid is also filtered, there is an overlap where every call with LOSE_RACE also has an originating_leg.
2021-02-20 11:51:24 -06:00
demonspork
1a1edf1195 Improved Missed Call accuracy, cdr statistics, and hide duplicated CDRs from Enterprise Ring Groups
Changes
--------
  - Improve CDR Import Logic so that missed_call column is more accurate to the "missed" status. It would previously mark unanswered outbound calls as "missed". These are their own category of call.
  - Don't mark the CDRs of the "legs" of an Enterprise Ring Group call as missed, only the originating_leg will be marked (one missed call per call) - We could also just "skip" importing these call legs. Simultaneous ring groups don't have these duplicated CDRs for every ringing phone. The "Skip" approach might make most of the rest of this work irrelevant.
  - Create `originating_leg_uuid` column in v_xml_cdr and import it into the database during CDR imports so it is available for filtering Enterprise Ring Group calls out of CDRs and reports.
  - Move logic that hides the agent leg of CC calls, LOSE_RACE calls, and the Enterprise Leg hiding code from xml_cdr.php into xml_cdr_inc.php into the SQL query WHERE clause so the CDR page looks more consistent. The logic is the same, but these calls are now excluded from the query result entirely instead of having to "skip" rendering them in the list on the xml_cdr.php page.
  - Improved CDR statistics page to use the missed_call variable instead of relying upon billsec and answer_stamp/answer_epoch. Added the same logic as the xml_cdr pages to the query so it excludes enterprise ring group call legs.
  - Laid the query groundwork in xml_cdr_statistics to report on Average TTA (No UI changes yet to include that statistic)

Retroactive Changes
---------------------
There are a few changes going back in time to bring everything in line with this better reporting accuracy:
  - If you want the populated the `originating_leg_uuid column` in `v_xml_cdr`, it will rely upon having the `json` column and not having deleted the data from it like I know some people do for space saving.
  - If you don't have the json column,  you are mostly out of luck for hiding the duplicate legs of Enterprise ring group calls. It might be possible, but it isn't going to be easy.
  - On Newer Versions of postgres, this works:
```
UPDATE v_xml_cdr SET originating_leg_uuid = (json->'variables'->>'originating_leg_uuid')::uuid WHERE json->'variables'->>'originating_leg_uuid' IS NOT NULL;
```
  - For some reason on postgres 9.4, I had to UPDATE every single record because I couldn't get it to allow the json syntax properly after the WHERE. This is fine, it doesn't change the end result it just means it has to run the UPDATE on every record, which will take a while
```
UPDATE v_xml_cdr SET originating_leg_uuid = (json->'variables'->>'originating_leg_uuid')::uuid;
```
  - To remove the `missed_call = true` on all your previous outbound records so that they don't show up when you filter on missed (outbound unanswered calls can be accurately listed with TTA max 0 and direction outbound)
```
UPDATE v_xml_cdr SET missed_call = false WHERE direction = 'outbound' AND missed_call = true;
```
2021-02-20 11:51:24 -06:00
FusionPBX
fa835103e3 Use isset instead of strlen. 2020-12-21 11:13:55 -07:00
agree
60ed198a2e CDR Import fix missing sql parameter 2020-12-15 12:42:47 -05:00
FusionPBX
53cbf8c9b4 Fix a situation where call recording was not showing up in Call Detail Records.
Make sure the record_path is set to the default path if that value doesn't exist in the xml.
2020-12-10 20:03:53 -07:00
FusionPBX
08de8d1f81 Remove code that caused an error. 2020-10-07 13:48:17 -06:00
FusionPBX
1abd1f1670 Change prefix from tmp_ to start_ as the variable is based on the start date. 2020-08-11 10:39:27 -06:00
agree
e2498a81de fix extension summary date selection (#5358) 2020-07-16 09:54:10 -06:00
FusionPBX
fa7bb2a781 Add direction inbound for call center calls and update missed_calls. 2020-07-02 18:02:19 -06:00
FusionPBX
2d5745c283 Adjust the key string to match the value. 2020-07-02 16:48:07 -06:00
FusionPBX
0a3d809556 Add cc values to the altnernate import. 2020-07-02 16:27:54 -06:00
FusionPBX
87a7073889 If you don't have xml_cdr_lose_race permission then hide the call. 2020-06-01 16:13:40 -06:00
FusionPBX
314a217d56 Update xml_cdr.php 2020-05-05 21:32:33 -06:00
FusionPBX
b261c7e6d5 Update xml_cdr.php 2020-04-28 16:11:06 -06:00
FusionPBX
4c34f3d4be Update xml_cdr.php 2020-04-17 12:53:50 -06:00
FusionPBX
311e647783 Update xml_cdr.php 2020-04-06 16:11:31 -06:00
Nate
365e20926f Safari Audio Support: Call Recordings, MOH, VM Greetings & Messages and CDR audio files. 2020-03-30 20:08:45 -06:00
FusionPBX
c1b80ade27 Update xml_cdr.php 2020-03-10 10:43:58 -06:00
FusionPBX
4bc1512fec Update xml_cdr.php 2020-02-19 12:56:16 -07:00
Nate
82367a5137 CDR: Remove domain_uuid from delete() method. 2020-02-12 14:14:16 -07:00
FusionPBX
a2b135809f Update xml_cdr.php 2020-02-02 12:50:34 -07:00
FusionPBX
c00563efd8 Update xml_cdr.php 2020-01-31 21:28:29 -07:00
FusionPBX
729c06cb25 Update xml_cdr.php 2020-01-31 17:17:55 -07:00
FusionPBX
2185780bef Update xml_cdr.php 2019-12-23 11:20:43 -07:00
Nate
0ebddaf2fa CDR: List view updates. 2019-10-22 01:43:55 -06:00
FusionPBX
dd7279b6e4 Update xml_cdr.php 2019-10-07 23:49:24 -06:00
FusionPBX
a9e60d0fb8 Update xml_cdr.php 2019-10-07 15:44:05 -06:00
FusionPBX
64158012a2 Update xml_cdr.php 2019-10-07 15:32:23 -06:00
FusionPBX
05dc333ef6 Update xml_cdr.php 2019-10-07 15:28:05 -06:00
FusionPBX
25f3ff2051 Update xml_cdr.php 2019-09-16 08:00:30 -06:00
Nate
fe1493fcb5 Update xml_cdr.php 2019-09-16 04:13:03 -06:00
FusionPBX
fca9b7d848 Update xml_cdr.php 2019-09-13 00:36:24 -06:00
FusionPBX
76e1f2fa06 Update xml_cdr.php 2019-09-13 00:11:37 -06:00
FusionPBX
304eba3601 Update xml_cdr.php 2019-09-12 18:28:34 -06:00
Nate
0618d4eada Extension Summary: Fix Start & End Date/Time search. 2019-09-11 17:12:01 -06:00
FusionPBX
c2027ab6bb Update xml_cdr.php 2019-09-06 11:04:17 -06:00
FusionPBX
50d7e33fbd Update xml_cdr.php 2019-09-03 23:41:04 -06:00
FusionPBX
bfc548b5ce Update xml_cdr.php 2019-09-03 23:25:58 -06:00
FusionPBX
811b53fd47 Update xml_cdr.php 2019-09-03 23:01:19 -06:00
FusionPBX
39cf5583bb Update xml_cdr.php 2019-09-03 14:32:33 -06:00
konradSC
d0bc9034a1 Check for null uuid's (#4402)
Null UUID's are not very kind. They will sneak into your CDR's when you aren't looking and break an otherwise very nice database INSERT statement. We cannot tolerate that sort of behavior.
2019-07-31 16:00:20 -06:00
Luis Daniel Lucio Quiroz
186d7981a2 [4.5] fixes null record_name and record_path fields in v_xml_cdr (#4053)
* record_name verification

* record_name better verification

when you carry on some updates from 4.0 to 4.2 and then 4.4, old dialplans do not create all the variables, record_session is created, but record_name (and record_path) are not null, set and lenght zero,  "" in otherwords.

Then, in the db record, record_name and record_path are empty, regardless if the recording file exists. Therefore, they are not shown in the CDR app.
This fixes this issue.
2019-04-20 17:05:40 -06:00
konradSC
7eafc693c4 Bug fix: No answer_stamp in CDR (#4049)
* Bug fix: No answer_stamp in CDR

Here's a fun little bug that took me a longer than it should have to figure out. When a person make a call and then cancels the request there is no "answer_stamp" written to the CDR. Because of this, v_call_recordings.call_recording_name gets imported as NULL. This causes all the canceled calls to show up in the Call Recordings app first in the list and with no date set.

* Update xml_cdr.php

* Update v_xml_cdr_import.php
2019-04-11 18:00:11 -06:00
FusionPBX
ea63afcc02 Update xml_cdr.php 2019-03-17 00:55:09 -06:00
FusionPBX
0d98092c9c Update xml_cdr.php 2019-02-18 13:30:17 -07:00
FusionPBX
7b8eda9e49 Update xml_cdr.php 2018-11-23 08:03:36 -07:00
FusionPBX
6ca703693a Update xml_cdr.php 2018-11-21 16:07:02 -07:00
FusionPBX
fabc145bd7 Update xml_cdr.php 2018-10-17 22:08:20 -06:00