UCCX CTI - ClientID and ClientPassword for OPEN_REQ

Version 1
    This document was generated from CDN thread

    Created by: Paulo Silva on 02-03-2011 11:40:47 PM
    Hello,
     
    Very new to UCCX 8.01 CTI and trying to make sense of the documentation, while implementing a .Net CTI client.
     
    What is and where can i find the ClientID and ClientPassword values required by the floating part of the OPEN_REQ message?
     
    Any help appreciated!
     
    Best regards,
     
    Paulo Silva

    Subject: RE: UCCX CTI - ClientID and ClientPassword for OPEN_REQ
    Replied by: Stephan Steiner on 03-03-2011 03:07:35 AM
    Should be UserID and password of the agent. You may also need to specify the agent extension as additional parameter. The doc has some samples on using the C++ tool - including openreq. And in this very forum you'll find a working example for that tool that I posted..

    Subject: RE: UCCX CTI - ClientID and ClientPassword for OPEN_REQ
    Replied by: Paulo Silva on 04-03-2011 09:08:12 PM
    Hi Stephan,

    Thanks for your quick response!

    If I may, I would like to ask you one more question:

    I am trying to build a UCCX CTI client using C#; bellow is the code that builds and packages the OPEN_REQ message:

    byte[] _message = new byte[0];

    //Message Header
    byte[] BodyLength = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(1)); //4 Byte; to be updated later with right size
    byte[] MessageTypeID = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(3)); //4 Byte

    //Fixed Part
    byte[] InvokeID = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(515151)); //4 Bytes
    byte[] VersionNumber = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(10)); //4 Bytes
    byte[] IdleTimeout = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(30)); //4 Bytes
    byte[] Reserved = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(0)); //4 Bytes
    byte[] ServicesRequested = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(0x40ffe)); //4 Bytes
    byte[] CallMsgMask = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(0x1)); //4 Bytes
    byte[] AgentStateMask = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(0x4)); //4 Bytes
    byte[] ConfigMsgMask = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(0xf)); //4 Bytes

    //Floating Part
    byte[] ClientID_FieldDataID = new byte[] { 1 }; //1 Byte; per doc no need to convert to network-order
    byte[] ClientID_FieldDataLength = new byte[] { 5 }; //1 Byte; per doc no need to convert to network-order
    byte[] ClientID_Data = System.Text.Encoding.ASCII.GetBytes("psilva"); //5 bytes

    byte[] ClientPassword_FieldDataID = new byte[] { 2 }; //1 Byte; per doc no need to convert to network-order
    byte[] ClientPassword_FieldDataLength = new byte[] { 8 }; //1 Byte; per doc no need to convert to network-order
    byte[] ClientPassword_Data = System.Text.Encoding.ASCII.GetBytes("password"); //8 Bytes

    //Message is built here.
    ...

    //Get real message size and subtract header size
    BodyLength = System.BitConverter.GetBytes(System.Net.IPAddress.HostToNetworkOrder(_message.Length-8)); //4 Byteet

    //Update BodyLength field in _message with the right body length
    ...

    //Write message to stream.

    Here is the reply from the CTI Server:

              ?O     ?com.cisco.Ged188.CRACTIInvalidMessageException: readMsg: Handled InvalidObjectException: Invalid definition for message of type: OPEN_REQ; nested exception is: invalid definition for message field of type: CLIENT_ID_TAG; nested exception is: string not n


    I am not sure where i am messing up...

    When i send a HEARTBEAT_REQ I get HEARTBEAT_CONF no problem; but i try something with a floating part i get that error...

    Help!

    Thanks in advance!

    Paulo Silva

    Subject: RE: UCCX CTI - ClientID and ClientPassword for OPEN_REQ
    Replied by: Stephan Steiner on 05-03-2011 04:20:52 AM
    I'm not the one who wrote our lib (incidentally also in c#) though what I was told , the sample program that Cisco provides served as a big help - it allows you to send valid requests so you can run wireshark and look at what is going over the wire and then compare it with what your own lib is doing to figure out any errors.
    I also understand that they started debugging Cisco's sample to get an even better understanding of how a working implementation works.
    I believe that once you get the first req right, subsequent ones would get easier as they all have a similar structure.

    Subject: RE: UCCX CTI - ClientID and ClientPassword for OPEN_REQ
    Replied by: Paulo Silva on 07-03-2011 09:17:12 AM
    Hi Stephan,

    Thanks again for replying!

    Paulo Silva

    Subject: RE: UCCX CTI - ClientID and ClientPassword for OPEN_REQ
    Replied by: Robby Dermody on 27-08-2011 12:06:14 PM
    Does anyone have a basic UCCXCTI C# library they can provide? I started trying to convert the C++ sample one over to Managed C++ and pure .NET CLR to run on Mono, but as I'm definitely not a windows/.net developer it would take eons. Even one that is half done (or less) would be welcome, or some sample code. Would save tons of time.

    Thanks!

    Subject: RE: New Message from Paulo Silva in Unified Contact Center Express CTI (UCC
    Replied by: Satendra Gupta on 04-12-2011 02:40:07 AM
    Hi Paulo,

    Were you able to solve the problem?

    Thanks:
    Satendra

    Subject: RE: New Message from Paulo Silva in Unified Contact Center Express CTI (UCC
    Replied by: simon atkins on 29-08-2013 06:09:19 AM
    Satendra Gupta:
    Hi Paulo,

    Were you able to solve the problem?

    Thanks:
    Satendra

    Hi I realise this was 3 years ago, but I'm just embarking on something similar.  And this is the only post in Google I've found close to helping me.
    I've constructed an open-req message and sent it off to cisco but all I get back is a part message like this:  00-00-04-
    Not sure what I'm getting wrong, my code is very similar to the above poster's with some small changes like protocol version is now 13.

    any ideas greatly appreciated.