The Client Interface Library Session object is used to establish a connection to an active CTI OS server. The main functions of the Session object are:
Managing the connection to the CTI OS Server
Distributing events to the appropriate objects and event subscribers
Creating and managing the collections of Agent, Call, and SkillGroup objects
Automatically recovering from failures
Typically, an application has a single instance of the Session object, which all other CIL objects use to send and receive events. However, there are no restrictions on the number or types of Session objects one application can employ. It is possible, and sometimes desirable, to establish and manage multiple independent Sessions, for example to use multiple current event streams. If there is more than one Session object monitoring the same Agent or Call, each Session object receives its own events. The order in which events are received is not guaranteed when there are multiple Session objects.
The Session object creates new Call, Agent, and SkillGroup objects upon receipt of an event for that object if the targeted object does not already exist. The Session object maintains collections of all Agents, Calls, SkillGroups, and WaitObjects. Object lifetime is managed by the Session object, and thus it is important that the client application not delete the objects, which would render the object reference invalid and lead to unpredictable results. When the Session is Released, the connection to CTI OS server is dropped. Any remaining Agent, Call, Skill Group, or WaitObjects are released.
The remainder of this chapter describes the data properties and interface methods of the Session object.