Author Message
LisandroP
Joined: May 20, 2021
Messages: 1
Offline

Please, any here get me a light, I'm trying to do a simple call using the code below,
I open the session, receive the InvokeID, do MakeCall, receive again an invokeId but my Avaya OneX Com. never do this call.

class tstAvaya
{
private ServiceProvider serviceProvider;

public string OpenSession()
{
string msgReturn = "";
try
{
int InvokeId;
serviceProvider = new ServiceProvider();
int IPPortToServer = 4722;
int SessionCleanupDelay = 60;
int SessionDuration = 180;

string ProtocolVersion = ServiceProvider.DmccProtocolVersion.PROTOCOL_VERSION_4_1;
bool UseSecureSockets = false;
bool EnableAutoKeepAlive = true;
bool AllowCertificateNameMismatch = true;

InvokeId = serviceProvider.StartApplicationSession(IPAddressToServer, IPPortToServer, SessionName,
LoginName, LoginPassword, SessionCleanupDelay, SessionDuration,
ProtocolVersion,
UseSecureSockets,
serviceProvider, EnableAutoKeepAlive, AllowCertificateNameMismatch);
msgReturn = InvokeId.ToString();
}
catch (Exception exc)
{
msgReturn = " Exception: " + exc.Message;
}
return msgReturn;
}

public string MakeCall()
{
string msgReturn = "";
try
{
string DeviceId = "150031";
string DestinationDeviceId = "123";
int InvokeId;
InvokeId = serviceProvider.getThirdPartyCallController.MakeCall(DeviceId, DestinationDeviceId, null);
msgReturn = InvokeId.ToString();

}
catch (Exception exc)
{
msgReturn = " Exception: " + exc.Message;
}
return msgReturn;
}
}
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Have you enabled and looked at the AE Server side logs? That is always a good starting point as opposed to looking at your code. There are many server side things that could be wrong.

Have you tried a sample app that came from the DevConnect portal or out of the SDK, they remove all coding mistakes.
Have you leveraged the TSAPI test app that is part of AE Services? That helps identify server side issues pretty quickly.

https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/support/faq/tsapi/index.gsp#10
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
I think your problem is that DeviceId and DestinationDeviceId are incorrect. They must be in the format of a DMCC Device Identifier. You will need to use getDeviceID or GetThirdPartyDeviceId to get a Device ID from AE Services. Then use
ownerDevice.getDeviceIdAsString to get the correct format.

Look at the Simple Record sample application the SDK and check what it does for ownerDevice.

I also suggest that you use the DMCC Dashboard to test various features before going to the trouble of coding them - it can save a lot of effort.

Martin
Go to:   
Mobile view