call delivered event that is gone amiss...

Version 1
    This document was generated from CDN thread

    Created by: Amir Handaly on 02-01-2011 05:16:24 PM
    Hi everyone.
     
    I wrote a client application to work with ipcc server v.12 following the guidelines of the cti protocol developer guide of august 2008. The client application had been developed in .net framework 3.5 (c#) and is supporting a few telephony actions:
    answering/holding/retrieving/transfering/conferencing/terminating/making a call.
     
    So far so good 
     
    However, I have a troubling matter as specified in this subject.
    In most cases I monitor call_delivered messages successfully, but NOT always.
    Sometimes (i cannot point when exactly) the call delivered mesage is gone amiss.
    The result is that the agent's phone is riniging but there is no indication in the client application.
     
    I have been looking for some clue in the developer guide finding the following under the "Call-Event Message Flows As Seen in the Log Files" section, page 187:
    "...Although there is no guarantee of call events..."
     
    So my question is :
    Should I expect all call event messages to reach my client in a consistent manner?
    If not, how can I moniter/shoot a new call redirected to the agent's phone other than by waiting for call_delivered message?
     
    Sorry for the long description.
    Any direction will be highly appreciated!
     
    THANKS

    Subject: RE: call delivered event that is gone amiss...
    Replied by: Satendra Gupta on 04-12-2011 06:52:30 AM
    Hi Amir,
     
    I am also trying to develop the CTI application in C#, but have stucked in the start i.e. message format to be sent to UCCX.
     
    I amd getting below message for openreq request :
     
    "com.cisco.Ged188.CRACT IInvalid MessageException : invali d message type:"
     
    It would be of great help, if you can guide me, for correct message format.
     
    Thanks:
    Satendra Gupta
     

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: David Lender on 05-12-2011 10:22:55 AM
    Suggest you set the trace level to high and look at the MIVR log for the openreq.to ensure you are packing the message correctly.

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: Satendra Gupta on 05-12-2011 02:22:07 PM
    Hi David,

    Thanks a lot for suggestion.  I have tried to troubleshoot it and was able to move bit ahead , but again stucked in the Float part.

    I tried to troubleshoot in following steps:
    1) Sent only fixed part of message (i.e BodyLength+messageTypeID+FIxedPart):  In this case I am getting error of "Expecting some for input".

    2) After it, I added the floating part to the message, but here I am getting this error:

    " ..com.ci sco.Ged188.CRACT IInvalid MessageException: readMs g: Handled Inval idObject Exception:
    Invalid defin ition for messag e of type: OPEN_ REQ; nested exce ption is: invali d definition for  message
      field o f type: CLIENT_I D_TAG; nested exception is: string not n"


    Below is my code for Floating part:

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

                   //----------Fixed part -----------------
                     Buffer.BlockCopy(lengthHeader, 0, _message, 0, lengthHeader.Length);
                      tempLen = lengthHeader.Length;
                               .
                               .
                      Buffer.BlockCopy(res4Byte, 0, _message, tempLen , res4Byte.Length);
                      tempLen += res4Byte.Length;
                    //-----------float part-----------
                      
                     Buffer.BlockCopy(ClientID_FieldDataID, 0, _message, tempLen , ClientID_FieldDataID.Length);
                       tempLen += ClientID_FieldDataID.Length;
                     Buffer.BlockCopy(ClientID_FieldDataLength, 0, _message, tempLen , ClientID_FieldDataLength.Length);
                       tempLen += ClientID_FieldDataLength.Length;
                     Buffer.BlockCopy(ClientID_Data, 0, _message, tempLen , ClientID_Data.Length);
                       tempLen += ClientID_Data.Length;
                          .
                           .
                      //---other floating fields------------

                         m_socWorker.Send(_message); //--sending data to UCCX server


    Any small type of help will be really great, as I have tried all sort of troubleshooting to find the mistake......checked at  TCP sniffer level also,& found that the Hex data being sent from my application is exactly same as the hex data being sent through C++ sample application provided in developer community, but Through c++ sample application resonse is coming success i.e. (OPEN_CONF etc) but in my application I am getting this error:

    " ..com.ci sco.Ged188.CRACT IInvalid MessageException: readMs g: Handled Inval idObject Exception:
    Invalid defin ition for messag e of type: OPEN_ REQ; nested exce ption is: invali d definition for  message
      field o f type: CLIENT_I D_TAG; nested exception is: string not n"


    Please guide me, in floating part..

    Thanks:
    Satya

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: David Lender on 05-12-2011 02:41:55 PM
    I am not an expert in C++ to assist you with your code.  I can assist with the uccx cti protocol itself.

    The message indicates the problem is with your ClientID tag.

    Can you post the portion of the MIVR log you said matches exactly what is generated by the sample application?

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: Satendra Gupta on 06-12-2011 07:40:16 AM
    Hi David,

    There was little mistake in data type in my code..now its resolved .........

    Request sent from my application is:

    00 00 00 5D 00 00 00 03  00 00 00 02 00 00 00 0A
    00 00 00 78 00 00 00 00  00 00 00 07 00 00 00 07
    00 00 3F FF 00 00 00 0F  00 00 00 00 00 00 00 00
    00 00 00 00 01 0A 64 6F  66 30 30 31 30 34 33 00
    02 09 50 73 33 31 32 33  34 35 36 04 05 31 31 38
    31 00 06 05 31 31 38 31  00 C2 0A 64 6F 66 30 30
    31 30 34 33 00                                 


    which is equvalentt to :
    openreq -v 10 -t 120 -s 7 -c 7 -a 16383 -g 15 -i dof001043 -p Ps3123456 -e 1181 -m 1181 -d dof001043

    I am getting below respose from UCCX server:
    00 00 00 1A 00 00 00 04  00 00 00 02 00 00 00 07
    00 00 00 00 00 00 00 00  00 00 00 00 00 01 00 00
    00 09                          

    Which is same as what I am getting thru msclient(Sample c++ application) ..... above hex value is equivalent to :

    MsgType: OPEN_CONF, BodyLength: 26
    Invoke ID: 1
      ServiceGranted: 0x7
      PeripheralOnline: 1
      AgentState: 9
      agent_extension:
      agent_instrument:
      agent_id:

    Now to move ahead,.... i need to capture the events.. As per request message I've mentioned the service requested value to 7, so i shoud get ringing event+answered event+ held event, but I am not getting any response.

    Please suggest, if I am sending anything wrong in the request...

    Thanks in advance...

    Satya

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: David Lender on 06-12-2011 09:44:55 AM
    Your Open Conf does not appear correct, as it does not include agentid and extension there appears to be no floating part of your OPEN CONF.

    Please post an MIVR log showing the complete message flow.

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: David Lender on 06-12-2011 04:02:55 PM
    In looking at your log, I do not see a reason why UCCX is not sending the floating part of the OPEN_CONF.



    I suggest in response to the OPEN_CONF that you try to login the agent  by issueing a SET_AGENT_STATE_REQ  and checking the result.  You are trying to create an agent mode application to control a specific agent?

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: David Lender on 06-12-2011 04:15:55 PM
    Also, can you login your agent using CAD, change state a few times, and then place a call to the agent, answer and then release the call and finally logout the agent?

    You can then look at that message flow in the MIVR log and try to duplicate it with your app.

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: Satendra Gupta on 06-12-2011 12:20:02 PM
    I was following CTI developer guide of protocol 10, and I had put AGENT_ID_TAG=194 as per doc in the sending message 


    message sent to UCCX:


    BYTE ARRAY sent to UCCX:


    00 00 00 5D 00 00 00 03 00 00 00 02 00 00 00 0A
    00 00 00 78 00 00 00 00 00 00 00 07 00 00 00 07
    00 00 3F FF 00 00 00 0F 00 00 00 00 00 00 00 00
    00 00 00 00 01 0A 64 6F 66 30 30 31 30 34 33 00
    02 09 50 73 33 31 32 33 34 35 36 04 05 31 31 38
    31 00 06 05 31 31 38 31 00 C2 0A 64 6F 66 30 30
    31 30 34 33 00 



    After seeing your response I just checked the log(attachment 1: Cisco001MIVR078(AGENT_ID_TAG-194).zip), and found that the UCCX server was getting ips as:
    OPEN_REQ,invokeId=2,idleTimeout=120,versionNumber=10,servicesRequested=7,callMsgMask=7,agentStateMask=16383,configMsgMask=15,clientID=dof001043,clientPass=[B@72b16e,appPathID=0,clientSignature=null,agentExt=1181,agentInstrument=1181,agentIDlong=dof001043,agentID=null,reserve1=0,reserve2=0,reserve3=0,invokeId=2




    As per this log AgentID was null, and value of agentID was getting passed to agentIDlong. 


    So I checked the CTI developer guide for protocol 13-14 and as per this doc AGENT_ID_TAG is mentioned as 5. so after changing the AGENT_ID_TAG to 5,(checked response after changing version=14 in message) I am receving this response:



    00 00 00 28 00 00 00 04  00 00 00 03 00 00 00 07
    00 00 00 00 00 00 00 00  00 00 00 00 00 01 00 00
    00 09 E4 02 00 01 D0 04  00 00 00 00 E0 02 00 01



    here, Header=00 00 00 28 00 00 00 04
    invoke ID=00 00 00 03
    service granted: 00 00 00 07
    res1,res2,res3=00 00 00 00 00 00 00 00  00 00 00 00
    PG status: 00 01
    Agent Status: 00 09


    After this I am getting floating poart as:
     E4 02 00 01 D0 04  00 00 00 00 E0 02 00 01


    Converted it to equivalent ascii value but not getting Agent Instrument/Agent Extension/Agent ID values.




    I've attached the log for this case also(attachment2: Cisco001MIVR084(AfterChanging AgentIDTAG-5).zip).




    Please guide...


    Satendra..





































    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: Satendra Gupta on 06-12-2011 11:13:06 PM
    Hi David,

    Yes I am makin an agent mode application to control a specific agent.

    Sure, I will follow the steps..

    Thanks for guidance.

    Satendra..

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: Satendra Gupta on 07-12-2011 07:54:31 AM
    Hi David,

    I am able to get the events and able to perform telephony functionalities through my application

    Thanks:
    Satendra
    email: satendra.08@gmail.com

    Subject: RE: call delivered event that is gone amiss...
    Replied by: Satendra Gupta on 07-12-2011 10:53:03 AM
    Hi David,

    I am able to get events if, I make agent login through my CTI application.

    But I am facing issue for below case:

    1) OPEN_REQ send from my applcation.
    2) HEART_BEAT message being sent to UCCX server in regular event.
    3) Monitoring for events

    This time, I've not made agent logged in through my CTI application, but agent is logged in through CAD . Now when I monitor for events, I am not getting any events in my application, but I am able to make this CAD agent Note Ready/Logout through my application.

    Please suggest, what may be issue, that I am not getting any events if agent is not logged in through my application.

    Thanks:
    Satendra

    Subject: RE: New Message from Satendra Gupta in Unified Contact Center Express CTI (
    Replied by: David Lender on 07-12-2011 11:36:55 AM
    You cannot have more than 1 agent mode connection on behalf of a single agent.  You will need to create a bridge mode connection in order to receive events for CAD controlled agents.

    Subject: RE: call delivered event that is gone amiss...
    Replied by: Satendra Gupta on 07-12-2011 12:13:03 PM
    Thanks very much David for the clarification.

    Will concentrate in bridge mode now..thank you ..

    Subject: RE: call delivered event that is gone amiss...
    Replied by: Satendra Gupta on 09-12-2011 12:17:31 PM
    Hi David,

    As per your post that:

    "You cannot have more than 1 agent mode connection on behalf of a single agent. You will need to create a bridge mode connection in order to receive events for CAD controlled agents."


    But as stated in my last post, that I am able to open a agent mode connection on behalf of a single agent, i.e agent is logged in through CAD, and I opened stream for this agent through my application in agent mode and I am able to control this agent's states(ready/not ready/logout)  through  my cti application. Only issue which I am facing is that I am not able to get the events.

    Need your help to understand, why only events are not being sent from CTI server to my cti application whereas other operations can be performed thru my application, when same agent is logged in thru CAD.

    Thanks
    Satendra