Re: Program architecture for TAPI v1.4 to v2.2
From: Grant Schenck (schenckg_at_optonline.net)
Date: 06/25/04
- Next message: Grant Schenck: "Re: Error in TAPI3.."
- Previous message: Andreas Marschall [MVP TAPI]: "Re: Program architecture for TAPI v1.4 to v2.2"
- In reply to: Ting Liu: "Re: Program architecture for TAPI v1.4 to v2.2"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 16:45:21 -0400
You want to build a general software facility for tracking responses
and associating them with requests. So, for example, an Answer "tool"
would be invoked when you see a call offering. When this "tool" is
invoked, it makes the request to TAPI and stores the TAPI request ID
as a data member. This request would be added to a collection
maintained by your application. Then whenever you check TAPI for
responses (or get notified via whichever notification mechanism you
employ) you can scan all outstanding requests to see which one this is
a response to. Your dispatcher then calls a member function of your
"tool" (hopefully all tools are derived from a common base class so
you can easily add new tools without re-writing your dispatcher) to
notify it of the response. The tool then completes and hopefully you
have some kind of scripting ability to then look at the results of the
tool and move to the next step in your script. If you do things write
you really don't need to use threads for most of what you want to do.
TAPI handles async activities and as long as you stay in front of the
wave driver you can also avoid threading calls to queue play and
receive buffers.
Lots of ranting here but I've built several high quality rock solid
telephony apps with TAPI using techniques like I describe.
-- Grant Schenck Grant Schenck Software schenckg@optonline.net http://grantschenck.tripod.com "Ting Liu" <tl_163@hotmail.com> wrote in message news:ae45a9be.0406250849.32102ddc@posting.google.com... > Since TAPI v1.4 uses callback functions while TAPI v2.0 provides more > mechanisms. Moreover, some lineXXX functions require asynchronous > reply while others do not. > > what is the best structure for the program, so it will not be messy. > Thank you in advance. > > > Ting > > > > > > > > tl_163@hotmail.com (Ting Liu) wrote in message news:<ae45a9be.0406241840.10f5c61@posting.google.com>... > > Hi, Experts: > > > > What is the best program structure for TAPI v1.4 and v2.2? To make it > > more specific, what I am trying to know is how you effectively arrange > > your program structures to handle asynchronous events and callback > > functions such as those in TAPI v1.4 and v2.2. > > > > Can you also provide a brief outline of it? Such as when a thread > > should start, when to wait for an event or anything similar, so all > > cases can be handled nicely. > > > > Thank you in advance. > > > > > > Ting
- Next message: Grant Schenck: "Re: Error in TAPI3.."
- Previous message: Andreas Marschall [MVP TAPI]: "Re: Program architecture for TAPI v1.4 to v2.2"
- In reply to: Ting Liu: "Re: Program architecture for TAPI v1.4 to v2.2"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|