简体   繁体   中英

Connect to TAPI 3

I am trying to connect to a Tapi which it is connected in another pc, but IENumAddress is returning null. How i can specify the server's ip?

tobj = new TAPIClass();
            tobj.Initialize();
            IEnumAddress ea=tobj.EnumerateAddresses();
            ITAddress ln;
            uint arg3=0;
            lines=0;

            cn=new callnotification();
            cn.addtolist=new callnotification.listshow(this.status);
            tobj.ITTAPIEventNotification_Event_Event+= new TAPI3Lib.ITTAPIEventNotification_EventEventHandler(cn.Event);
            tobj.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);

            for(int i=0;i<10;i++)
            {
                ea.Next(1,out ln,ref arg3);
                ia[i]=ln;
                if(ln!=null)
                {
                    comboBox1.Items.Add(ia[i].AddressName);
                    lines++;
                }
                else
                    break;
            }

In this line I have the problem

IEnumAddress ea=tobj.EnumerateAddresses();

您不能:TAPI应用程序和TSP(= TAPI服务提供程序,也就是TAPI驱动程序)必须位于同一服务器上。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM