简介
本文档介绍如何排除IP电话的“公司目录”功能中的“找不到主机”问题。与本文档相关的重要信息是:
- 企业目录是思科提供的默认IP电话服务,它随Cisco Unified Communications Manager(CUCM)自动安装。
- 电话订用到各种电话服务的信息存储在数据库中的telecasterservice、telecasterserviceparameter、telecastersubscribedparameter、telecastersubscribedservice表中。
- 在电话上,当您选择“Corporate Directory”选项时,电话会向其中一个CUCM服务器发送HTTP或HTTPS请求,并返回XML对象作为HTTP(S)响应。如果HTTPS,则这还取决于连接到TVS服务的电话来验证HTTPS的证书。在支持中端电话的电话上,这可能在电话中端中实施,并受服务调配设置影响。
重要信息
- 明确在您访问“目录”或“公司目录”时是否出现问题。
- “Service URL”字段在“Corporate Directory”服务下设置为什么?
- 如果URL设置为“Application:Cisco/CorporateDirectory”,则根据电话的固件版本,电话发出HTTP或HTTPS请求。
- 默认情况下,使用固件版本9.3.3及更高版本的电话发出HTTPS请求。
- 当服务URL设置为“Application:Cisco/CorporateDirectory”时,电话会将HTTP(S)请求发送到服务器,该服务器是CallManager(CM)组中的第一个服务器。
- 确定电话和发送HTTP(S)请求的服务器之间的网络拓扑。
- 请注意可以丢弃/阻碍HTTP(S)流量的路径中的防火墙、WAN优化程序等。
- 如果HTTPS正在使用,请确保电话和TVS服务器之间的连接,并且TVS正常运行。
工作场景
在此场景中,电话服务URL设置为“Application:Cisco/CorporateDirectory”,电话使用HTTPS。
此示例显示具有正确URL的电话的配置文件。
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor></vendor>
<version></version>
</phoneService>
从电话控制台日志中,您将能够验证这些步骤。
- 电话使用HTTPS URL。
7949 NOT 11:04:14.765155 CVM-appLaunchRequest: [thread=AWT-EventQueue-0]
[class=cip.app.G4ApplicationManager] Creating application module -
Corporate Directory
7950 ERR 11:04:14.825312 CVM-XsiAppData::getCdUrl:
[thread=appmgr MQThread]
[class=cip.app.ar] Using HTTPS URL
- 从目录服务器向电话提供的Tomcat Web证书在电话上不可用。因此,电话尝试通过信任验证服务(TVS)对证书进行身份验证。
7989 ERR 11:04:15.038637 SECD: -HTTPS cert not in CTL, <10.106.111.100:8443>
7990 NOT 11:04:15.038714 SECD: -TVS service available, will attempt via TVS
- 电话首先在TVS缓存中查看,如果未找到,则与TVS服务器联系。
7995 NOT 11:04:15.039286 SECD: -TVS Certificate Authentication request
7996 NOT 11:04:15.039394 SECD: -No matching entry found at cache
- 由于与TVS的连接也是安全的,因此证书身份验证已完成,如果成功,则会打印此消息。
8096 NOT 11:04:15.173585 SECD: -Successfully obtained a TLS connection
to the TVS server
- 现在,电话发送请求对证书进行身份验证。
8159 NOT 11:04:15.219065 SECD: -Successfully sent the certificate Authentication
request to TVS server, bytes written : 962
8160 NOT 11:04:15.219141 SECD: -Done sending Certificate Validation request
8161 NOT 11:04:15.219218 SECD: -Authenticate Certificate : request sent to
TVS server - waiting for response
- 来自TVS的响应“0”表示身份验证成功。
8172 NOT 11:04:15.220060 SECD: -Authentication Response received, status : 0
- 系统将显示此消息,然后您将看到响应。
8185 NOT 11:04:15.221043 SECD: -Authenticated the HTTPS conn via TVS
8198 NOT 11:04:15.296173 CVM-[truncated] Received
HTTP/1.1 200 OK^M
X-Frame-Options: SAMEORIGIN^M
Set-Cookie: JSESSIONID=660646D3655BB00734D3895606BCE76F;
Path=/ccmcip/; Secure; HttpOnly^M
Content-Type: text/xml;charset=utf-8^M
Content-Length: 966^M
Date: Tue, 30 Sep 2014 11:04:15 GMT^M
Server: ^M
^M
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CiscoIPPhoneInput>
<Title>Directory Search</Title><Prompt>Enter search criteria</Prompt><SoftKeyItem>
<Name>Search</Name><Position>1</Position><URL>SoftKey:Submit</URL></SoftKeyItem>
<SoftKeyItem><Name><<</Name><Position>2</Position><URL>SoftKey:<<</URL>
</SoftKeyItem><SoftKeyItem><Name>Cancel</Name><Position>3</Position>
<URL>SoftKey:Cancel</URL></SoftKeyItem>
<URL>https://10.106.111.100:8443/ccmcip/xmldirectorylist.jsp</URL>
<InputItem><DisplayName>First Name</DisplayName>
<QueryStringParam>f</QueryStringParam><InputFlags>A</InputFlags>
<DefaultValue></DefaultValue></InputItem><InputItem>
<DisplayName>Last Name</DisplayName><QueryStringParam>l</QueryStringParam>
<InputFlags>A</InputFlags><DefaultValue></DefaultValue></InputItem><InputItem>
<DisplayName>
证书身份验证过程类似于“未知证书的电话联系人信任验证服务”中讨论的内容。
从电话端收集的数据包捕获(PCAP)中,您应该能够使用此过滤器(“tcp.port==2445”)验证TVS通信。
在同时TVS日志中:
- 查看与传输层安全(TLS)握手相关的跟踪。
- 接下来,查看传入的十六进制转储。
04:04:15.270 | debug ipAddrStr (Phone) 10.106.111.121
04:04:15.270 |<--debug
04:04:15.270 |-->debug
04:04:15.270 | debug 2:UNKNOWN:Incoming Phone Msg:
.
.
04:04:15.270 | debug
HEX_DUMP: Len = 960:
04:04:15.270 |<--debug
04:04:15.270 |-->debug
04:04:15.270 | debug 57 01 01 00 00 00 03 ea
.
<< o/p omitted >>
.
04:04:15.271 | debug MsgType : TVS_MSG_CERT_VERIFICATION_REQ
- TVS检索颁发者详细信息。
04:04:15.272 |-->CDefaultCertificateReader::GetIssuerName
04:04:15.272 | CDefaultCertificateReader::GetIssuerName got issuer name
04:04:15.272 |<--CDefaultCertificateReader::GetIssuerName
04:04:15.272 |-->debug
04:04:15.272 | debug tvsGetIssuerNameFromX509 - issuerName :
CN=cucm10;OU=TAC;O=Cisco;L=Blore;ST=KN;C=IN and Length: 43
04:04:15.272 |<--debug
- TVS验证证书。
04:04:15.272 | debug tvsGetSerialNumberFromX509 - serialNumber :
6F969D5B784D0448980F7557A90A6344 and Length: 16
04:04:15.272 | debug CertificateDBCache::getCertificateInformation -
Looking up the certificate cache using Unique MAP ID :
6F969D5B784D0448980F7557A90A6344CN=cucm10;OU=TAC;O=Cisco;L=Blore;ST=KN;C=IN
04:04:15.272 | debug CertificateDBCache::getCertificateInformation -
Certificate compare return =0
04:04:15.272 | debug CertificateDBCache::getCertificateInformation -
Certificate found and equal
- TVS将响应发送到电话。
04:04:15.272 | debug 2:UNKNOWN:Sending CERT_VERIF_RES msg
04:04:15.272 | debug MsgType : TVS_MSG_CERT_VERIFICATION_RES
电话服务URL设置为“Application:Cisco/CorporateDirectory”,且电话使用HTTP
注意:服务和安全服务URL不是使用早期的电话固件版本,而是硬编码为HTTP URL。但是,默认情况下,在使用HTTP的电话固件中会看到相同的事件序列。
电话的配置文件具有正确的URL。
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor></vendor>
<version></version>
</phoneService>
从电话控制台日志中,您将能够验证这些步骤。
7250 NOT 11:44:49.981390 CVM-appLaunchRequest: [thread=AWT-EventQueue-0]
[class=cip.app.G4ApplicationManager] Creating application module -
Corporate Directory/-838075552
7254 NOT 11:44:50.061552 CVM-_HTTPMakeRequest1: Processing Non-HTTPS URL
7256 NOT 11:44:50.061812 CVM-_HTTPMakeRequest1() theHostname: 10.106.111.100:8080
7265 NOT 11:44:50.233788 CVM-[truncated] Received
HTTP/1.1 200 OK^M
X-Frame-Options: SAMEORIGIN^M
Set-Cookie: JSESSIONID=85078CC96EE59CA822CD607DDAB28C91;
Path=/ccmcip/; HttpOnly^M
Content-Type: text/xml;charset=utf-8^M
Content-Length: 965^M
Date: Tue, 30 Sep 2014 11:44:50 GMT^M
Server: ^M
^M
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CiscoIPPhoneInput>
<Title>Directory Search</Title><Prompt>Enter search criteria</Prompt><SoftKeyItem>
<Name>Search</Name><Position>1</Position><URL>SoftKey:Submit</URL></SoftKeyItem>
<SoftKeyItem><Name><<</Name><Position>2</Position><URL>SoftKey:<<</URL>
</SoftKeyItem><SoftKeyItem><Name>Cancel</Name><Position>3</Position>
<URL>SoftKey:Cancel</URL></SoftKeyItem>
<URL>http://10.106.111.100:8080/ccmcip/xmldirectorylist.jsp</URL><InputItem>
<DisplayName>First Name</DisplayName><QueryStringParam>f</QueryStringParam>
<InputFlags>A</InputFlags><DefaultValue></DefaultValue></InputItem><InputItem>
<DisplayName>Last Name</DisplayName><QueryStringParam>l</QueryStringParam>
<InputFlags>A</InputFlags><DefaultValue></DefaultValue></InputItem><InputItem>
<DisplayName>Number</D
从数据包捕获中,您将看到HTTP GET请求和成功的响应。以下是来自CUCM的PCAP:

故障排除
在排除故障之前,请收集前面列出的问题的详细信息:
要收集的日志(如果需要)
完成以下步骤以隔离问题:
第 1 步
使用以下详细信息创建测试服务:
Service Name : <Any Name>
Service URL : http://<CUCM_IP_Address>:8080/ccmcip/xmldirectoryinput.jsp
Secure-Service URL : http://<CUCM_IP_Address>:8080/ccmcip/xmldirectoryinput.jsp
Service Category : XML Service
Service Type : Directories
Enable : CHECK
Enterprise Subscription : DO NOT CHECK
现在,将此服务订用到受影响的电话之一:
- 转至设备配置页面。
- 在“相关链接”下选择“订用/取消订用服务”。
- 订阅您创建的测试服务。
- 保存、应用配置并重置电话。
- 您所做的是,无论电话的FW版本(确定是使用HTTP还是HTTPS URL)如何,都要强制它使用HTTP URL。
- 在电话上访问“公司目录”服务。
- 如果它不起作用,则收集上述日志并将其与“工作场景”下所述的工作场景进行比较,并确定差价所在。
- 如果它有效,则您至少确认从CUCM IP电话服务的角度来看没有问题。
- 在此阶段,问题很可能是使用HTTPS URL的电话。
- 现在,选择一个无法工作的电话并继续下一步。
当它处理此更改时,您需要确定是否可以将配置保留为通过HTTP而不是HTTPS工作的公司目录请求/响应。HTTPS通信无法工作,原因之一如下。
步骤 2
收集前面提到的日志,并将其与“工作场景”下提到的工作场景进行比较,确定差价所在。
这可能是以下问题之一:
- 电话无法与TVS服务器联系。
- 在PCAPS中,检验端口2445上的通信。
- 确保路径中的任何网络设备都不阻止此端口。
- 电话与TVS服务器联系,但TLS握手失败。
这些线路将打印在电话控制台日志中:
5007: NOT 10:25:10.060663 SECD: clpSetupSsl: Trying to connect to IPV4,
IP: 192.168.136.6, Port : 2445
5008: NOT 10:25:10.062376 SECD: clpSetupSsl: TCP connect() waiting,
<192.168.136.6> c:14 s:15 port: 2445
5009: NOT 10:25:10.063483 SECD: clpSetupSsl: TCP connected,
<192.168.136.6> c:14 s:15
5010: NOT 10:25:10.064376 SECD: clpSetupSsl: start SSL/TLS handshake,
<192.168.136.6> c:14 s:15
5011: ERR 10:25:10.068387 SECD: EROR:clpState: SSL3 alert
read:fatal:handshake failure:<192.168.136.6>
5012: ERR 10:25:10.069449 SECD: EROR:clpState: SSL_connect:failed in SSLv3
read server hello A:<192.168.136.6>
5013: ERR 10:25:10.075656 SECD: EROR:clpSetupSsl: ** SSL handshake failed,
<192.168.136.6> c:14 s:15
5014: ERR 10:25:10.076664 SECD: EROR:clpSetupSsl: SSL/TLS handshake failed,
<192.168.136.6> c:14 s:15
5015: ERR 10:25:10.077808 SECD: EROR:clpSetupSsl: SSL/TLS setup failed,
<192.168.136.6> c:14 s:15
5016: ERR 10:25:10.078771 SECD: EROR:clpSndStatus: SSL CLNT ERR,
srvr<192.168.136.6>
有关详细信息,请参阅Cisco Bug ID CSCua65618。
- 电话联系TVS服务器,TLS握手成功,但TVS无法验证电话请求进行身份验证的证书的签名者。
TVS日志中的代码段列在此处:
电话与TVS联系。
05:54:47.779 | debug 7:UNKNOWN:Got a new ph conn 10.106.111.121 on 10, Total Acc = 6..
.
.
05:54:47.835 | debug MsgType : TVS_MSG_CERT_VERIFICATION_REQ
TVS获取颁发者名称。
05:54:47.836 |-->CDefaultCertificateReader::GetIssuerName
05:54:47.836 | CDefaultCertificateReader::GetIssuerName got issuer name
05:54:47.836 |<--CDefaultCertificateReader::GetIssuerName
05:54:47.836 |-->debug
05:54:47.836 | debug tvsGetIssuerNameFromX509 - issuerName :
CN=cucmpub9;OU=TAC;O=Cisco;L=Bangalore;ST=KN;C=IN and Length: 49
它查找证书,但找不到它。
05:54:47.836 | debug CertificateCTLCache::getCertificateInformation
- Looking up the certificate cache using Unique MAP ID :
62E09123B09A61D20E77BE5BF5A82CD4CN=cucmpub9;OU=TAC;O=Cisco;L=Bangalore;ST=KN;C=IN
05:54:47.836 |<--debug
05:54:47.836 |-->debug
05:54:47.836 | debug ERROR:CertificateCTLCache::getCertificateInformation
- Cannot find the certificate in the cache
05:54:47.836 |<--debug
05:54:47.836 |-->debug
05:54:47.836 | debug getCertificateInformation(cert) : certificate not found
- HTTPS流量在网络中某处被阻止/丢弃。
从电话和CUCM服务器获取同步PCAP以验证通信。
出现“Host Not Found(找不到主机)”问题时的其他场景
- CUCM服务器由主机名以及名称解析问题定义。
- 下载xmldefault.cnf.xml文件时,电话上的TVS服务器列表为空。(在版本8.6.2中,由于Cisco Bug ID CSCti64589,默认配置文件中将不包含TVS条目。)
- 电话无法使用配置文件中的TVS条目,因为它下载了xmldefault.cnf.xml文件。请参阅Cisco Bug ID CSCuq33297 - Phone,以解析默认配置文件中的TVS信息。
- 在CUCM升级后,公司目录不工作,因为电话固件升级到更高版本,最终会更改默认使用HTTPS的行为。