Author Message
Joined: Aug 31, 2021
Messages: 1

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
	param (
	[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", "", $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
#Start monitoring the VDN
$provider.getThirdPartyCallController.StartMonitor($ownerDevice.getDeviceIdAsString, $Events, $null)

Start session response:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                              
<StartApplicationSessionPosResponse xmlns=""><sessionID>BF133C190108AA7E53615FBB7962A094-1587</sessionID><actualPro

GetdeviceID response

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                          
<GetDeviceIdResponse xmlns=""><device typeOfNumber="other" mediaClass="voice" bitRate="constant">EXTENSION:SWITCHNAME:</device></GetDeviceIdResponse>

Startmonitor response:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                              
<MonitorStartResponse xmlns=""><monitorCrossRefID>2253</monitorCrossRefID><actualMonitorFilter><callcontrol><callCleare
alse</agentWorkingAfterCall></logicalDeviceFeature></actualMonitorFilter><extensions><privateData><private><ns1:AvayaEvents xmlns:ns1="" xmlns:xsi="http://" xsi:type="ns1:AvayaEvents"><ns1:invertFilter>true</ns1:invertFilter><ns1:callControlPrivate><ns1:enteredDigits>false</ns1:enteredDigits></ns1:ca
Joined: Jun 20, 2005
Messages: 918
Location: Thornton, CO
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=" typeOfNumber="other" mediaClass="voice" bitRate="constant">EXTENSION:SWITCHNAME:</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?
Go to:   
Mobile view