Question

I am having some trouble with the interop.tapi3lib.dll (which can be DL here:dllLink)

For a reporting program i'm writing, i want to monitor all of the devices available by the tapi for their calls. Now this is working nicely when i fire up the program, although i suspect the dll is written with the purpose of modifying calls on a single extension, with very little code i can see all of the activity perfectly.

The problem arrises when a user logs out (or in) a phone (I'm using this for a cisco Callmanager). At that time i am able to capture the tapi_object which in turn can be used to determine which line is removed and added (old number and new number) but i can't register the new address for sending events.

The exception when i try:

Value does not fall within the expected range.

  • because the tapiclass was created before this address was available i suspect.

At the moment i have done a test which creates a single tapiclass for each line individual and 1 tapiclass for monitoring the tapiobject event, but this is eating 10 times the memory for our company's configuration (20 phones) so i dont even want to test this at the target site (+300 phones). The other option (for i can think of) is to dispose the 'old' tapiclass and create a new one after, however i'm a bit concerned with either loosing events between, getting double events between and pingpong when multiple users log in/out (creating the class takes a couple of seconds with my program)

So, what i would really like is the option to

tapi.RegisterCallNotifications(ad, true, true, TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO, 2);

for newly available lines.

Bit of background for answers :) -I am fairly new to C#, completly new to COM-interop and i know the principles of C++, but ive never written anything in it.

Any help would greatly be appriciated. (also any comments about interop and such)

Was it helpful?

Solution

Hmm, turns out I was wrong. Adding the line for notification is possible and does not throw the exception. I think i didn't remove the old line before adding the new in my old sample.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top