Author Topic: How to Attach User Data...?  (Read 7403 times)

vadim

  • Guest
How to Attach User Data...?
« on: May 21, 2007, 03:19:47 PM »
Hi,

I have to make changes to Softphone written in Java (JRE1.5) and interacting with Genesys TServer 6.5 or 5.1 not sure.....

Problem: I need to attach 2 new TKVPairs to call data and after that do a transfer.

Here's java code segment:

[b]myNewKV= new TeleTKVPair("myNewKey", "Hello");
userData[lineSelected].addTail(myNewKV);

myTeleCall[lineSelected].singleStepTransfer("#1111");[/b]

But after transfer occurs, they inspect userdata and it contains only keys that IVR put in there. No "myNewKV".

So I need to 'notify' the TServer that userData has changed so it updates it.
I found

[b]myTeleCall.attachUserData(false);[/b]

which supposed to update userdata but it doesn't work...

PLZ Help.


Vadim

  • Guest
Re: How to Attach User Data...?
« Reply #1 on: May 21, 2007, 07:13:31 PM »
  • Best Answer
  • Solution found:
    here code:
    myTeleCall[lineSelected].setDefaultUserData(userData[lineSelected]);
    myTeleCall[lineSelected].attachUserData(userData[lineSelected], false);

    Explanation:
    .setDefaultUserData - sets your selected KVPair[] as default
    .attachUserData - attaches data to default KVPair[] and false - to update instead of overrite.

    Offline victor

    • Administrator
    • Hero Member
    • *****
    • Posts: 1416
    • Karma: 18
    Re: How to Attach User Data...?
    « Reply #2 on: May 22, 2007, 03:31:37 AM »
  • Best Answer
  • Vadim,

    my initial guess was to just look at your CME Tserver options and see if teh value of Options->TServer->consult-user-data  is set to seperate or joint.

    Then I realized that you are doing a single StepTransfer, and I looked at your code again, and you know, I realized that you are not attaching any data to the call before transferring it! You are creating the data with TeleTKVPair and you are adding it to userData, but you are not adding userData back to the call! (At least I do not see it in your code sample)

    So, you should be using attachUserData(userData[line_here], false) to get what need back to TServer.
    Tell me if it did not work and we will then look through the logs!


    --- added after posting ---
    I see that you have figured the answer already!!! Should have read your second post first... :-\
    « Last Edit: May 22, 2007, 03:33:14 AM by victor »