Reputation: 450
I'm trying to find a way to use the JTApi to get missed and completed calls from the phone. I know that I could write this code myself and capture them in the callobserver, but I specifically want it to come from the PBX/Phone. Is this possible?
Upvotes: 0
Views: 622
Reputation: 386
Cisco JTAPI does not provide access to historical call records, nor is their a programmatic way to query the phone device directly. For 'real-time' call history, you would need to implement full-time call observation and record the call meta-data into your own database.
Historical call records are available via CUCM's 'Call Detail Records' function: https://developer.cisco.com/site/sxml/discover/overview/cdr/
These CDRs are sent from supporting phones to CUCM at the end of every call, and are collected/stored on the CUCM Publisher every 1 minute (by default) as CSV formatted flat files.
There are two main mechanisms for accessing CDRs:
Example of get_file_list request:
<!--CDRonDemand API - get_file_list - Request (datetime format is in UTC time)-->
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
<soapenv:Header/>
<soapenv:Body>
<soap:get_file_list>
<soap:in0>201409121600</soap:in0>
<soap:in1>201409121700</soap:in1>
<soap:in2>true</soap:in2>
</soap:get_file_list>
</soapenv:Body>
</soapenv:Envelope>
Example of get_file request:
<!--CDRonDemand API - get_file - Request-->
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:CDRonDemand">
<soapenv:Header/>
<soapenv:Body>
<urn:get_file soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0>sftp-server.server.com</in0>
<in1>user</in1>
<in2>password</in2>
<in3>/tmp</in3>
<in4>cdr_StandAloneCluster_01_201409121628_189</in4>
<in5>true</in5>
</urn:get_file>
</soapenv:Body>
</soapenv:Envelope>
More details on application access to CDRs can be found here: https://developer.cisco.com/site/sxml/
Upvotes: 1