Helder De Baere
Helder De Baere

Reputation: 450

JTApi and Missed calls/Previously completed calls

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

Answers (1)

David Staudt
David Staudt

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:

  • FTP/SSH-FTP delivery: up to three destinations can be configured in the CUCM Serviceability admin pages, where CDR files will be delivered per the configured interval: CDR Delivery Target Configuration
  • CDRonDemand SOAP API: available CDR filenames for a time period (up to one hour) can be listed, and individual files requested for FTP/SSH-FTP delivery to a specified location (i.e. the application host). The service/WSDL is available on the CUCM Publisher at: https://:8443/realtimeservice2/services/CDRonDemandService?wsdl

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

Related Questions