Cisco Unified Application Environment Developer Forums

« Back to Developers

CTI Ports: how to get events and status

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hi to all,
I Still don't understand why I can't place onhold calls on my CTI Ports controlled with a CTI Device Pool.
I need this feature to signaling other devices linked via SIP Trunk with my CUCM.
 
How can I get if my CTI Ports have some calls in progress ?  For Call Controll API I haven't found such a method like JTapiGetActiceCalls. 
How can I get call events for  my CTI Ports once a call is in progess on it ? I need events like Call On Hold, Resume,...
If I use JTAPI/TAPI directly i have all of this feature.
 
Thank you.

Hi Stefania,

There is a bit of doubt in the way you are trying to use the CTI ports. I feel you need to be taken through the differences between a ¿1st party call control¿ and a ¿3rd party call control¿ to get this issue solved.

In a 1st party call control, a call is initiated from a phone ¿A¿ to a CTI port which routes the call to the CUAE server. For this scenario, CUAE is now the endpoint. So, we now have a call established between phone A and the CUAE server.

In a 3rd party call control, a call is established between phone A and phone B and CUAE is not at all involved in the established call. But, it has the capability of monitoring the devices or endpoints. In order to achieve this, either phone A or phone B or both are added to a monitored CTI pool. So, the CUAE can now get each and every information about the status of the endpoints, phone A or phone B, whichever is added to the monitored device pool. The API¿s for the 3rd party call control are the ones that start with JTapi . Normally, the devices added to the monitored pool are physical IP phones. But, even if we add a CTI port to the monitored pool, the port can be monitored.

Thus, for any monitoring of devices or getting information on the status of the endpoints or devices, 3rd party call control methodology needs to be followed.

Regards,
Sudhanshu

As I've already posted in the past, JTapiHold function got me an error if I use it with a CTI Port in a monitored Device Pool. Below you can see the log:

): Info: JTapiMonitor Enqueuing non-triggering event: Metreos.Providers.JTapi.JTapiCallActive
2011.06.16..09.44.53(19): Info: JTapiMonitorCallEstablished-1 ****Using Function 'OnJTapiCallActive'********************
2011.06.16..09.44.53(19): Verbose: JTapiMonitorCallEstablished-1 Executing action 'Metreos.Providers.JTapi.JTapiGetDeviceStatus' (634309398647149464)
2011.06.16..09.44.53(19): Verbose: R Destination is Metreos.Providers.JTapi
2011.06.16..09.44.53(19): Verbose: R Message ID before calling PM.RA: Metreos.Providers.JTapi.JTapiGetDeviceStatus
2011.06.16..09.44.53(19): Verbose: JTP Sent GetDeviceStatus. deviceName:CTIP_TE02
2011.06.16..09.44.53(19): Verbose: JTP GetDeviceStatus request sent, waiting for response from stack...CallId:1000012, DeviceNameCTIP_TE02
2011.06.16..09.44.53(19): Verbose: JTP Got 58(DeviceStatus) message from v7.1.
2011.06.16..09.44.53(19): Verbose: JTP Field: 5(DeviceName) = CTIP_TE02
2011.06.16..09.44.53(19): Verbose: JTP Field: 40(CallId) = 1000012
2011.06.16..09.44.53(19): Verbose: JTP Field: 59(DeviceStatus) = 1
2011.06.16..09.44.53(19): Verbose: JTP Field: 63(ResultCode) = 0
2011.06.16..09.44.53(20): Verbose: JTP Received DeviceStatus message from JTAPI service
2011.06.16..09.44.53(20): Verbose: JTP Received OnDeviceStatus message from JTAPI proxy
2011.06.16..09.44.53(20): Verbose: JTP Updating transaction results1000012
2011.06.16..09.44.53(20): Verbose: JTP Releasing lock on device CTIP_TE02
2011.06.16..09.44.53(20): Verbose: JTP Got response for GetDeviceStatus message; released the lock: CallId:1000012
2011.06.16..09.44.53(20): Verbose: JTapiMonitorCallEstablished-1 Got success response for 'Metreos.Providers.JTapi.JTapiGetDeviceStatus' (634309398647149464)
2011.06.16..09.44.53(20): Verbose: JTapiMonitorCallEstablished-1 Executing action 'Metreos.Native.Log.Write' (634305115729249897)
2011.06.16..09.44.53(20): Info: JTapiMonitorCallEstablished-1 Application: JTAPICALLMONITOROnJtapiCALLACTIVE: 31010102 WITH CALLID: 1000011 DEVICE STATUS: Active
2011.06.16..09.44.53(20): Verbose: JTapiMonitorCallEstablished-1 Executing action 'Metreos.Providers.JTapi.JTapiHold' (634438139971481530)
2011.06.16..09.44.53(20): Verbose: R Destination is Metreos.Providers.JTapi
2011.06.16..09.44.53(20): Verbose: R Message ID before calling PM.RA: Metreos.Providers.JTapi.JTapiHold
2011.06.16..09.44.53(20): Verbose: JTP Sent Hold. stackCallId:SMdNlPxTCJ8pjq5Z
2011.06.16..09.44.53(21): Verbose: JTapiMonitorCallEstablished-1 Got success response for 'Metreos.Providers.JTapi.JTapiHold' (634438139971481530)
2011.06.16..09.44.53(21): Verbose: JTapiMonitorCallEstablished-1 Executing action 'Metreos.ApplicationControl.EndFunction' (634309398647149462)
2011.06.16..09.44.53(23): Verbose: JTP Got 98(MediaEstablished) message from v7.1.
2011.06.16..09.44.53(23): Verbose: JTP Field: 5(DeviceName) = CTIP_TE02
2011.06.16..09.44.53(23): Verbose: JTP Field: 6(DeviceType) = 2
2011.06.16..09.44.53(23): Verbose: JTP Field: 21(TxIP) = 10.3.5.120
2011.06.16..09.44.53(23): Verbose: JTP Field: 22(TxPort) = 25866
2011.06.16..09.44.53(23): Verbose: JTP Field: 25(Codec) = 1
2011.06.16..09.44.53(23): Verbose: JTP Field: 26(Framesize) = 10
2011.06.16..09.44.53(23): Verbose: JTP Field: 40(CallId) = SMdNlPxTCJ8pjq5Z
2011.06.16..09.44.53(23): Verbose: JTP Field: 41(To) = 31010102
2011.06.16..09.44.53(23): Verbose: JTP Field: 42(From) = 6502
2011.06.16..09.44.53(23): Verbose: JTP Field: 43(OriginalTo) = 31010102
2011.06.16..09.44.53(23): Verbose: JTP Field: 66(JTapiCallId) = 21011/1
2011.06.16..09.44.58(21): Verbose: JTP Got 0(Error) message from v7.1.
2011.06.16..09.44.58(21): Verbose: JTP Field: 0(FailReason) = 16
2011.06.16..09.44.58(21): Verbose: JTP Field: 7(MessageType) = 48
2011.06.16..09.44.58(22): Verbose: JTP Field: 52(Args) = System.Byte[]
2011.06.16..09.44.58(22): Verbose: JTP Field: 99(Message) = CTIERR_TIMEOUT: Cti request timed out
2011.06.16..09.44.58(22): Verbose: JTP Field: 99(Message) = CTIERR_TIMEOUT: Cti request timed out
2011.06.16..09.44.58(22): Error: JTP Call SMdNlPxTCJ8pjq5Z encountered an error (PlatformException): CTIERR_TIMEOUT: Cti request timed out

My script works well if i use it with IP Phone. Only with CTI port it doesn't work, but I have to use CTI Port. And I have to use CUAE. If I use JTapi directly from my application I can do this with CTI Port.
Any ideas ?

Hi Stefania,

I am not able to understand your use case clearly. It seems you are already using a CUAE for monitoring the actual devices as well as you want to monitor the CTI ports. That is where the use case gets complicated. May be using the same server for monitoring both the devices and the CTI ports may create a mismatch. Try using two separate CUAE servers, one for the devices and the other for the CTI ports and see if that helps. Also, if you could explain your use case in details, we would be able to tackle the issue in a different way.

Regards,
Sudhanshu

In the previuos script I have only the CTI Port named CTIP_TE02 monitored.
So I placed a call from an IP Phone (6502) to the CTI Port (31010102). In the script triggered by the OnJTapiIncomingCall event I answered the call and then in the OnJTapiCallActive event I tried to put the call OnHold with JTapiOnHold Method...This did not work.
I Got success response for 'Metreos.Providers.JTapi.JTapiHold' but the call never went onHold.
I tried also with JTapiCallPark and didn't work.
Why ?

If instead I use an IP Phone in place of the CTI Port my script works well...
This is only a test, I have to see if I can monitor CTI Ports in order to implement a more complex queuing system where I use CTI Ports to hold incoming calls before routing them to the right destinations.
 
I have two CUAE server but with redundancy....I can't use another server to monitor CTI Ports and devices...

Hi,

Is it possible then to have 3rd party call control using Jtapi.GetDeviceStatus over Non-Cisco IP Phones? Maybe by adding voice lines to CTI Ports and using seperate CUAE?

Thanks

Hi,

the problem occurs because we are trying to use the same device as 1st party call control endpoint and as a 3rd party monitoring device. So, from the CUCM point of view it is not able to identify whether to use CUAE (where the CTI port is registered) as a 1st party endpoint or a 3rd party monitoring device. The same problem occurs even if we use two servers. We earlier thought that using two server would rectify this problem by providing specific usage to the device in the two servers. But on testing a few applications, in this scenario, we realised that this is not possible. We can only monitor devices that physically exist, i.e. existing IP phones.

Regards,
Sudhanshu

 But on testing a few applications, in this scenario, we realised that this is not possible. We can only monitor devices that physically exist, i.e. existing IP phones.

Regards,
Sudhanshu

Can you confirm that ? CUAE is a requirements of my client. If we can't monitoring in a 3rd party call controll a CTI Ports, all my design regarding the project falls down, so I have to tell my client to exclude CUAE from the project, becasue with JTapi/Tapi I am able to do this.
I need an official confirmation, from Cisco. Are you a person from Cisco ?
 
Thank you, Stefania.

Hi Stefania,

Why are you using JTAPIHold API. If you want to implement routing mechanism then monitor CTI port uising CUAE script. You CUAE script will get JTAPIIncoimgCall notification. Based on you routing logic you can route call to other destination using JTAPIRedirect API. Don't answer call on CTI Port.
Length of your queue/CTI Port can be configured on CUCM CTI Port configration page (Maximum Number of Calls/Busy Trigger configuration). May be this will help you.

Regards,
Umesh

Hi Stefania,

Why are you using JTAPIHold API. If you want to implement routing mechanism then monitor CTI port uising CUAE script. You CUAE script will get JTAPIIncoimgCall notification. Based on you routing logic you can route call to other destination using JTAPIRedirect API. Don't answer call on CTI Port.
Length of your queue/CTI Port can be configured on CUCM CTI Port configration page (Maximum Number of Calls/Busy Trigger configuration). May be this will help you.

Regards,
Umesh

As I already posted in other thread I can't route directly call to the destination, because I have to do this only and anly if operator gives his consent. So I have to hold incoming calls in CTI Ports, waiting for this approval. My script is triggered by the JTapiIncomingCall event. This script is only a test, I use CTI Route Point to route incoming call to CTI Port, and that part works well...but now we have to test if we can place on Hold calls on CTI Ports. This is our requirements. I can't understand why I can't use JTapiHold function since I'm monitoring CTI Port in a Monitored Device Pool.
 
We are implementing a phone system for managing communications of a control room operational subway lines. So incoming calls can coming from trains, emergency intercoms, and other embedded systems linked with CUCM via SIP Trunk. In some cases I have to place OnHold the incoming call because before routing to the destination (not necessarily an operator) I have to implement some business logic due to the tecnology from whcich the call comes from...such as calling web services or sending embedded commands.
So I have to know if CUAE is able to do this functionality as I already do in other projects where I don't use CUAE. This naswer is very important for me, because I'm using SDK licences and in a very short time I have to decide if to  buy operating licences.
Thank you.