Re: Program architecture for TAPI v1.4 to v2.2

From: Grant Schenck (schenckg_at_optonline.net)
Date: 06/25/04


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


Relevant Pages

  • Re: timeout problems
    ... a set of values to service getnext request for a table. ... loop-prevention mechanism and refuse get-next responses that don't ... to tell a manager that it needs more ... SNMP agents and SNMP agent toolkits handle this in general. ...
    (comp.protocols.snmp)
  • [ANN] rack-cache 0.3.0
    ... Responses marked as explicitly public are cached even when the ... request includes an Authorization or Cookie header. ... BUG: ...
    (comp.lang.ruby)
  • Anonymous Anonymity - Request For Comments
    ... Anonymous Anonymity - Request For Comments ... the machine can perform as a Intermediary Server and / or as a Intermediary ... When positive responses are received then ...
    (Bugtraq)
  • Re: checking for caller id while still being able to make outgoing calls
    ... TAPI has some unique got-yas that make the benfits of multi-threading ... of your event retriveal into one thread, another issue is that a Request ID ... > newsgroup I already found source code and hints how to achive either ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Dialing Telephone Numbers
    ... > 2- Using TAPI ... This request is forwarded to the user's ... A default call-control application is provided as part of Telephony. ... Invoking tapiRequestMakeCall when no call control application is running ...
    (borland.public.delphi.nativeapi)