Welcome to the Cisco TelePresence Developer forum! This forum is for integrators and developers only. The topics should be around device integration and development of solutions with Cisco TelePresence equipment only. This is NOT a product support channel. If you have support related questions please contact your local Cisco representative. Topics not following the above rules may be removed  from the forum. Topics that drift off into flame wars or go way off topic may also be removed without further notice.

« Back to Crestron Control

xHistory / XPATH

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi. 

Im in the process of creating a module for Crestron to retrieve the history from the codec and display it on the touchpanel, But i'm having some problems getting the data i need without getting lots of data i dont need as well. This takes to much power from the 2-series processor. What i want to do is get the last 10 entries or so, and be able to filter out what parts of that entries i want, eg. Direction, StartTime, CallBackNumber,DisconnectCause and Duration.
Im trying to use standard XPATH expressions, but it does not work. 

Example:  "xhistory Calllogs/Call[position()<=10]" is able to get the first 10 entries in the log, but "xhistory Calllogs/Call[position()>=last()-10]"  does not work.
It seems like the last() operator is not implemented at all. And even if would work, i also want to filter out the items i want "xhistory Calllogs/Call[position()>=last()-10]/*(Direction|StartTime|CallBackNumber|DisconnectCause|Duration)" But this seems to be invalid to.  And at last, a also want to be able to only get unique results like the "xHistory CallLogs recent ?" command returns (if the last 10 calls was outgoing to the same location i want this to be 1 entry)..
Right now, im retrieving the latest calls by first issuing "xHistory CallLogs recent ?" (Returns a list of ID's [1,2,3,4,5,6,7,8,9,10,11,12] etc.. ). I then split this result into an array, and loop through the latest 10 entries, then calling for more information on the specific entry "xHistory CallLogs Call {ID} Direction\x0D xHistory CallLogs Call {ID} StartTime" and so on, but it drains to much power from the processor because of all the calls to the codec, and all the data in the response. 
Is there any way to do this better with XPATH?   
Best Regards
Vidar Hauglien

RE: xHistory / XPATH
Answer
12/17/12 1:48 PM as a reply to Vidar Hauglien.
Hi Vidar,
unfortunately the xHistory is pretty useless for integrators due to the limitations that you have pointed out here. Unfortunately there are no hidden tricks to allow you to do what you are trying to do yet....
However, I do have good news!!! In TC 6.1 there will be a complete API command set to do exactly what you are requesting with both a call log with last x entries and queries to get missed calls, placed calls etc. where consecutive calls will be collapsed and an occurrence counter to indicate e.g. that you have 5 missed calls in a row from same number. Also filter for basic or detailed lists.
Finally!!!
I therefore recommend you to put the call log implementation on hold until then - if your customer can wait...
Regards David

RE: xHistory / XPATH
Answer
12/17/12 1:57 PM as a reply to David Bruun-Lie.
Hi. 
 
Thanks for your reply. I was afraid there was no option, but at least now i got it confirmed emoticon  Any ETA on 6.1? 
 
Best regards
Vidar Hauglien

RE: xHistory / XPATH
Answer
12/17/12 2:21 PM as a reply to Vidar Hauglien.
No good ETA on 6.1 yet. Some months....

 The forum is moderated by R&D and our aim is to answer your questions as soon as possible. If we cannot resolve your issues immediately we will try to give you feedback indicating when you may expect an answer.

Note that in no circumstances are we able or even allowed to give any promises regarding new products, firmware updates, new features, release dates etc. before they are officially released.

If your question is for a specific product please include both the device type (e.g. Codec C60 or Codec 3000 MXP) and software version (e.g. TC 2.1 or F8.0) for us to be able to answer as accurate as possible.