2017-04-13 62 views
0

我正試圖找到一種方法來使用JTApi從電話中獲取未接來電和已完成的來電。我知道我可以自己編寫這些代碼並將它們捕獲到callobserver中,但我特別希望它來自PBX /電話。 這可能嗎?JTApi和未接來電/先前完成的來電

回答

1

思科JTAPI不提供對歷史通話記錄的訪問,也不是直接查詢電話設備的編程方式。對於「實時」通話記錄,您需要實施全職通話觀察並將通話元數據記錄到您自己的數據庫中。

歷史通話記錄通過CUCM的「呼叫詳細記錄」功能可用:https://developer.cisco.com/site/sxml/discover/overview/cdr/

這些CDR來自於每一個通話結束支持手機CUCM發送,並收集/存儲在CUCM發行每1分鐘(默認情況下)爲CSV格式的平面文件。

有訪問CDR的兩種主要機制:

  • FTP/SSH-FTP傳送:最多三個目的地可以在CUCM可維護性管理頁面,在那裏CDR文件將按照配置的時間間隔傳遞配置: CDR Delivery Target Configuration
  • CDRonDemand SOAP API:可列出一段時間(最多一小時)的可用CDR文件名,並請求FTP/SSH-FTP傳送到指定位置(即應用程序主機)的單個文件。服務/ WSDL是可在CUCM發佈於:https://:8443/realtimeservice2 /服務/ CDRonDemandService WSDL

get_file_list請求的例子:get_file請求

<!--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> 

例子:

對應用程序訪問的CDR
<!--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> 

更多細節可以在這裏找到:https://developer.cisco.com/site/sxml/