Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

ObjEvent not executing function

$
0
0

I'm trying to receive events about incoming calls from a VoIP software (Mitel UC Advanced - in case somebody wants to know). There is a SDK available which consists of one DLL file (TelephonyProxy.dll).

The documentation of the DLL file says the following about the Offering event:

 


The Listener class captures the telephony events raised by Unified Communicator

[...]

When used as COM class, the class ID is CE21C9EE-6671-4B1C-8B01-D7AA4C52CB6C.

 

 

Visual Basic example:

Public Class Listener

Offering event in detail:

 


The Offering event is raised when Unified Communicator receives an incoming call.

 

Visual Basic example:

Public Event Offering As Listener.OfferingEventHandler

Delegation in Visual Basic:

Public Delegate Sub OfferingEventHandler ( _     name As String, _     number As String _ )

This is what I produced in AutoIt based on the documentation:

Local $oError = ObjEvent("AutoIt.Error", "nothing") $oPhone = ObjCreate("{CE21C9EE-6671-4B1C-8B01-D7AA4C52CB6C}") $oPhoneEvent = ObjEvent($oPhone,"_PhoneEvent_") MsgBox(0,"isObj",IsObj($oPhone)) While 1     Sleep(100) WEnd Func _PhoneEvent_Offering($name,$number)     MsgBox(0,"",$name & " " & $number) EndFunc

The problem is that the function '_PhoneEvent_Offering' is not executed on incoming calls. The object on the other hand is created (returns 1). The DLL's interface fullfills the requirements of AutoIt for working with it as far as I know. The 'oleviewer.exe' shows the IDispatch-interface under 'Telephony.Proxy' (see attached screenshot).

 

There are other API options in the DLL file, i.e. dialing a number. This works as desired so I bet I'm missing something with the ObjEvent stuff.

 

Any help is appreciated.

 

Thanks, Bastian

 

EDIT:

 

When using an object to fetch possible errors I always get this on the console:

err.number is:  -2147319785 err.windescription: Field name not defined in the record

Attached Thumbnails

  • oleviewer.PNG

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>