Hi,
I am completely new to Genesys. I wanted to do a simple IWS customisation but due to limited resources/samples available online, I failed to make it work after trying for a whole week.
What needed is just to add in a make call button (similar to the built-in call button in the DialerRegion).
I have no idea which namespace/method/API I should use. I tried the IAgent, IMedia, IMediaVoice namespaces but have not figured out the correct way to do it. There is a MakeCall() method provided by IMediaVoice interface which I think is what I need, but how to use it?
I am so lost and hopefully someone can put me on the right track. Help greatly appreciated!
--------------------------------------------
IAgent agent;
public MySampleView(IMyExtensionSampleViewModel mySampleViewModel, IObjectContainer container)
{
this.Model = mySampleViewModel;
InitializeComponent();
Width = Double.NaN;
Height = Double.NaN;
MinSize = new MSize() { Width = 400.0, Height = 400.0 };
agent = container.Resolve<IAgent>();
agent.LoadMediaExtension();
}
private void btnOK_Click(object sender, System.Windows.RoutedEventArgs e)
{
IMedia media = agent.FirstMediaVoice;
IMediaVoice mv = (IMediaVoice)media;
bool status = mv.MakeCall("1000", "", Genesyslab.Enterprise.Model.Interaction.MakeCallType.DirectAgent, null, null, null, "");
}
--------------------------------------------
InteractionWorkspace.Voice.MediaVoice.Voice.MediaVoice: 13-11-11 12:31:28.129 [ 1] INFO ice.Voice.MediaVoice - MakeCall CallNumber '1000' Location 'place_1000' , CorrelatorData '' [voice, AgentId:test, Switch_UniSIM(2000)]
ESDK: 13-11-11 12:31:28.129 [ 1] DEBUG ESDK - [IVoiceService] AddChannel(SIP Server_UniSIM) [Uri] tcp://10.30.50.20:3000/
ESDK: 13-11-11 12:31:28.134 [ 1] DEBUG ESDK - Adding handler System.Action`1[Genesyslab.Enterprise.Model.Envelope.IEnvelope`1[Genesyslab.Enterprise.Model.Interaction.IInteraction]] to channel [Name] SIP Server_UniSIM (FQN=272ab2d9-7899-41aa-acee-f76fdda1397c)
ESDK: 13-11-11 12:31:28.134 [26] DEBUG ESDK - Found constructor with 1 parameters
ESDK: 13-11-11 12:31:28.134 [26] DEBUG ESDK - Media object MakeCall created
ESDK: 13-11-11 12:31:28.134 [26] DEBUG ESDK - [FindSwitchPolicyForGroupOfDevices] Found Switch Policy SIPSwitch::8.0.4 on [Device] Switch_UniSIM
ESDK: 13-11-11 12:31:28.134 [26] DEBUG ESDK - [GetVirtualDevice] Virtual Device is ?
InteractionWorkspace.Windows.ToolbarWindow: 13-11-11 12:31:28.139 [ 1] DEBUG indows.ToolbarWindow - ToolbarWindow.ArrangeOverride (857,504)
ESDK: 13-11-11 12:31:28.139 [26] WARN ESDK - [GetVirtualMessage] No Switch Policy profile found for [Request] RequestMakeCall
InteractionWorkspace.Voice.MediaVoice.Voice.MediaVoice: 13-11-11 12:31:28.184 [ 1] ERROR ice.Voice.MediaVoice - MakeCall, Exception [voice, AgentId:test, Switch_UniSIM(2000)]
Genesyslab.Enterprise.Exceptions.Protocol.ProtocolException: Agent has no valid DN
Server stack trace:
at Genesyslab.Enterprise.Protocols.VoiceProtocolRequest.MakeCall(Object[] list)
at Genesyslab.Enterprise.Protocols.VoiceProtocolRequest.Parse(String command, Object[] list)
at Genesyslab.Enterprise.Protocols.ProtocolRequest.With(Object[] list)
at Genesyslab.Enterprise.Extensions.InteractionServiceExtensions.MakeCall(Object[] list)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Genesyslab.Enterprise.Extensions.Proxy`1.EMethodDelegate.EndInvoke(IAsyncResult result)
at Genesyslab.Enterprise.Extensions.Proxy`1.BeginInvoke(IThreadSafeDictionary`2 proxyDict, EMethodDelegate functionDelegate, AsyncCallback callBack, Object context, String correlatorData, Object[] list)
at Genesyslab.Enterprise.Extensions.InteractionServiceExtensions.BeginMakeCall(IVoiceService service, IAgent agent, IClientChannel channel, String otherDN, MakeCallType makeCallType, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions, Int32 timeOut, AsyncCallback callBack, Object context, String correlatorData)
at Genesyslab.Enterprise.Extensions.InteractionServiceExtensions.MakeCall(IVoiceService service, IAgent agent, IClientChannel channel, String otherDN, MakeCallType makeCallType, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions, Int32 timeOut, String correlatorData)
at Genesyslab.Enterprise.Extensions.InteractionServiceExtensions.MakeCall(IVoiceService service, IAgent agent, IClientChannel channel, String otherDN, MakeCallType makeCallType, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions, String correlatorData)
at Genesyslab.Desktop.Modules.Voice.Model.Agents.MediaVoice.MakeCall(String phoneNumber, String location, MakeCallType makeTypeCall, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions, String correlatorData)
false