cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Regarding CTIOS and Multithreading

365
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Basudeb Acharyya on 17-02-2013 10:07:09 PM
Hello,
I would like to know whether CTIOS(ver 6.0 onwards) support multithreading.
Basically I would like to use CIL  to write a single application(Agent mode) that can receive  receive all agent data (for different CTIOS servers) that it want to subscribe.
My understanding is in Agent mode, we have One agent per session and we have to create for each session for each agent in Agent mode.





So I need to know whether the CTIOS 60.0 onwards  are thread safe or not.

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: David Lender on 18-02-2013 09:07:04 AM
Yes, CTIOS Cils applications can be multithreaded.  Our own Siebel driver is a multi agent mode application.  However, a single agent mode session connects to a single CTIOS server, not multiple ones. That said, I see no reason separate agent mode sessions cannot connect to different CTIOS servers.

CTIOS 6.0 is no longer supported.  CTIOS 7.5 goes off maintenance shortly. Suggest you use CTIOS Cil 8.5 or later.  CTIOS Cils in general are thread safe I have heard of customers creating multi-threaded applications using C++, .NET and Java Cils.

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: David Lender on 18-02-2013 11:57:26 AM
The EOL notices for UCCE (which includes CTIOS) are here

https://www.cisco.com/en/US/products/sw/custcosw/ps1844/prod_eol_notices_list.html

end of SW Maintenance for CTIOS 7.5 is 3/1/2013
end of Support for CTIOS 7.5 is 8/31/2014

I see no reason you can’t create a multi-threaded monitor mode CTIOS application that has a monitor mode connection to each of several CTIOS Servers.  I am not aware of anyone who has done it.  Perhaps others will comment.

Your question 2 would be correct if you mean CTIOS Session object.  You will have multiple agent and call objects but a single CTIOS Session (object) for each CTIOS Server you are connecting to.

Be aware that a monitor mode connection is for monitoring events only.  You cannot control agent or call states via a monitor mode connection.

Also, there is a limit of 2 monitor mode connections per CTIOS Server.

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: Basudeb Acharyya on 18-02-2013 11:43:01 AM
David Lender:
Yes, CTIOS Cils applications can be multithreaded. Our own Siebel driver is a multi agent mode application. However, a single agent mode session connects to a single CTIOS server, not multiple ones. That said, I see no reason separate agent mode sessions cannot connect to different CTIOS servers.

CTIOS 6.0 is no longer supported. CTIOS 7.5 goes off maintenance shortly. Suggest you use CTIOS Cil 8.5 or later. CTIOS Cils in general are thread safe I have heard of customers creating multi-threaded applications using C++, .NET and Java Cils.

Basudeb Acharyya:

Thank you David for your quick reply. I am new in CISCO CTI world. Let me tell you my thoughts:
Basically I want to utilise your CIL(CTIOS 7.5) library to create a single application that can serve the following things:
1.) Create different CTIOS objects in different threads in the same application to connects to different   CTIOS servers.
2.) Each CTIOS object should handle all agents(events and call data) for a particular CTIOS server. Please confirm me whether it is possible or not.
3. Is it possible that we can create a single application in Monitor mode that can handle all agents(events and call data) for all CTIOS servers?
 
Could you please let me know when CTIOS 7.5 goes off maintenance. This is very importnat for us.
Regards,
Basudeb
 

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: Basudeb Acharyya on 18-02-2013 12:31:28 PM
Thank you david. Just one more question:
Currently we are using CTIOS 7.0. As per your mail, it appears to me that currently you aren't supporting any CTI version below 7.5. So if we try to build any application using CTIOS 7.0, we won't get any technical support and maintenence from CISCO. Am I correct?
Regards,
Basudeb

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: David Lender on 18-02-2013 12:53:26 PM
Per the UCCE 7.0, 7.1 and 7.2 EOL notice here:
http://www.cisco.com/en/US/prod/collateral/voicesw/custcosw/ps5693/ps1001/end_of_life_notice_c51-542058_ps1844_Products_End-of-Life_Notice.html

the end of support for these versions is 2/28/2013, so Cisco will not provide any technical support after 2/28/2013.  End of sw maintenance was 8/5/2011 so there are no more maintenance releases for 7.0, 7.1 or 7.2 which means Cisco will not provide any fixes.

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: Shannon McCoy on 18-02-2013 06:07:10 PM
All CTIOS .NET apps are multithreaded. The CTIOS CIL uses an event based asynchronous model which by its nature executes on a background thread. If you check the example code you must ensure that you switch to the UI thread when responding to an event otherwise your app will throw and exception.

As for "thread safety" the CIL is message based and is in essence a fancy wrapper around a set of GED TCP/IP calls to the CTIOS server. As such the CIL per se does not really manage much state in that any state it does maintain is ultimately rectified by the CTIOS server. So while you may maintain a reference to a CTIOS object its really just a wrapper to hold state for essentially what is connectionless/connected model. Bottom line in just about every circumstance the CIL is thread safe.

Unless you have some sort of configuation where the CTIOS servers are non redundant (A/B side) then there is no point to trying to monitor "ALL" servers because only one will be active at time. If the A side server fails then your app should either automatically fail over to the B side ( in Agent Mode ) or you have to add some code to watch for a failure and reinitialize your connection ( in Monitor Mode ). If you try and connect to an inactive server it will simply fail you over to the active one so as I said its kind of pointless.

To maintain muliple sessions you could have a single event processor open the session and dispatch the messages for all sessions which could get messy or you could simply create an even processor for each session and execute the event processor in its own thread, one per session and essentially have multiple silos running in parallell. You could probably even isolate them into their own App Domain if you want even more seperation and process resilency.

It really comes down to what you are trying to achieve and your post is not descriptive enough of your end goal to make an finer detailed assesment. The bottom line is the .NET is fully capable of doing any kind of design you want and the model that the CIL uses lends itself to being used in multiple different ways without too many limitations. The key will be in understanding how to properly mulithread in .NET and using the proper design patterns to achieve your goal. This is generally a far more limiting factor than the CIL is.

Subject: RE: New Message from Basudeb Acharyya in Computer Telephony Integration Obj
Replied by: Basudeb Acharyya on 11-06-2013 04:33:08 PM
Shannon McCoy:
All CTIOS .NET apps are multithreaded. The CTIOS CIL uses an event based asynchronous model which by its nature executes on a background thread. If you check the example code you must ensure that you switch to the UI thread when responding to an event otherwise your app will throw and exception.

As for "thread safety" the CIL is message based and is in essence a fancy wrapper around a set of GED TCP/IP calls to the CTIOS server. As such the CIL per se does not really manage much state in that any state it does maintain is ultimately rectified by the CTIOS server. So while you may maintain a reference to a CTIOS object its really just a wrapper to hold state for essentially what is connectionless/connected model. Bottom line in just about every circumstance the CIL is thread safe.

Unless you have some sort of configuation where the CTIOS servers are non redundant (A/B side) then there is no point to trying to monitor "ALL" servers because only one will be active at time. If the A side server fails then your app should either automatically fail over to the B side ( in Agent Mode ) or you have to add some code to watch for a failure and reinitialize your connection ( in Monitor Mode ). If you try and connect to an inactive server it will simply fail you over to the active one so as I said its kind of pointless.

To maintain muliple sessions you could have a single event processor open the session and dispatch the messages for all sessions which could get messy or you could simply create an even processor for each session and execute the event processor in its own thread, one per session and essentially have multiple silos running in parallell. You could probably even isolate them into their own App Domain if you want even more seperation and process resilency.

It really comes down to what you are trying to achieve and your post is not descriptive enough of your end goal to make an finer detailed assesment. The bottom line is the .NET is fully capable of doing any kind of design you want and the model that the CIL uses lends itself to being used in multiple different ways without too many limitations. The key will be in understanding how to properly mulithread in .NET and using the proper design patterns to achieve your goal. This is generally a far more limiting factor than the CIL is.

Thank you for your reply. Onething is still not clear that whether  CIL(ver 7.5) will allow us to  write an application that will do the following things:
To subscribe to all events and data for all agents for a particular CTIOS server and should also be able to control each agent state(transfer, Hold etc.).
Regards,
Basudeb