December 15, 2017, 11:39:13 am *
Welcome, Guest. Please login or register.
News:
 
   Forum Home   Search Login Register OBiTALK  
Pages: [1] 2
  Print  
Author Topic: callhistory.xml  (Read 23606 times)
restamp
Full Member
***
Posts: 193


« on: July 03, 2015, 02:51:23 pm »

On the latest Obis, you can log into its internal web server and dump the call history to a local callhistory.xml file.  Can anyone point me to a program that will display the contents of this file in a human readable format, or perhaps provide the style information which will allow a web browser to do so?
Logged
azrobert
Hero Member & Beta Tester
*****
Posts: 3203


« Reply #1 on: July 03, 2015, 03:22:20 pm »

You can use Microsoft's Excel to open an XML file.
Logged
restamp
Full Member
***
Posts: 193


« Reply #2 on: July 03, 2015, 07:53:00 pm »

Thanks azrobert.  The only M$ Office software I have is fairly old, and my Excel didn't do anything but load the file verbatim into its various A column cells.  I also tried LibreOffice with similar results.  Guess I need a newer version of Office.
Logged
azrobert
Hero Member & Beta Tester
*****
Posts: 3203


« Reply #3 on: July 03, 2015, 08:24:35 pm »

I have a 2007 version of Excel and I opened a configuration backup file. I got a popup and took the default "As XML File". The result was 4 columns.

Here is an example of a row:
A: VoiceService.1.VoiceProfile.1.Line.1.
B: X_DisplayLabel
C: Google Voice
D: Y or Blank (I think Y=default)
Logged
Lavarock7
Sr. Member
****
Posts: 480



« Reply #4 on: July 04, 2015, 11:11:08 am »

I was going to suggest OpenOffice's CALC program, which is another free alternative to Microsofts office products.  http://www.openoffice.org/   (.org not .com)

When I tried to open the CallHistory in Excel 2010 I was asked if I wanted to open the file as an XML table and I said yes. I got columns of data.

Openoffice is not easy. There is a document to help. https://forum.openoffice.org/en/forum/viewtopic.php?f=9&p=99800

Chrome said there was not a stylesheet and opened the file without columns

Logged

My websites: Kona Coffee: http://ItsKona.Com and Web Hosting: http://PlanetAloha.Info
A simplified Voip explanation: http://voip.planet-aloha.com
lrosenman
Full Member
***
Posts: 147



« Reply #5 on: July 04, 2015, 08:58:12 pm »

any web browser will also open them.

Beware, there are bugs, and (at least on my 202) I get illegal characters (0x0), and mal-formed XML.

I've reported it to ObiHai on NUMEROUS occasions, but it seems to NOT be a priority for them Sad

Logged
RobertThompson
Jr. Member
**
Posts: 40



« Reply #6 on: July 11, 2015, 12:12:13 pm »

Hi:

You can use my program to convert the Obi Call History to a Tab-Delimited file which you can then load into a spreadsheet.

The page with instructions is: http://www.googlevoiceforcanadians.com/load-obi-callhistory-xml-file-spreadsheet/

The download can be found here: http://www.googlevoiceforcanadians.com/downloads/

If you have any difficulties, drop a post on the instruction page and I will get back to you.

Rob.
« Last Edit: July 11, 2015, 12:14:54 pm by RobertThompson » Logged

restamp
Full Member
***
Posts: 193


« Reply #7 on: July 11, 2015, 09:39:14 pm »

Thanks, Rob.  That looks like it will do what I want.  Unfortunately I don't have a Windows box handy right now to run it on, but I did download it (and the GV counterpart) and will try them out sometime soon.
Logged
RobertThompson
Jr. Member
**
Posts: 40



« Reply #8 on: July 13, 2015, 08:39:18 am »

... Unfortunately I don't have a Windows box handy right now to run it on...

Hi restamp:

If you are using Linux, I have added a linux version of my program to the Download page - it seems to work fine. http://www.googlevoiceforcanadians.com/downloads/

Let me know if it works, if you try it. Smiley

Rob.
Logged

restamp
Full Member
***
Posts: 193


« Reply #9 on: July 13, 2015, 11:49:30 am »

Hi Rob,
Thanks for taking the time to produce a version for Linux.  The program seems to run OK and produces a CallHistory.txt file, but the only fields populated in it are the CallDate (first field) and StartTime (second field).  All the tab separators are present, but the other fields are all NULL.  In other words:

Code:
<CallHistory date="7/13/2015" time="13:51:56">
<Event time="13:51:56">
<e0>From PH1</e0>
<e1>To SP1(*97)</e1>
</Event>
<Event time="13:51:56">
<e1>Call Connected</e1>
</Event>
<Event time="13:52:16">
<e0>Call Ended</e0>
</Event>
</CallHistory>
gets translated into:
Code:
CallDate        StartTime       TermID1 Direction1      TermID2 Direction2      PeerName1       Number1 PeerName2       Number2 EndTime
7/13/2015       13:51:56                                                         

Any ideas?
Logged
RobertThompson
Jr. Member
**
Posts: 40



« Reply #10 on: July 13, 2015, 12:40:31 pm »


Any ideas?

My guess is that the file format of the OBi callhistory.xml file has changed since I wrote the program - I tested it against an old callhistory.xml file that I had on hand.

I'll outload a new callhistory.xml file and see what's wrong & will get back to you.

Rob.
Logged

RobertThompson
Jr. Member
**
Posts: 40



« Reply #11 on: July 23, 2015, 10:11:06 am »

The CallHistory.xml file for the OBi-202 is vastly different from the CallHistory.xml file for the OBi-110, so, I created a new program to deal with it.

You just need to download the correct version (Linux or Windows) to the same directory/folder as your OBi-202 CallHistory.xml file and run the program.

You can download the program from this page: http://www.googlevoiceforcanadians.com/downloads/

This is only 'Stage # 1' of the program - 'Stage # 2' will get rid of all the unnecessary characters & columns.

Any feedback would be appreciated.

Here is some "bla, bla" info, if you  are interested:

In the Obi-202 Callhistory.xml file, a 'Call Record' starts with : <CallHistory date=
and ends with : </CallHistory>

Between these 'start' & 'end' lines, there may be from 8 to 34 of additional detail
lines of information relating to the call, at least this was the case with the Obi-
202 CallHistory.xml file that I have.

The only useful way that my little brain could figure out on how to deal with the
fact that a single 'Call Record' could have many detail lines was to output the Obi-
202 CallHistory.xml to many 'CH_Work.txt' files, based on the total number of
lines for each 'Call Record' , so, that is what I did.

When you open a 'CH_Work.txt file with a spreadsheet program, you will see that
I added 3 columns to the beginning of each row remember that each row is a
'Call Record':
1. The total number of lines for that 'Call Record'
2. The starting line number from the 'CallHistory.xml' file for that record.
3. The ending line number from the 'CallHistory.xml' file for that record.

When you run the Obi-202 program, it will generate:
A CH_Work.txt file that contains a single row for each 'Call Record', with as
many columns as there are lines for that 'Call Record'.

To use the program:
1. Copy it into the directory/folder where the CallHistory.xml file is living.
2. Launch the program.
3. The 'CH_Work' files will be generated in the same directory/folder.



* Obi-200 LibreOffice.png (51.95 KB, 581x482 - viewed 544 times.)
« Last Edit: July 23, 2015, 10:14:14 am by RobertThompson » Logged

RobertThompson
Jr. Member
**
Posts: 40



« Reply #12 on: July 28, 2015, 02:22:34 pm »

Hello:

I have modified both the Windows & Linux "CallHistory to Tab-Delimited" for the Obi-202 programs to remove all the irrelevant characters.

The programs now create CH_n.txt files where the 'n' equals the number of relevant columns (events) in the file. The first three columns give you the number of lines 'read' from the CallHistory.xml for the row, the CallHistory.xml 'start line' for the row and the CallHistory.xml 'end line' for the row. The last column in each file is just the 'count' of relevant columns.

See: http://www.googlevoiceforcanadians.com/downloads/

I am now working on generating a single file (CH_All.txt) containing all the call records and events in a meaningful way.

Rob.
« Last Edit: July 28, 2015, 02:55:16 pm by RobertThompson » Logged

lrosenman
Full Member
***
Posts: 147



« Reply #13 on: July 28, 2015, 10:23:26 pm »

would some of my XML's with the bad characters help you any?  If so, PM me
Logged
RobertThompson
Jr. Member
**
Posts: 40



« Reply #14 on: July 29, 2015, 05:36:34 am »

would some of my XML's with the bad characters help you any?  If so, PM me

Yes, that would be very helpful - PM'ed you.
Logged

RobertThompson
Jr. Member
**
Posts: 40



« Reply #15 on: July 30, 2015, 04:07:59 pm »

Hello:

I think that I have found a simple way to remove all the 'NUL' characters from the Obi-202 Callhistory.xml file. These characters prevent you from opening the CallHistory.xml file with a text editor etc.

Here's how:

Download Notepad++ https://notepad-plus-plus.org/

Open your CallHistory.xml file in Notepad++

From Main Menu: Search -> Search Mode set this to: Extended

Then,

Replace -> Find what: \x00 (back slash, small x, zero, zero); Replace with: {leave empty}

Then, click Replace_All

Then 'Save as' something else, example: save as callhistory_changed.xml
« Last Edit: July 30, 2015, 04:13:57 pm by RobertThompson » Logged

RobertThompson
Jr. Member
**
Posts: 40



« Reply #16 on: July 31, 2015, 09:42:15 am »

It seems that you need to repeat the procedure for: \x02  (back slash, small x, zero, two)
Logged

RobertThompson
Jr. Member
**
Posts: 40



« Reply #17 on: August 02, 2015, 12:47:21 pm »

I have made further updates to the programs.

OBi-202 CallHistory.xml file to tab-delimited file

The programs now reads the callhistory.xml file and cleans out all the non utf-8 characters. It leaves the original callhistory.xml file totally untouched but generates a new file called: CallHistory_Cleaned.xml

This new file is used to generate the 'Ch_' files.

I still do not generate a separate file containing ALL calls but it is coming soon-ish...

The Windows & Linux downloads may be found here: http://www.googlevoiceforcanadians.com/downloads/

Again, any feedback or input would be appreciated...
Logged

CoalMinerRetired
Hero Member
*****
Posts: 597


« Reply #18 on: August 03, 2015, 06:00:11 am »

Any feedback would be appreciated.

Here is some "bla, bla" info, if you  are interested:

In the Obi-202 Callhistory.xml file, a 'Call Record' starts with : <CallHistory date=
and ends with : </CallHistory>

Between these 'start' & 'end' lines, there may be from 8 to 34 of additional detail
lines of information relating to the call, at least this was the case with the Obi-
202 CallHistory.xml file that I have.

Do the 34 fields include the case when a call is transferred?  I notice that sometimes, not always, an OBi202 logs transferred calls differently.

Sometimes you see the entries for "Transfer To ... Bridged Ref:xxxxx" and the New Peer/Transfer Target, and sometimes you don't get these, the log just looks like two different calls with no mention the second call was initated as a transfer (Flash > Dial # > Flash > (Hangup or not, full transfer or three-way call).
Logged
RobertThompson
Jr. Member
**
Posts: 40



« Reply #19 on: August 03, 2015, 07:55:56 am »

Do the 34 fields include the case when a call is transferred?  I notice that sometimes, not always, an OBi202 logs transferred calls differently.

Sometimes you see the entries for "Transfer To ... Bridged Ref:xxxxx" and the New Peer/Transfer Target, and sometimes you don't get these, the log just looks like two different calls with no mention the second call was initated as a transfer (Flash > Dial # > Flash > (Hangup or not, full transfer or three-way call).

Hi CoalMinerRetired:

It is difficult for me to answer you question because the only two Obi-202 callhistory.xml files that I have were provided (PM'ed) to me by two different members of this forum. The programs seem to handle the calls & events included in their files but I do not know if *** all possible *** entries are contained in those files.

Did you try the programs against a callhistory.xml file which contains such entries?

Please note that in the files that I have, many of the '34 fields' just contain "</Event>" which indicates the *** end *** of a specific event.

The program strips out these text strings and only outputs the information contained between "<Event time=" (i.e., the beginning of a specific event) & "</Event>" (i.e., the end of a specific event).
« Last Edit: August 03, 2015, 08:07:47 am by RobertThompson » Logged

Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC