Solved

TAPI support on windows 7

Posted on 2010-09-09
1
1,213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

628 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