Author Message
cn0ne
Joined: Mar 22, 2020
Messages: 3
Offline
Hi All -

Has anyone tried to write code in Powershell before? I was able to load .dll, but whenever I tried to "getsessionIDlist", it returned nothing. I tried using dashboard, I was able to Start Application Session without any issue with the credentials, list sessions and etc. I would like to use the API to output a report for all session and device IDs. Any idea how to achieve this? Below is the initial code I write.

[Reflection.Assembly]::LoadFile("C:\Users\xxxx\Downloads\dmcc-dotnet-sdk-8.1.0.0.0.68\dmcc-dotnet-sdk\Dashboard\ServiceProvider.dll")

$service = New-Object Avaya.ApplicationEnablement.DMCC.ServiceProvider
$service.StartApplicationSession("xx.xx.xx.xx",4721,"Test","user","password",5, 180, "8.1", $false, $false, $true, $true)


---
[Reflection.Assembly]::LoadFile("C:\Users\xxxx\Downloads\dmcc-dotnet-sdk-8.1.0.0.0.68\dmcc-dotnet-sdk\Dashboard\ServiceProvider.dll")

$service = New-Object Avaya.ApplicationEnablement.DMCC.ServiceProvider
$service.StartApplicationSession(xx.xx.xx.xx",4721,"Test","user","password",5, 180, "8.1", $false, $false, $true, $true)
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
No I haven't, but have you tried first using the DMCC dashboard to perform the same sequence of actions to see if a 'normal' application gets the response you are expecting?
cn0ne
Joined: Mar 22, 2020
Messages: 3
Offline
I have tried using the DMCC Dashboard - I was able to "Get Session ID List" without any issue.

What I am wondering is, I am not sure if the connection I made through Powershell is working or not. Doesn't seem to be like it. From the code I did, I just simply translate the C# code in sample to Powershell.

PS C:\Users\xxxxx> $service

LicenseResult :
getActualProtocolVersion :
getSessionId :
getXmlProcessor : Avaya.ApplicationEnablement.DMCC.XmlProcessor
GetCallInformationLink : Avaya.ApplicationEnablement.DMCC.CallInformationLink
getThirdPartyCallController : Avaya.ApplicationEnablement.DMCC.ThirdPartyCallController
getCallAssociated : Avaya.ApplicationEnablement.DMCC.CallAssociated
applicationSpecificLicensePkcs12Delegate :


Is there a simple way using C# that I can connect to AES - and just list down all the Session & Device IDs? Does it really necessary to "Start Application Session" first before I can query the sessionIDs?

JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Every DMCC API call has to be done in the context of a DMCC Session with the sole exception of startApplicationSession().

If you don't think the getSessionIDlist 'worked' from PowerShell I suggest enabling FINEST logging on the AES and inspecting the dmcc trace log file. See https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/support/faq/dmcc/other.gsp#62

I am guessing what happened is that the powershell is not keeping the socket open that the getApplicationSession created, and the getSessionIDlist had no environment to operate in. I.e the message was never sent to AES.
cn0ne
Joined: Mar 22, 2020
Messages: 3
Offline
Thanks, John.

I will check that out, weird why PS doesn't hold the socket open. I will test this further.

Again, if anyone has successfully run the API under PS - let me know.
Go to:   
Mobile view