cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays

Question about CTIOS sideA and SideB

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

Created by: Ofer Shany on 22-06-2010 09:31:51 AM
I'm working wit hthe JavaCIL SDK, and I have a question about the sideA and sideB
parameters in the connect() API.
To connect to the CTIOS we use the following code:
 
Arguments rArgSessionConn = new Arguments();
rArgSessionConn.SetValue(CTIOS_CTIOSA, <hostA>);
rArgSessionConn.SetValue(CTIOS_PORTA, <portA>);
rArgSessionConn.SetValue(CTIOS_CTIOSB, <hostB>);
rArgSessionConn.SetValue(CTIOS_PORTB, <hostA>);
rArgSessionConn.SetValue(CTIOS_HEARTBEAT, <hearBeat>);

ciscoSession.Connect(rArgSessionConn);
 
Where ciscoSession is a CtiOsSession object initialized earlier.
 
What I don't fully understnad is to which CTIOS process the session actually connects.
Does  it always try to connect to sideA first, or does it randomly chooses between sideA and sideB ?
In case of failing to connect to sideA - does it retry sideA again , or does it try sideB first ?
 
Thanks,
 
Ofer
 

Subject: RE: Question about CTIOS sideA and SideB
Replied by: Shannon McCoy on 15-07-2010 09:55:26 AM
I'm working wit hthe JavaCIL SDK, and I have a question about the sideA and sideB
parameters in the connect() API.
To connect to the CTIOS we use the following code:
 
Arguments rArgSessionConn = new Arguments();
rArgSessionConn.SetValue(CTIOS_CTIOSA, <hostA>);
rArgSessionConn.SetValue(CTIOS_PORTA, <portA>);
rArgSessionConn.SetValue(CTIOS_CTIOSB, <hostB>);
rArgSessionConn.SetValue(CTIOS_PORTB, <hostA>);
rArgSessionConn.SetValue(CTIOS_HEARTBEAT, <hearBeat>);

ciscoSession.Connect(rArgSessionConn);
 
Where ciscoSession is a CtiOsSession object initialized earlier.
 
What I don't fully understnad is to which CTIOS process the session actually connects.
Does  it always try to connect to sideA first, or does it randomly chooses between sideA and sideB ?
In case of failing to connect to sideA - does it retry sideA again , or does it try sideB first ?
 
Thanks,
 
Ofer
 

 
I believe the answer you are looking for can be found on page 4-22 ( 76 in the pdf ) of the CtiOs 7.5 Developers guide.
 
Connection Attempt Error Codes in Java and .NET CIL
The following field values may be returned by the Connect() method. See the documentation for the CtiOs_Enums.CilError interface in the CIL JavaDoc for information on these fields. ¿CIL_OK - The connection process has successfully begun. The CIL will either fire the OnConnection() event to indicate that the CIL successfully connected or will fire the OnConnectionFailure() event and go into failover mode. If the latter occurs, the CIL will continue to attempt to connect, alternating between hosts CTIOS_CTIOSA and CTIOS_CTIOSB, until the connection succeeds, at which point the CIL will fire the OnConnection() event.
 
This process is handled by the CIL. If you read the whole section you will find out how to control the failover process and auto logging in on failures.  Hope this helps
Content for Community-Ad