Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: nui on January 11, 2008, 04:41:01 AM
-
Now, I am trying to make simple softphone using .net sdk with c#.net and I think I also need to attach data from my program but I am did not know how to set parameber into userData(KeyValueCollection ) and does .net sdk support this or not ?
below is some neccessary and source code :
using Genesyslab.Platform.Voice.Protocols.TServer.Requests.Userdata;
using Genesyslab.Platform.Commons.Collections;
^
^
Does reference is enough for coding ?
public static bool UserAttachData(TServerProtocol protocol)
{
IMessage response;
try
{
KeyValueCollection userData=null; <<< If I need to set key = "test", values="FirstTime" , Do you know how to set it to userData ?
RequestUpdateUserData reqUpdateuserData = RequestUpdateUserData.Create(
thisDN,
connId,
userData
);
response = protocol.Request(reqUpdateuserData);
Debug.Print(response.ToString());
return true;
}
catch (Exception e)
{
return false;
}
}
Please give me suggestions, I am very new with genesys, just start learning basic concept.
Nui
-
Hi,
Try this piece of code:
[code]KeyValueCollection userData= new KeyValueCollection();
userData.Add("key","value");
[/code]
The method Add has several overloads. Please check Platform SDK documentation for more information.
René
-
Thank you , René for your code
I did not realize about it. ;D