I have a requirement to hang up the current phone call programmatically in Genesys Workspace Desktop edition. Here is what I have:
public class SomeService
{
private readonly IEnterpriseServiceProvider _esp;
public SomeService(IEnterpriseServiceProvider esp)
{
_esp = esp;
}
public void HangupCurrentCall()
{
var iv = _esp.Resolve<IInteractionVoice>();
iv.Release();
}
}
The code above is executing with no error, but the call is not being hung up.
You can't hangup current call just from enterprise service. WDE providing API for that. You can check from developer guide document. Actually you have two options to achieve this. First way using WDE API command calls. Second way using universal SDK (PSDK) to hangup current call. First of all you need to collect current call's interactionId. After that can call a command like that,
You can find all commands list from WDE api guide. On your command type (class) you must return boolean. If you return false, its ok to continue, sending true like break the command.
Or you can directly execute a command like this;
As a SDK certificated developer, i always prefer PSDK(universal genesys sdk). You can retrieve current SIP Server connection and send request to it. Like this code block
TServerProtocol tServerProtocol = tServerChannel.Protocol as TServerProtocol;
After this you have current connection on tserverPorotocol object. Then you can send a request to SIP Server.
Like this:
I tried to explain basics. I hope its helpful. If you got a question about sip or etc. please let me know.