So the solution is that you have to set CPNDigits = ANI in the Extensions of the TSingleStepTransfer (or Conference). This can be done in routing, but when it's initiated from the agent desktop (Workspace Desktop 8.5.1 in our case), you have to create a custom command and insert it before InteractionVoiceSingleStepTransfer.
[code]
public bool Execute(IDictionary<string, object> parameters, IProgressUpdater progress)
{
log.DebugFormat("BeforeSingleStepTransfer.Execute(): add CPNDigits");
IInteractionVoice interactionVoice = parameters["CommandParameter"] as IInteractionVoice;
object data = null;
Genesyslab.Enterprise.Commons.Collections.KeyValueCollection ext = null;
parameters.TryGetValue("Extensions", out data);
try
{
if (data == null)
{
ext = new Genesyslab.Enterprise.Commons.Collections.KeyValueCollection();
}
else
{
ext = data as Genesyslab.Enterprise.Commons.Collections.KeyValueCollection;
}
ext.Add("CPNDigits", interactionVoice.PhoneNumber;
parameters["Extensions"] = ext;
}
catch (Exception e)
{
log.DebugFormat("BeforeSingleStepTransfer.Execute():" + Environment.NewLine + e.StackTrace);
return true;
}
return false;
}
Add the command into the chain in the module's Initialize() method:
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceSingleStepTransfer", "SingleStepTransfer",
new CommandActivator() { CommandType = typeof(BeforeVoiceSingleStepTransferCommand) });
[/code]