1

I know it's a rare topic here, just try my luck to get solution.

How can I create a new KeyValueCollection under the AttributeExtension? My situation now is I want to change the music on hold (MOH) based on caller's preferred language. This is the RequestHoldCall message that I've got from someone:

message RequestHoldCall
AttributeThisDN '1234'
 AttributeConnID 008101f3c4570003
 AttributeExtensions [35] 00 01 00 00..
  'music' '\music\on_hold\pcmu.wav'
 AttributeReferenceID 10

I was told that if I can change the value of the music file under AttributeExtension, then it can work. My problem is I don't have AttributeExtension in my RequestHoldCall message. So how can I add it or set it in my coding?

By the way, I'm developing an agent desktop with the use of Genesys Platform SDK 8.5.

YWah
  • 571
  • 13
  • 38

1 Answers1

0

I'm not sure abour the .NET version but for the Java PSDK, one would simply do this

KeyValueCollection extensionData = new KeyValueCollection();
extensionData.addString("music", "\\music\\on_hold\\pcmu.wav");
RequestHoldCall request = RequestHoldCall.create();
request.setExtensions(extensionData);
gawi
  • 13,940
  • 7
  • 42
  • 78
  • Hi @gawi, thanks for your comment. I want to ask the music path should be in full (eg. C:\Program Files\........) or just like the above one? And what's the 'music' key refer to? – YWah Aug 11 '15 at 08:35
  • I was just mapping the message in your post into the corresponding PSDK code. If you use GVP as media server, I think relative paths are interpreted starting at the GVP installation location. Otherwise a full path should work. I believe this is covered in the documentation but I don't have it at hand. – gawi Aug 11 '15 at 13:05
  • Hi @gawi, the .NET version is like this: KeyValueCollection musicOnHold = new KeyValueCollection(); musicOnHold.Add("music", "\\music\\on_hold\\English.wav"); RequestHoldCall reqHoldCall = RequestHoldCall.Create(thisDN, connID1, null, musicOnHold); IMessage reqHCResponse = tServerProtocol.Request(reqHoldCall); – YWah Aug 13 '15 at 08:19