我正在尝试找到一种方法来使用 JTApi 来接听电话中未接和已完成的呼叫。我知道我可以自己编写这段代码并在 callobserver 中捕获它们,但我特别希望它来自 PBX/Phone。这可能吗?
问问题
374 次
1 回答
1
Cisco JTAPI 不提供对历史呼叫记录的访问,也不是直接查询电话设备的编程方式。对于“实时”通话记录,您需要实施全时通话观察并将通话元数据记录到您自己的数据库中。
历史通话记录可通过 CUCM 的“通话详细记录”功能获得:https ://developer.cisco.com/site/sxml/discover/overview/cdr/
这些 CDR 在每次通话结束时从支持电话发送到 CUCM,并且每 1 分钟(默认情况下)作为 CSV 格式的平面文件收集/存储在 CUCM Publisher 上。
访问 CDR 有两种主要机制:
- FTP/SSH-FTP 交付:在 CUCM 可维护性管理页面中最多可以配置三个目标,其中 CDR 文件将按照配置的时间间隔交付:
- CDRonDemand SOAP API:可以列出一段时间(最多一小时)内可用的 CDR 文件名,以及为 FTP/SSH-FTP 传送到指定位置(即应用程序主机)而请求的单个文件。服务/WSDL 在 CUCM 发布器上可用: https://:8443/realtimeservice2/services/CDRonDemandService?wsdl
get_file_list 请求示例:
<!--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>
get_file 请求示例:
<!--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>
有关应用程序访问 CDR 的更多详细信息,请访问:https ://developer.cisco.com/site/sxml/
于 2017-04-13T17:46:42.930 回答