Author Message
TomIe
Joined: Aug 31, 2021
Messages: 1
Offline
Hi,

I was trying to setup a monitor to a VDN , but for some reason i can't get the delivered event to trigger.

The code itself runs fine, i just can't seem to trigger the event

I hope someone can help me figure this out :-)

Below is the powershell code and the xml responses received (i did edit out the details from the extension and the switchname):


#Add the serviceprovider dll
Add-Type -Path "C:\temp\ServiceProvider.dll"
#region Functions
function Get-DeliveredEvent
{
[cmdletbinding()]
param (
[Avaya.ApplicationEnablement.DMCC.ServiceProvider]$provider
)


[array]$global:eventhandler += [xml]$provider.getlastincomingxmlmessage()
}

#endregion Functions
#Create a new object for the serviceprovider
$provider = New-Object Avaya.ApplicationEnablement.DMCC.ServiceProvider
#Start the applicationsession to AES
$provider.StartApplicationSession($aesip, $port, $applicationname, $user, $password, "5", "180", "http://www.ecma-international.org/standards/ecma-323/csta/ed3/privD", $false, $null, $true, $true, $null)
#Create a new device object to store the device details
$ownerDevice = $provider.Getnewdevice()
#Retrieve the device id from AES
$ownerDevice.GetDeviceId($extension, $switchname, $null, $true, $ownerDevice)
#Generate the events object
$Events = [avaya.ApplicationEnablement.DMCC.ThirdPartyCallController+ThirdPartyCallsViaDeviceCallControlEvents]($false)
#Enable the required events that need to be monitored from the VDN
$events.DeliveredEvent = $true
#Add an ondeliveredevent to store the XML message
$provider.getThirdPartyCallController.add_OnDeliveredEvent({Get-DeliveredEvent})
#Start monitoring the VDN
$provider.getThirdPartyCallController.StartMonitor($ownerDevice.getDeviceIdAsString, $Events, $null)




Start session response:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                              

<StartApplicationSessionPosResponse xmlns="http://www.ecma-international.org/standards/ecma-354/appl_session"><sessionID>BF133C190108AA7E53615FBB7962A094-1587</sessionID><actualPro
tocolVersion>http://www.ecma-international.org/standards/ecma-323/csta/ed3/privD</actualProtocolVersion><actualSessionDuration>180</actualSessionDuration></StartApplicationSessionP
osResponse>


GetdeviceID response

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                          

<GetDeviceIdResponse xmlns="http://www.avaya.com/csta"><device typeOfNumber="other" mediaClass="voice" bitRate="constant">EXTENSION:SWITCHNAME:0.0.0.0:0</device></GetDeviceIdResponse>


Startmonitor response:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                              

<MonitorStartResponse xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3"><monitorCrossRefID>2253</monitorCrossRefID><actualMonitorFilter><callcontrol><callCleare
d>false</callCleared><conferenced>false</conferenced><connectionCleared>false</connectionCleared><delivered>true</delivered><diverted>false</diverted><established>false</establishe
d><failed>false</failed><held>false</held><networkReached>false</networkReached><originated>false</originated><queued>false</queued><retrieved>false</retrieved><serviceInitiated>fa
lse</serviceInitiated><transferred>false</transferred></callcontrol><logicalDeviceFeature><agentNotReady>false</agentNotReady><agentReady>false</agentReady><agentWorkingAfterCall>f
alse</agentWorkingAfterCall></logicalDeviceFeature></actualMonitorFilter><extensions><privateData><private><ns1:AvayaEvents xmlns:ns1="http://www.avaya.com/csta" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AvayaEvents"><ns1:invertFilter>true</ns1:invertFilter><ns1:callControlPrivate><ns1:enteredDigits>false</ns1:enteredDigits></ns1:ca
llControlPrivate></ns1:AvayaEvents></private></privateData></extensions></MonitorStartResponse>
JohnBiggs
Joined: Jun 20, 2005
Messages: 1135
Location: Rural, Virginia
Online
1) it woudl be helpful to see the requests that were received by the AES in addition to the responses
2) there is something wrong with the deviceID you got back - or you obfuscated it and didnt mention that... there should be numbers where there is the word EXTENSION, thus there is something wrong with your request
<GetDeviceIdResponse xmlns="http://www.avaya.com/csta%22%3E%3Cdevice typeOfNumber="other" mediaClass="voice" bitRate="constant">EXTENSION:SWITCHNAME:0.0.0.0:0</device></GetDeviceIdResponse>
I would have expected you to receive an error to your startMonitor request as a result. Why didnt you get an error - did you obfuscate the actual values?
3 learn to use the DMCC Dashboard (Contained in the DMCC .NET SDK) to do simple tests like this and compare its XML output to that of your code to identify simple issues.
4) did you create a listener for the events you are asking be sent to you
5) are you looking at the server side trace to see what is happening from the AES's perspective to decide if the problem is server side or client side? https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/support/faq/dmcc/other.gsp#60
Go to:   
Mobile view