0

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();
rhdez7
  • 11
  • 4
  • Be wary of using the TAPI functionality directly from .NET, it doesn't play nicely with the autogenerated COM interop layer and the way certain objects are released. Sometimes it will work fine, othertimes it will not, with obscure issues cropping up depending on the underlying TAPI driver and phone system being used. – James Thorpe Jan 16 '17 at 12:20
  • What kind of pbx do you have? Before code this you need to install tsp provider. – Alex Pashkin Feb 07 '17 at 05:37

1 Answers1

1

You cannot: the TAPI Application and TSP (=TAPI Service Provider a.k.a. the TAPI Driver) need to be on the same server.

Kris Vanherck
  • 245
  • 1
  • 10