OBiTALK Community

General Support => Day-to-Day Use => Topic started by: Robert.Thompson on February 17, 2014, 01:54:31 PM

Title: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on February 17, 2014, 01:54:31 PM
The program will read a Obi CallHistory.xml file and convert it to a .txt file that can then be opened with a spreadsheet program such as LibreOffice Calc or Excel.

I have only a very small CallHistory.xml file to test with...

Anyway, you can try it here: http://www.googlevoiceforcanadians.com/load-obi-callhistory-xml-file-spreadsheet/

Rob.
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on February 20, 2014, 06:03:13 AM
Just curious if anyone has tried the program on a larger CallHistory.xml file...

Anyone?
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: WM94 on February 20, 2014, 07:05:52 AM
Quote from: Robert.Thompson on February 20, 2014, 06:03:13 AM
Just curious if anyone has tried the program on a larger CallHistory.xml file...

Anyone?

I just posted http://www.obitalk.com/forum/index.php?topic=7197.0 (http://www.obitalk.com/forum/index.php?topic=7197.0) to try to get to the bottom of not being able to connect to obi IP. I would love to try it out, but cannot get my call history (about a year's worth)
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on February 20, 2014, 07:30:38 AM
Were you able to atleast obtain the Obi's IP address by dialing: ***1 on the phone attached to it?
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: WM94 on February 20, 2014, 07:58:20 AM
Quote from: Robert.Thompson on February 20, 2014, 07:30:38 AM
Were you able to atleast obtain the Obi's IP address by dialing: ***1 on the phone attached to it?

Yes. I got the IP address from the Obi, but couldn't connect to it from my computer.
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on February 20, 2014, 08:12:14 AM
Yikes!!!
All I had to do was enter the IP address in my browser (Firefox) and I got the Obi's Admin sign-on page.

Did you try a different browser?

If that doesn't work, I hope someone here, who knows about networking, can help you.

I don't think that the Obi retains a years worth of CallHistory, but I could be wrong.

If you are using your Obi with Google Voice, there is a program on my website that can read your GV history into a spreadsheet here: http://www.googlevoiceforcanadians.com/program-total-google-voice-minutes/ (http://www.googlevoiceforcanadians.com/program-total-google-voice-minutes/)
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: WM94 on February 20, 2014, 09:23:52 AM
Doing the GV download now. I do use GV for inbound and outbound.
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: WM94 on February 20, 2014, 09:56:46 AM
Quote from: WM94 on February 20, 2014, 09:23:52 AM
Doing the GV download now. I do use GV for inbound and outbound.

This worked for the entirety of my calls. I am still interested in getting call history from the Obi. I tried something else there, and will test it tonight.
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Mango on May 04, 2014, 08:59:29 AM
Thanks; it worked a treat!

EDIT: Actually no it didn't.  All the phone numbers in the resulting .txt file are the same as the phone number of the most recent call.  But since all I need are the timestamps, it still works for my purposes.  :)
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: mo832 on May 05, 2014, 10:13:35 AM
I have used the GV version of your program and it worked very well. Thank you for such a clever solution!

I have a question out of curiosity. The .pas file is very small, but the resulting .exe program is huge. How did such a large executable come from such a small source code?
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: mo832 on May 05, 2014, 10:17:40 AM
Also, in your OP topic heading, you use FWITW. Was that a typo? I looked it up, and nothing meaningful comes up, although FWIW is well known by now.

Fun Fact: If you search in Google with "FWITW" with nothing else, THIS post comes up as the FIRST link! You coined a new acronym ;)
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on May 05, 2014, 01:33:06 PM
Quote from: Mango on May 04, 2014, 08:59:29 AM
Thanks; it worked a treat!

EDIT: Actually no it didn't.  All the phone numbers in the resulting .txt file are the same as the phone number of the most recent call. 

Hi Mango:

I just tested it again and could not replicate your problem. Could you please re-confirm that it is not working correctly?
Thanks a lot.

Rob.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Mango on May 05, 2014, 03:08:46 PM
Here is some test data:

<?xml version="1.0" encoding="UTF-8"?>
<CallHistoryFile>
<CallHistory date="5/1/2014" time="01:41:50">
  <Terminal id="SP1" dir="Inbound">
    <Peer name="Test1" number="1111111111"/>
    <Event time="01:41:50">Ringing</Event>
    <Event time="01:45:53">End Call</Event>
  </Terminal>
  <Terminal id="PHONE1" dir="Inbound">
    <Peer name="" number=""/>
  </Terminal>
</CallHistory>
<CallHistory date="5/2/2014" time="02:41:50">
  <Terminal id="LINE1" dir="Inbound">
    <Peer name="Test2" number="2222222222"/>
    <Event time="02:41:50">Ringing</Event>
  </Terminal>
  <Terminal id="SP1" dir="Outbound">
    <Peer name="" number="incoming"/>
    <Event time="02:41:53">Call Connected</Event>
    <Event time="02:41:59">End Call</Event>
  </Terminal>
</CallHistory>
<CallHistory date="5/3/2014" time="03:49:22">
  <Terminal id="SP1" dir="Inbound">
    <Peer name="Test3" number="3333333333"/>
    <Event time="03:49:22">Ringing</Event>
  </Terminal>
  <Terminal id="PHONE1" dir="Inbound">
    <Peer name="" number=""/>
    <Event time="03:49:33">Call Connected</Event>
    <Event time="03:51:12">End Call</Event>
  </Terminal>
</CallHistory>
</CallHistoryFile>


This was the result:

CallDate  StartTime  TermID1  Direction1  TermID2  Direction2  PeerName1  Number1     PeerName2  Number2     EndTime
5/1/2014  01:41:50   SP1      Inbound     PHONE1   Inbound     Test1      1111111111                         01:45:53
5/2/2014  02:41:50   LINE1    Inbound     SP1      Outbound               1111111111  Test2      2222222222  02:41:59
5/3/2014  03:49:22   SP1      Inbound     PHONE1   Inbound                1111111111             2222222222  03:51:12



I also noticed that if I change the XML file, I have to restart the program before it will read the new one.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Mango on May 05, 2014, 03:12:56 PM
It looks like the problem is because there is no PeerName2 and Number2 for some of my entries.  If I manually add those, the output is correct.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: KAura on May 05, 2014, 04:18:56 PM
guess that means op doesn't initialize
his variables between each line of
input to ""
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: KAura on May 05, 2014, 04:21:07 PM
Quote from: mo832 on May 05, 2014, 10:13:35 AM
...out of curiosity. The .pas file is very small,
but the resulting .exe program is huge...


Where is the .pas file -- would like to take a look.  :)
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on May 05, 2014, 05:04:11 PM
Quote from: KAura on May 05, 2014, 04:21:07 PM
Quote from: mo832 on May 05, 2014, 10:13:35 AM
...out of curiosity. The .pas file is very small,
but the resulting .exe program is huge...


Where is the .pas file -- would like to take a look.  :)

You can download it from: http://www.googlevoiceforcanadians.com/load-obi-callhistory-xml-file-spreadsheet/

Second to last line of post. It is in my DropBox.

Any help would be appreciated. :)

Rob.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: mo832 on May 06, 2014, 07:39:21 AM
Robert.Thompson,

You did not address my question :) ? Can you explain how a 12kb pascal program turned into a 14mb executable?

I want to also thank you once again for making this available.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on May 06, 2014, 11:30:16 AM
Quote from: mo832 on May 06, 2014, 07:39:21 AM

You did not address my question :) ? Can you explain how a 12kb pascal program turned into a 14mb executable?


Sorry mo832 but mango got me worried and I am checking the flippin' program.

To answer your question with absolute honesty, "I don't know." But, I will see if it can be reduced by adjusting the 'compile' settings. This bothered me as well. :(

I'll get back to you later tonight.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: KAura on May 06, 2014, 11:35:41 AM
I don't use it, but this should make life a little easier...
http://saxforpascal.sourceforge.net/ (http://saxforpascal.sourceforge.net/)
Title: Re: FWITW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on May 07, 2014, 07:08:59 AM
Quote from: Mango on May 04, 2014, 08:59:29 AM


EDIT: Actually no it didn't.  All the phone numbers in the resulting .txt file are the same as the phone number of the most recent call. 

Hi Mango:

I have fixed that bug. It works correctly on my limited CallHistory.

I would appreciate it if you would check it out against your CallHistory and let me know how it works for you.

Thanks,

Rob.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on May 07, 2014, 07:12:30 AM
Quote from: mo832 on May 06, 2014, 07:39:21 AM
Robert.Thompson,

You did not address my question :) ? Can you explain how a 12kb pascal program turned into a 14mb executable?



Hi mo832:

Well I found the answer: I was including the debugging information in the .exe file.

The new version is now available and the .exe size has dropped from 14.9 MB to 2.3 MB.

I also improved the screen.

Rob.
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: mo832 on May 07, 2014, 08:06:22 AM
Quote from: Robert.Thompson on May 07, 2014, 07:12:30 AM
Quote from: mo832 on May 06, 2014, 07:39:21 AM
Robert.Thompson,

You did not address my question :) ? Can you explain how a 12kb pascal program turned into a 14mb executable?



Hi mo832:

Well I found the answer: I was including the debugging information in the .exe file.

The new version is now available and the .exe size has dropped from 14.9 MB to 2.3 MB.

I also improved the screen.

Rob.

That's a HUGE difference!

OK, another "ignorant" question here if I may...

Even 2.3 MB seems like a lot to come out of a smallish pascal source program. It grew over 200x in size. Do you (or anyone else reading this) have any insight into how this happens? Does it have anything to do with linking to libraries or loading in pre-compiled code? Even so, it seems like a more or less straightforward report generator program would not need to be over a MB of programming any way you slice it.
(just a note I am still referring to the GV version, not the Obi native version)
Title: Re: FWIW, I have created a Windows program to convert the CallHistory.xml file...
Post by: Robert.Thompson on May 07, 2014, 08:15:24 AM
Quote from: mo832 on May 07, 2014, 08:06:22 AM

(just a note I am still referring to the GV version, not the Obi native version)

Hi mo832:

About the size: Beats the hell out of me!

I will re-compile the GV program, without the debugging info, and update my DropBox.

Done! See: http://www.googlevoiceforcanadians.com/program-total-google-voice-minutes/

(This program reads the out-load of your Google Voice history files and sticks them into a TAB delimited text file that can be read by most spread sheet programs.)

Rob.