【问题标题】:Connect to TAPI 3连接到 TAPI 3
【发布时间】:2017-01-16 12:13:25
【问题描述】:

我正在尝试连接到已连接到另一台 PC 的 Tapi,但 IENumAddress 返回 null。如何指定服务器的 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;
            }

在这一行我有问题

IEnumAddress ea=tobj.EnumerateAddresses();

【问题讨论】:

  • 警惕直接从 .NET 使用 TAPI 功能,它不能很好地与自动生成的 COM 互操作层和某些对象的释放方式配合使用。有时它可以正常工作,有时则不能,根据使用的底层 TAPI 驱动程序和电话系统,会出现一些模糊的问题。
  • 你有什么样的pbx?在编写代码之前,您需要安装 tsp 提供程序。

标签: c# phone-call tapi


【解决方案1】:

您不能:TAPI 应用程序和 TSP(=TAPI 服务提供商,也称为 TAPI 驱动程序)需要位于同一台服务器上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-24
    • 1970-01-01
    • 1970-01-01
    • 2015-03-24
    相关资源
    最近更新 更多