TAssistedTAPI - TAPI Project Examples

System requests : A simple  TAPI Application In many cases  you need only a minimum of functionality from  TAPI. These are encapsulated in the component TAssistedTAPI. We need now a server application  to do this. The DIALER.EXE  should per default solve this problem .
First we create a form .
She should approximately look now so. We assign the properties to our AssistedTAPI1 component now. AppName (presetting Form.Caption) would be there therefore the name of our application is if necessary reported to this one by the servers application. CalledParty contains the name of the called participant. To Comment -no comment: -) .The property DestAddress phone number to be chosen this one performed official duties. There may be this here both in the canonical or in the dial able format . We still assign the event treatments now. (see below)



procedure TForm1.Button1Click (Sender: TObject);
begin
   AssistedTAPI1.MakeCall;
end;
 
 
My congratulations your first TAPI application are ready.


Source Code of Application

unit main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 
Dialogs, AssistedTAPI, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
   
Label1: TLabel;
    Edit5: TEdit;
    Label5: TLabel;
    Button1: TButton;
    Button2: TButton;
    AssistedTAPI1: TAssistedTAPI;
    Label6: TLabel;
    Label7: TLabel;
    GroupBox1: TGroupBox;
    Label2: TLabel;
    Label3: TLabel;
    Edit4: TEdit;
    Label4: TLabel;
   
Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    procedure Edit1Change(Sender: TObject);
    procedure Edit4Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
   
procedure Edit5Change(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
   
procedure AssistedTAPI1InvalDestAddress(Sender: TObject);
    procedure AssistedTAPI1NoRequestRecipient(Sender: TObject);
    procedure AssistedTAPI1RequestFailed(Sender: TObject);
    procedure AssistedTAPI1RequestQueueFull(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Edit1Change(Sender: TObject);
begin
  AssistedTAPI1.CalledParty:=Edit1.Text;
end;

procedure TForm1.Edit4Change(Sender: TObject);
begin
  AssistedTAPI1.DestAddress:=Edit4.Text;
end;

procedure TForm1.Edit5Change(Sender: TObject);
begin
  AssistedTAPI1.Comment:=Edit5.Text;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Label8.Caption:=AssistedTAPI1.CountryCode;
  Label9.Caption:=AssistedTAPI1.CityCode;
  AssistedTAPI1.DestAddress:=Edit4.Text;
  AssistedTAPI1.Comment:=Edit5.Text;
  AssistedTAPI1.CalledParty:=Edit1.Text;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  AssistedTAPI1.MakeCall;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Close;
end;

{ On Windows 2000 and XP the following events never occur with dialer.exe}

procedure TForm1.AssistedTAPI1InvalDestAddress(Sender: TObject);
begin
  MessageDlg(' The entered phone number is wrong ',mtError,[mbOK],0);
end;

procedure TForm1.AssistedTAPI1NoRequestRecipient(Sender: TObject);
begin
  MessageDlg('Please install Dialer.exe or an other TAPI Svr',mtError,[mbOK],0);
end;

procedure TForm1.AssistedTAPI1RequestFailed(Sender: TObject);
begin
  MessageDlg('Request failed',mtError,[mbOK],0);
end;

procedure TForm1.AssistedTAPI1RequestQueueFull(Sender: TObject);
begin
  MessageDlg('The Querry is full, please try later',mtError,[mbOK],0);
end;

end.

 

Platforms / Hardware
Windows  95 ELSA Microlink 33.6
  AVM Fritz Card Clasic
   
Windows 98 U.S. Robotics 56K Professional Message Modem
   
Windows NT 4.0 SP 5 ELSA Microlink 33.6
  AVM Fritz Card Clasic
   
Windows 2000 SP 1 / 2 ELSA Microlink 33.6
  AVM Fritz Card Clasic
  AVM TAPI Services for ISDN
   
Windows XP U.S Robotics 56K
  AVM Fritz Card

You have test this with your own  Hardware ? Please let' me know !: Operating system, Hardware, Device type, Problems.