We need a TAPI 3.1 COM wrapper (Developer Studio 2008 C++, Unmanaged COM interface)
To be used in Developer Studio 2008 C# managed code
It would provide functionality for answering a call, detecting DTMF digits and play back a wave file.
## Deliverables
We need a COM interface (from now on “the interface??) around TAPI 3.1 as follows:
Development environment for the interface:
Developer Studio 2008 C++, Unmanaged COM interface.
Interface output type:
Windowless COM dll. Thread safe (multiple instances will be created)
Development environment for the program using the interface:
Developer Studio 2008 C#, Managed windows service or application.
?
Running OS for the final product:
Windows 2003, Windows XP and Windows vista (they are all TAPI 3.1)
?
Interface Description: (By the way, we only receive calls, no dial out)
?
Constructor:
cTapiCOM()
?
Properties:
Get string[] DeviceNames? ? //devices present on the server, available after calling the constructor
Get/Set string DeviceName? //Device that the interface will use (the application will set to one of the DeviceNames)
Get string CallerId? //Returns the caller id, if present. It must be available as soon as the information is received (usually after the first or second ring)
Methods:
Bool Initialize() //Called after setting DeviceName. The interface must initialize TAPI on the device. If Initialize is called again, reset the all associated resources and initialize again.
Bool Answer()? //Called after receiving one or more OnRing events. (Or never called if we don’t want to answer)
Bool Hangup() //Called at any time after Answer. The interface must hang-up and be ready for another call on the device
Bool Shutdown()? //Called at any time. The interface must hang-up the call (if any) and shutdown TAPI on the device.
Bool PlayFile(string FilePath) //Called at any time after Answer. Play asynchronous and return immediately.
Bool StopPlay() //Called at any time. If playing a file, stop playing.
?
Events:
OnCallNotification() //raised as soon as the call is initiated
OnRing(int RingNumber) //raised any time a ring is received
OnConnected() //raised after the call is connected
OnDisconnected() //raised after the call is disconnected
OnDTMF(string DTMF) //raised any time a DTMF is received.
OnInformation(string Information) //a communication channel for information.
OnError (int ErrorCode, string ErrorDescription) ? //on any error
?
OnPlayDone()? //raised after the file that is playing is done playing
OnPlayError(int ErrorCode, string ErrorDescription) ? //on any error while playing a file
?
Notes:
Please DO NOT bid if you don’t have a TAPI device to test with. We are expecting a finalized product/interface.
No “delegates?? on our side. TAPI recommends that event handlers return immediately. Please queue the TAPI events from the TAPI API, return and then generate the COM event right after.
We will instantiate more than one instance of the objects, one per each TAPI capable device on the system. We need to process more than one call at a time. The interface MUST be threading safe.
The interface must take care of cleaning up the call and all that is involved. For instance, if we answer a call and starts playing a file, then hang up -which we can’t control when happens-, the interface must actually stop the file that is was playing before proceeding. This is just an example used to illustrate the concept. The idea is that the interface must be safe and do not freeze regardless of the order in which we call it.
?