News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

callhistory.xml

Started by restamp, July 03, 2015, 02:51:23 PM

Previous topic - Next topic

restamp

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?

azrobert

You can use Microsoft's Excel to open an XML file.

restamp

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.

azrobert

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)

Lavarock7

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

My websites: Kona Coffee: http://itskona.com and Web Hosting: http://planetaloha.info<br />A simplified Voip explanation: http://voip.planet-aloha.com

lrosenman

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 :(


RobertThompson

#6
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.
Rob.

www.googlevoiceforcanadians.com

restamp

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.

RobertThompson

Quote from: restamp on July 11, 2015, 09:39:14 PM
... 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. :)

Rob.
Rob.

www.googlevoiceforcanadians.com

restamp

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:

<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:
CallDate        StartTime       TermID1 Direction1      TermID2 Direction2      PeerName1       Number1 PeerName2       Number2 EndTime
7/13/2015       13:51:56                                                         


Any ideas?

RobertThompson

Quote from: restamp on July 13, 2015, 11:49:30 AM

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.
Rob.

www.googlevoiceforcanadians.com

RobertThompson

#11
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.

Rob.

www.googlevoiceforcanadians.com

RobertThompson

#12
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.
Rob.

www.googlevoiceforcanadians.com

lrosenman

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

RobertThompson

Quote from: lrosenman 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

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

www.googlevoiceforcanadians.com

RobertThompson

#15
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
Rob.

www.googlevoiceforcanadians.com

RobertThompson

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

www.googlevoiceforcanadians.com

RobertThompson

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...
Rob.

www.googlevoiceforcanadians.com

CoalMinerRetired

Quote from: RobertThompson on July 23, 2015, 10:11:06 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).

RobertThompson

#19
Quote from: CoalMinerRetired on August 03, 2015, 06:00:11 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).
Rob.

www.googlevoiceforcanadians.com