- Code: Select all
<call id="50409" origination="incoming" start_time="2011-10-12 09:21:37" from="CUST - MAIN - <6125551234>" from_name="CUST - MAIN -" from_number="6125551234" to="User B <4490>" to_account_id="1113" to_name="User B" to_number="4490" [b]total_duration="1374" talk_duration="1330"[/b]>
<events>
<event start_time="2011-10-12 09:21:37" type="INCOMING_PROVIDER" display="Received call over Channel Group (PRI_B)"/>
<event start_time="2011-10-12 09:21:37" type="INCOMING" display="Received call over channel 2 over phone number (6125554321)" incoming_did="6125554321"/>
<event start_time="2011-10-12 09:21:37" type="INTERNAL" display="Rang Auto Attendant MAIN <800>"/><event start_time="2011-10-12 09:22:13" type="INTERNAL" display="Rang Operator L1 <2036>"/>
<event start_time="2011-10-12 09:22:16" type="TALKING" display="Talked to User A <6528> for 1 minute, 8 seconds"/>
<event start_time="2011-10-12 09:23:24" type="TC_BLIND_TRANSFER" display="Call was blind-transferred to 4490 by User A <6528>"/>
<event start_time="2011-10-12 09:23:24" type="OUTGOING" display="Dialed number (4490)"/><event start_time="2011-10-12 09:23:24" type="INTERNAL" display="Rang User B <4490>"/>
<event start_time="2011-10-12 09:23:29" type="TALKING" display="Talked to User B <4490> for 21 minutes, 2 seconds"/>
<event start_time="2011-10-12 09:44:31" type="HANGUP" display="Call was hung up by User B <4490>"/>
</events>
</call>
Each of the TALKING events need to be parsed out and the time assigned to each of the extensions, then the original callID should be discarded. New callIDs should be created, using the original as a base. Digium, please post a solution that will account for all types of transfers, and be compatible with whatever long term fix you decide on. If you could also explain why you use seconds to show call/talk length, but then elsewhere use human readable strings, that'd be great.
For the record, Digium has confirmed that the problem is present in 4.6 through the latest 5.x release. The CDR is inaccurate in the user's page, the admin page, and whatever you pull out through the API.
