?
Solved

Problem with APRO

Posted on 2005-03-18
3
Medium Priority
?
736 Views
Last Modified: 2008-03-10
Hi there
I was developing project to answer calls by using APRO (Async Professionsl)  componenet and delphi 6 . I use Apdtapidevice from APRO to do that and my project successfully answer call for first time and play wav files , BUT if any user trying to call my application second time my application arise exception saying "Device is already in use wait until free" , and my application deos not answer call , but -i am windering for that- if user try again for third time it working correctly.
my question Why this exception happen and how can i fix this problem?
thanx in advance
-- And sorry for my language becuase my native language is arabic
0
Comment
Question by:mohaned
3 Comments
 

Accepted Solution

by:
ohag earned 250 total points
ID: 13581449
First Its not a good reason to be bad in english language because you are arabian, secondly send me a sample source code at email Ibrahim_m_i@yahoo.com and surely i will help you.
0
 
LVL 7

Expert Comment

by:LRHGuy
ID: 13581999
Why not post some of your call handling code here, and all the experts will try to help.

It may be you're missing a HangUp command, or you may need to close then reopen the port with the APRO routines.
0
 

Author Comment

by:mohaned
ID: 13584730
Hi every body
First i want to mention that
I dont want my application to interact with any user event that i want my app. to be JUSt Answering Engine .First it is to be in answering mode to accept incoming calls and then play
some wave files to let user do somethings and then if the user disconnect remotly (just hang up) my application just dissconnecting and return again to answering mode.
Take a look to my code
procedure TForm1.ApdTapiDevice1TapiConnect(Sender: TObject);
begin
  Try
    ApdTapiDevice1.PlayWaveFile('c:\test.wav');
  Except
  End;
end;

procedure TForm1.ApdTapiDevice1TapiStatus(CP: TObject; First,
  Last: Boolean; Device, Message, Param1, Param2, Param3: Integer);
begin
  IF last and ApdTapiDevice1.TapiState = tsDisconnected Then
    ApdTapiDevice1.AutoAnswer;
   IF last Then Application.ProcessMessages;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
ApdTapiDevice1.AutoAnswer;
end;

procedure TForm1.ApdTapiDevice1TapiFail(Sender: TObject);
begin
ApdTapiDevice1.CancelCall;
ApdTapiDevice1.AutoAnswer;
end;
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Integration Management Part 2
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question