Solved

TAPI support on windows 7

Posted on 2010-09-09
1
1,174 Views
Last Modified: 2012-08-14
Hi.

I have the following C# code which works perfectly in Windows XP. However, when I run this on Windows 7, it doesn't work.

 
bool found = false;

                tapi = new TAPIClass();
                tapi.Initialize();
                
                call_notify = new callnotification();
                call_notify.addtolist = new callnotification.listshow(this.status);
                tapi.ITTAPIEventNotification_Event_Event += new TAPI3Lib.ITTAPIEventNotification_EventEventHandler(call_notify.Event);
                tapi.EventFilter = (int)(TAPI_EVENT.TE_CALLNOTIFICATION |
                    TAPI_EVENT.TE_DIGITEVENT |
                    TAPI_EVENT.TE_PHONEEVENT |
                    TAPI_EVENT.TE_CALLSTATE |
                    TAPI_EVENT.TE_GENERATEEVENT |
                    TAPI_EVENT.TE_GATHERDIGITS |
                    TAPI_EVENT.TE_REQUEST);
                

                ITCollection collec;
                ITAddress address;
                ITMediaSupport support;
                ITAddressCapabilities capability;
                collec = (ITCollection)tapi.Addresses;
                
                foreach (ITAddress addr in collec)
                {
                    
                    found = false;
                    address = addr;
                    support = (ITMediaSupport)address;
                    capability = (ITAddressCapabilities)address;
                    if (support.QueryMediaType(TapiConstants.TAPIMEDIATYPE_AUDIO))
                    {
                        
                        found = true;
                    }
                    capability = null;
                    support = null;
                    address = null;
                    if (found == true)
                    {                        
                        if (addr.AddressName.ToUpper() == "H323 LINE")
                        {                           
                            call_address = addr;
                        }
                        //break;
                    }
                }
                
                ////registration part
                registration = tapi.RegisterCallNotifications(call_address, true, true, TapiConstants.TAPIMEDIATYPE_AUDIO, 1);

Open in new window


The problem occurs at this portion: line 31
if (support.QueryMediaType(TapiConstants.TAPIMEDIATYPE_AUDIO))

This is never true in Windows 7, thus, my code doesn't work. I have already started up Telephony services in Win 7, what else do I need to do?

I'm using TAPI3Lib.dll
0
Comment
Question by:asischandra
1 Comment
 
LVL 19

Accepted Solution

by:
Rimvis earned 500 total points
ID: 33636044
Hi asischandra,H323 protocol is not supported since Windows Vistahttp://www.i-b-a-m.de/Andreas_Marschall%27s_TAPI_and_TSPI_FAQ.htm#_Q:_What_about
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now