Cisco Cisco Computer Telephony Integration Option 8.5 개발자 가이드

다운로드
페이지 668
 
Chapter 4      Building Your Application
Connecting to the CTI OS Server
4-42
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1) 
   If Not DialToneArgs Is Nothing Then    
     If DialToneArgs.IsValid("Mute") = 1 Then
       Mute = DialToneArgs.GetValueInt("Mute")
       If Mute = 1 Then
         MsgBox "Dial Tone MUTE"//Your logic here
       Else
         MsgBox "Dial Tone  NOT MUTE"//Your logic here
       End If
     End If
End If
End If
End Sub
Disconnecting from CTI OS Server
Disconnecting from CTI OS Server (via the Disconnect() method) before 
shutting down is an important part of the client application functionality. The 
Disconnect()
 method closes the socket connection between the client 
application and CTI OS. On most switches, it does not log the agent out. If no 
logout request was issued before the Disconnect(), then on most switches the 
agent stays logged into the instrument even after the client application has shut 
down. 
Note
Disconnect is a higher priority method than all others. Before calling Disconnect, 
ensure that all prior requests have completed lest the call to Disconnect may abort 
these requests. For example, calling Disconnect immediately after calling Logout 
may result in an agent not being logged out.
Upon Disconnect(), each object maintained by the Session (Call, Skillgroup, 
Wait) is released and no further events are received. Cleaning up the Agent object 
is the developer’s responsibility since it was handed to the Session (via the 
SetAgent()
 method.
Code sample:
In the C++ and COM CIL  Only, To disconnect from CTIOS Server when the 
session mode has not yet been established by means of calling either 
CCtiOsSsession::SetAgent(...) or  CCtiOsSsession::SetMessageFilter(...), 
Disconnect must be called with an arguments array that contains the 
CTIOS_FORCEDDISCONNECT set to True.
m_session.Disconnect