[S]The CallHistory outload generates inconsistant results to the xml file...

(1/2) > >>

Robert.Thompson:
Hello:

Here is an example of what I am saying:

1. Probably correct:
</CallHistory>
<CallHistory date="2/21/2012" time="16:08:54">
  <Terminal id="PHONE1" dir="Outbound">
    <Peer name="" number="#"/>
    <Event time="16:08:54">New Call</Event>
    <Event time="16:13:01">End Call</Event>
  </Terminal>
  <Terminal id="LINE1" dir="Outbound">
    <Peer name="" number=""/>
    <Event time="16:08:54">Call Connected</Event>
  </Terminal>

2. Incorrect:
</CallHistory>
<CallHistory date="2/21/2012" time="16:08:44">
  <Terminal id="PHONE1" dir="Outbound">
    <Peer name="" number="18666325775"/>
    <Event time="16:08:44">New Call</Event>
    <Event time="16:08:51">End Call</Event>
  </Terminal>
  <Terminal id="SP2" dir="Outbound">
    <Peer name="" number="18666325775"/>
  <Event time="nn:nn:nn">text here</Event>  this line is missing
  </Terminal>

3. Incorrect:
</CallHistory>
<CallHistory date="2/21/2012" time="14:14:06">
  <Terminal id="PHONE1" dir="Outbound">
    <Peer name="" number="**219055651038"/>
    <Event time="14:14:06">New Call</Event>
    <Event time="nn:nn:nn">text here</Event> this line is missing
  </Terminal>
  <Terminal id="SP2" dir="Outbound">
    <Peer name="" number="19055651038"/>
    <Event time="14:14:06">End Call (500 Server internal error)</Event>
  </Terminal>

Who and how do I contact the Obi people to request that they repair this bug?

Thanks,

Rob.

Robert.Thompson:
Hello:

I have created a small pascal program to convert the callhistory.xml to a CSV file.

It works on my callhistory file but I do not have that many calls recorded.

It handles the two problems mentioned in my previous post.

How do I attach it to a post so that others might try it on a much bigger callhistory.xml?

Edit: Does anyone have a large callhistory.xml file that they would be willing to share with me for testing purposes?

Thanks,

Rob.

infin8loop:
Hi Robert,

I wrestled with a vbscript and XSLT to convert the callhistory xml to csv.  I drove the XSLT off the "Event" tag and got 581 records for 200 calls in my history.  For successful calls ("Call Connected") there are consistently 3 events.  If a call isn't connected then it looks to me that the "Call Connected" event is simply omitted from the xml file (probably by design).  The 2 "incorrect" calls that you mentioned appear to be short enough that they may not have connected.

Excel is smarter than me.  When importing the callhistory xml directly into Excel I get 600 records, 3 for each call.  But this is only because a record for the "Terminal" tag appears for those that have no Event under them, the actual Event and event time are blank on those 19 records. 

Otherwise, the 581 csv records I get from my vbscript look identical to the Excel file created from the direct xml import.

I hope this makes some sense.

To post your code, click the "Additional Options" on the Post Reply form.  You'll see Attach:.
             

Robert.Thompson:
Quote from: infin8loop on February 24, 2012, 04:04:02 pm

Hi Robert,

I wrestled with a vbscript and XSLT to convert the callhistory xml to csv.  I drove the XSLT off the "Event" tag and got 581 records for 200 calls in my history.  For successful calls ("Call Connected") there are consistently 3 events.  If a call isn't connected then it looks to me that the "Call Connected" event is simply omitted from the xml file (probably by design).  The 2 "incorrect" calls that you mentioned appear to be short enough that they may not have connected.

Excel is smarter than me.  When importing the callhistory xml directly into Excel I get 600 records, 3 for each call.  But this is only because a record for the "Terminal" tag appears for those that have no Event under them, the actual Event and event time are blank on those 19 records.  

Otherwise, the 581 csv records I get from my vbscript look identical to the Excel file created from the direct xml import.

I hope this makes some sense.

To post your code, click the "Additional Options" on the Post Reply form.  You'll see Attach:.
              


Hi infin8loop:

Thanks for your input.

My program was built with FreePascal using the Lazarus IDE on a Windows 7 64-bit PC.

How to use it:
1. Place the program, CallHistoryToCSV.exe, in the same directory that contains your callhistory.xml file.
2. Launch the CallHistoryToCSV program.
3. Open the callhistory.txt file with MS Excel or LibreOffice Calc
4. There will only be one row per call record.

What it will and won't do:
1. Does not alter the original callhistory.xml file.
2. Creates 2 new files:
callhistorytmp.txt
callhistory.txt  (this is the CSV file to use)
3. Won't work if callhistory.xml or callhistory.txt or callhistorytmp.txt are open in Excel, notepad etc.

The server won't allow me to attach it, too big, I guess.  :(

It is 2,093 kb.

Oh well, output sample attached.

Edit: I put the exe on RapidShare: https://rapidshare.com/files/165278480/CallHistoryToCSV.exe


Rob.

bbarker:
This looks interesting.  Any chance of getting the source code?  Or how about a 32-bit EXE?

Navigation

[0] Message Index

[#] Next page