?
Solved

Problem with APRO

Posted on 2005-03-18
3
Medium Priority
?
729 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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