Hello everyone,
I¿m currently working on the Java UCX API, in the purpose of developping a Click to Call application. But i¿m experiencing problems, that i¿m not able to identify.
I¿m using UCX-si_sdk-1.0.1
First of all, as on another topic, i¿m catching this weird error :
Mar 31 13:36:26.059: //CTI/XML:ERROR: csta2cti_DeviceID: device size(13) is bigger than buffer size(13)
Trying to change the ¿cti csta mode basic¿ to ¿no¿ doesn¿t change anything to that problem. But i¿m not sure it¿s really a problem, as on the first part, my Java program is working correctly. I explain :
In a first part, i use the CMEXmlHttp to get my devices and their statuses : everything fine right there.
Then i establish a CME Connection and I add all my listeners on CME (CMEProviderListener) and devices (CMECSTAListenerImpl) respectively.
Here, i wonder if i have to use a specific instance of listener to each device or if i should attach the same one to every device i want to monitor and control. Tried both and I have the same behaviour.
It seems that i receive all XML messages correctly :
- Status request
Mar 31 13:36:26.055: CTI_PARSER

rocessing XML message
<?xml version="1.0"?>
<RequestSystemStatus xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<extensions>
<privateData>
<private>
<lcs:line xmlns:lcs="http://schemas.microsoft.com/Lcs/2005/04/RCCExtension">
tel:15;device=000BBEB2570F
</lcs:line>
</private>
</privateData>
</extensions>
</RequestSystemStatus>
- Status request response :
Mar 31 13:36:26.059: //CTI/XML:csta_xml_builder: XML message evt->protocol(1) buffer size(2000), return length(566), message(566)
<?xml version="1.0" encoding="UTF-8"?>
<RequestSystemStatusResponse xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<systemStatus>normal</systemStatus>
<extensions>
<privateData>
<private>
<oct:targetDevices xmlns:oct="http://schemas.cisco.com/oct/2009/01/RCCExtension">
<oct:targetDeviceListItem xmlns:oct="http://schemas.cisco.com/oct/2009/01/RCCExtension">
<endpoint>
<deviceID>tel:15;device=000BBEB2570F</deviceID>
</endpoint>
</oct:targetDeviceListItem>
</oct:targetDevices>
</private>
</privateData>
</extensions>
</RequestSystemStatusResponse>
- CSTA Features response :
Mar 31 13:36:26.115: //CTI/XML:csta_xml_builder: XML message evt->protocol(1) buffer size(2000), return length(1163), message(1163)
<?xml version="1.0" encoding="UTF-8"?>
<GetCSTAFeaturesResponse xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<supportedServices>
<systemStatServList>
<requestSystemStatus/>
<systemStatus/>
</systemStatServList>
<monitoringServList>
<monitorStart/>
<monitorStop/>
</monitoringServList>
<snapshotServList>
<snapshotDevice/>
</snapshotServList>
<callControlServList>
<answerCall/>
<clearConnection/>
<consultationCall/>
<deflectCall/>
<directedPickupCall/>
<holdCall/>
<makeCall/>
<parkCall/>
<retrieveCall/>
<singleStepTransfer/>
<transferCall/>
</callControlServList>
<logicalServList>
<getDoNotDisturb/>
<getForwarding/>
<setDoNotDisturb/>
<setForwarding/>
</logicalServList>
</supportedServices>
<supportedEvents>
<callControlEvtsList>
<connectionCleared/>
<delivered/>
<diverted/>
<established/>
<failed/>
<held/>
<originated/>
<queued/>
<retrieved/>
<transferred/>
</callControlEvtsList>
<callAssociatedEvtsList>
<serviceCompletionFailure/>
</callAssociatedEvtsList>
<mediaEvtsList>
<mediaAttached/>
<mediaDetached/>
</mediaEvtsList>
<logicalEvtsList>
<doNotDisturb/>
<forwarding/>
</logicalEvtsList>
</supportedEvents>
</GetCSTAFeaturesResponse>
- Monitor Start request
Mar 31 13:36:26.171: CTI_PARSER

rocessing XML message
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MonitorStart xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<monitorObject>
<deviceObject>tel:15</deviceObject>
</monitorObject>
</MonitorStart>
- Monitor Response, with ref ID :
Mar 31 13:36:26.171: //CTI/XML:csta_xml_builder: XML message evt->protocol(1) buffer size(2000), return length(202), message(202)
<?xml version="1.0" encoding="UTF-8"?>
<MonitorStartResponse xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<monitorCrossRefID>00000020</monitorCrossRefID>
</MonitorStartResponse>
At this point, I suppose everything is fine, as everything seems attached correctly. My program and SDK also
returns :
Initializing new AppManager...
Connecting to CME...
Logfile : ./logs/cme-%t.log
Provider started successfully
Listener added successfully
Provider in service now
Adding ALL phones...
Terminal created on phone 15
CMEAddress created on phone 15
Listener attached on phone 15
phone added: 15 MAC: 000BBEB2570F
Terminal created on phone 14
CMEAddress created on phone 14
Listener attached on phone 14
phone added: 14 MAC: 0003E3736873
[CSTA 1.0] CMENotification: EVAddress=15,Term=[-Terminal-, Addr=15IN_SERVICE, Mac=000BBEB2570F)]
from: [Term: 000BBEB2570F, Addr:15]
MonRef: 00000050
[CSTA 1.0] CMENotification.Type.ADDRESS_ACTIVATED
CMEAddressActivatedEvent received : 15
Session is READY
[CSTA 1.0] CMENotification: EVAddress=14,Term=[-Terminal-, Addr=14IN_SERVICE, Mac=0003E3736873)]
from: [Term: 0003E3736873, Addr:14]
MonRef: 00000051
[CSTA 1.0] CMENotification.Type.ADDRESS_ACTIVATED
CMEAddressActivatedEvent received : 14
Session is READY
The router tells that session are ready for devices :
#show cti session
ID DN Num Tag Mac MRef CreateTime #Msg
==== ========== === ============ ==== ==================== ====
1205 15 0 000BBEB2570F 80 Apr 01 2011 10:29:19 3
1206 14 0 0003E3736873 81 Apr 01 2011 10:29:19 3
Then it¿s time to make a call. Everything works fine by there. The calling device is dialing and opening a call to the called device. The called device is ringing, with an incoming call from the calling device. Perfectly matching the scenario.
[CSTA 1.0] CMENotification: EVAddress=14,Term=[-Terminal-, Addr=14IN_SERVICE, Mac=0003E3736873)]
from: [Term: 0003E3736873, Addr:14]
MonRef: 00000052
[CSTA 1.0] CMENotification.Type.ADDRESS_ACTIVATED
CMEAddressActivatedEvent received : 14
Session is READY
[CSTA 1.0] CMENotification: EVAddress=15,Term=[-Terminal-, Addr=15IN_SERVICE, Mac=000BBEB2570F)]
from: [Term: 000BBEB2570F, Addr:15]
MonRef: 00000053
[CSTA 1.0] CMENotification.Type.ADDRESS_ACTIVATED
CMEAddressActivatedEvent received : 15
Session is READY
Making call...
Ringing status:
14: false
15: true
Thread Thread-13, run() end
event: CMEResponse: type=1001requestType=MAKE CALL
true
CMERequest: CMERequest: type=MAKE CALLbody= <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MakeCall xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<callingDevice>tel:14</callingDevice>
<calledDirectoryNumber>tel:15;phone-context=dialstring</calledDirectoryNumber>
<autoOriginate>doNotPrompt</autoOriginate>
</MakeCall>
getInternalResposneCallback: [-Call-, GCID=null, state=ACTIVE, CallConns=(
Conn[0]=[-Connection-, address=14, type=CALLING, state=MOUNTED)]
,
Conn[1]=[-Connection-, address=15, type=CALLED, state=MOUNTED)]
)]
CMERequest.Type.CALL_MAKE = 1001
CallMakeResponse received
Here comes the trouble. As soon as the call is initiated, the sessions seems like they are ¿consummed¿, and they¿re gone :
#show cti session
ID DN Num Tag Mac MRef CreateTime #Msg
==== ========== === ============ ==== ==================== ====
After that, impossible either to answer the call through the app or to end it. I have to initialise again all the devices listeners, CMECSTAListeners, to hget a new session on the phones. But even there, I still can¿t end the call, because the call was never answered for the application. I got no TerminalConnection from the device.
My question is simple. Why do I have only one event by phone, and then the session is destroyed ?
If I¿m wrong about the scenario, may someone explain me the way to monitor a phone whitout losing control of it at anytime ?