Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Delphi
  4. Receive Call TAPI3 with delphi

Receive Call TAPI3 with delphi

Scheduled Pinned Locked Moved Delphi
delphicomgraphicshelpquestion
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    delphix5
    wrote on last edited by
    #1

    hi, When I program tapi3 in delphi 7 using the code below, I can make a outgoing call, but I can't catch any events. Has anybody face the same problem ? Wensheng

    unit Unit10;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
    Forms,
    Dialogs, TAPI3Lib_TLB, StdCtrls, ActiveX, ComObj, OleServer;
    {
    type
    TTapiEventsSink = class( TObject, IConnectionPointContainer, I)
    procedure TAPI1Event(ASender: TObject; TapiEvent: TOleEnum;
    const pEvent: IDispatch);
    end;
    }
    type
    TForm1 = class(TForm)
    ComboBox1: TComboBox;
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    Button3: TButton;
    Edit2: TEdit;
    Button4: TButton;
    TAPI1: TTAPI;
    Memo1: TMemo;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure TAPI1Event(ASender: TObject; TapiEvent: TOleEnum;
    const pEvent: IDispatch);
    private
    { Private declarations }
    public
    { Public declarations }
    tapi3 : ITTAPI;
    addr : ITAddress;
    media : ITMediaSupport;
    addrs : IEnumAddress;
    term : ITTerminal;
    terminalSupport : ITTerminalSupport;
    basicall :ITBasicCallControl;
    dir : TOleEnum;

    streamControl : ITStreamControl;
    enumStream : IEnumStream;
    stream : ITStream;
    mediatype : Integer;
    direct : TERMINAL\_DIRECTION;
    lAddressType : Integer;
    bHold : Boolean;
    
    event : ITCallNotificationEvent;
    tapievent : ITTAPIEventNotification;
    unknown : IUnknown;
    

    end;

    const TAPI3_CALL_EVENTS =
    TE_CALLMEDIA OR
    TE_CALLNOTIFICATION OR
    TE_CALLSTATE;
    const
    TAPIMEDIATYPE_AUDIO = $8;
    TAPIMEDIATYPE_VEDIO = $8000;
    TAPIMEDIATYPE_DATEMODEM = $10;
    TAPIMEDIATYPE_G3FAX = $20;
    LINEADDRESSTYPE_PHONENUMBER = $00000001;
    EVENT_FILTER =
    TE_TAPIOBJECT OR
    TE_ADDRESS OR
    TE_CALLNOTIFICATION OR
    TE_CALLSTATE OR
    TE_CALLMEDIA OR
    TE_CALLHUB OR
    TE_CALLINFOCHANGE OR
    TE_PRIVATE OR
    TE_REQUEST OR
    TE_AGENT OR
    TE_AGENTSESSION OR
    TE_QOSEVENT OR
    TE_AGENTHANDLER OR
    TE_ACDGROUP OR
    TE_QUEUE OR
    TE_DIGITEVENT OR
    TE_GENERATEEVENT;

    var
    Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.FormCreate(Sender: TObject);
    var
    lwCeltFetched : Cardinal;
    cookievar : Integer;
    begin
    bHold := false;

    tapi1.Initialize;
    tapi1.C

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups