简介
本文档介绍思科提供的可用于测试OCI-P命令和连接的演示客户端的使用。
先决条件
要求
- Asociclient可以安装在PC或服务器上。
- 需要将传入请求源的IP地址添加到BroadWorks网络访问列表。
- 需要有效的OCI-P命令。
BroadWorks配置
在本例中,OCISenderTool托管在服务器172.16.30.3上。
确保此IP已添加到OCI-P Network Access List AS_CLI/System/NetworkAccessLists/OCI/Provisioning>中。
AS_CLI/System/NetworkAccessLists/OCI/Provisioning> get
Address Description
============================
...
172.16.30.3 OCISenderTool
OCI-P命令
在本例中,为企业pws_ent和组pws_grp使用命令“GroupAccessDeviceGetListRequest”。
此文件称为“pws_GroupAccessDeviceGetListRequest.xml”。
<?xml version="1.0" encoding="ISO-8859-1"?>
<BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">%%%OCI_SESSION_ID%%%</sessionId>
<command xsi:type="GroupAccessDeviceGetListRequest" xmlns="">
<serviceProviderId>pws_ent</serviceProviderId>
<groupId>pws_grp</groupId>
</command>
</BroadsoftDocument>
使用选项
要运行此命令,您需要选择相关参数。
[bwadmin@bwtaclab ASOCICLIENT]$ ./startASOCIClient.sh
**** OCI Client Build Version: 1.1.2
**** Usage:
startOCIClient configFile
startOCIClient loginId password [-i inputXMLFile] [-o outputXMLFile] [-h host] [-p port]
[-m {un}secure/{s}ecure] [-c BCCT/OCS] [-t timeOut] [-s sessionID] [-l loginRequestName] [-f tabSize]
loginId LoginId of the user (mandatory)
password Password of the user (mandatory)
-i inputXMLFile File containing the XML Request
-o outputXMLFile File to write the XML Response. File is over-written.
If not provided will default to: inputXMLFile.response.xml)
-h host HostName to connect to. Default is localhost
-p port Port to connect to. Default is 31000
-m mode Unsecure/Secure mode for login
-c connection BCCT or OCS
-t timeOut Timeout in seconds to pause for a response from the server.
(Default is 30 seconds, if set to -1 will never timeout)
-s sessionID session ID
-l loginRequest name of the login request, i.e. LoginRequest or LoginRequest22
-f tab size formats the response XML to make it pretty (off by default)
实验示例
AS拨备
- 如果您希望通过AS(172.16.30.127)推送请求并使用BCCT(端口2220),则设置示例。
loginId - admin
password - admin
inputXMLFile - /Commands/pws_GroupAccessDeviceGetListRequest.xml
host - 172.16.30.127
port - 2220
connection - BCCT
bwadmin@bwtaclab ASOCICLIENT]$ ./startASOCIClient.sh admin admin -i
./Commands/pws_GroupAccessDeviceGetListRequest.xml -h 172.16.30.127 -p 2220 -c BCCT
**** OCI Client Build Version: 1.1.2
**** Start OCIClient initialization --> 2022.05.12 04:06:14:540 EDT
**** Sending request at: 2022.05.12 04:06:14:566 EDT
==========>
<?xml version="1.0" encoding="UTF-8"?>
<BroadsoftDocument protocol = "OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">172.16.30.3,460141958,1652342774546</sessionId>
<command xsi:type="LoginRequest22V3" xmlns="">
<userId>admin</userId>
<password>admin</password>
</command>
</BroadsoftDocument>
<==========================
**** Received response (Request process time: 176 ms)
==========>
<?xml version="1.0" encoding="UTF-8"?>
<BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">172.16.30.3,460141958,1652342774546</sessionId>
<command echo="" xsi:type="LoginResponse22V3" xmlns="">
<loginType>System</loginType>
<locale>en_US</locale>
<encoding>ISO-8859-1</encoding>
<isEnterprise>false</isEnterprise>
<passwordExpiresDays>2147483647</passwordExpiresDays>
<userDomain>calo.cisco.com</userDomain>
<tokenRevocationTime>1616017564343</tokenRevocationTime>
</command>
</BroadsoftDocument>
<==========================
LoginRequest command successful
**** Reading request(s) from file: ./Commands/pws_GroupAccessDeviceGetListRequest.xml
**** Writing response to file: ./Commands/pws_GroupAccessDeviceGetListRequest.xml.response.xml
**** Sending request from file: ./Commands/pws_GroupAccessDeviceGetListRequest.xml
at: 2022.05.12 04:06:14:745 EDT
==========>
<?xml version="1.0" encoding="ISO-8859-1"?>
<BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">172.16.30.3,460141958,1652342774546</sessionId>
<command xsi:type="GroupAccessDeviceGetListRequest" xmlns="">
<serviceProviderId>pws_ent</serviceProviderId>
<groupId>pws_grp</groupId>
</command>
</BroadsoftDocument>
<==========================
**** Received response (Request process time: 1304 ms)
==========>
<?xml version="1.0" encoding="ISO-8859-1"?>
<BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">172.16.30.3,460141958,1652342774546</sessionId>
<command echo="" xsi:type="GroupAccessDeviceGetListResponse"
....<snipped_response>...
XSP/ADP上的调配
设置示例:如果您希望通过XSP/ADP(172.16.30.71)推送请求并使用OCS(端口2208)。
loginId - admin
password - admin
inputXMLFile - /Commands/pws_GroupAccessDeviceGetListRequest.xml
host - 172.16.30.71
port - 2208
connection - OCS
./startASOCIClient.sh admin admin -i ./Commands/pws_GroupAccessDeviceGetListRequest.xml -h 172.16.30.71
-p 2208 -c OCS
日志示例
从PSLog中看到的此请求类型的日志示例。
2022.05.12 03:43:05:463 EDT | FieldDebug | Generic | BCCT Worker #1
OCI Transaction com.broadsoft.oci.transactions.group.GroupAccessDeviceGetListTransaction read38257
executed.
User: Default Administrator (admin) Authorization Level: System
Start Time: 2022.05.12 03:43:03:616 EDT
End Time: 2022.05.12 03:43:05:463 EDT
Duration: 1847 ms
相关信息
文档
BW-ASProvisioningInterfaceSpec
软件
独立于版本- Rel_2022_08_asociclient
版本24 - Rel_24_0_asociclient
版本23 - Rel_23_asociclient
Relesse 22 - Rel_22_asociclient