RE: Error routing SAPI SR and TTS streams through modem using TAPI 3 a
From: Fabricio (Fabricio_at_discussions.microsoft.com)
Date: 02/23/05
- Next message: Andreas Marschall [MVP TAPI]: "Re: restarting telephony service from code"
- Previous message: Matthias Moetje: "Re: TAPI ports"
- In reply to: toduro: "Error routing SAPI SR and TTS streams through modem using TAPI 3 and C#"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Feb 2005 12:57:01 -0800
Toduro,
Matthias is correct. A few weeks ago I ran into the following article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;841712
It's dated May 2004 and I haven't seen any other articles that say
otherwise. However, I'm currently using both VB.NET and C++ (in different
projects) and I've yet to run into any differences between the two
technologies. I figure the incompatability is probably in TAPI functions I'm
currently not using.
-Fabricio
fguzman_slotown@yahoo.com
"toduro" wrote:
> I am trying to route SAPI SR and TTS through the modem so they can be
> applied to a telephone conversation. The "Simple Telephony"
> application works in this way, so I'm confident I don't have a hardware
> problem.
>
> I tried the following code, ported from a VB app. I have some
> questions.
>
> a) Using a hardcoded uuid string for a class identifier seems like a
> bad idea. What is the best way to get the MediaStreamTerminalClsid?
>
> b) The try block is contained in a function. The application runs
> (without the SAPI SR and TTS being properly routed) ok if the function
> is not called, but an apparently uncatchable exception is thrown about
> one second after the function exits if it is called -- the calling code
> is in a try block but its catch doesn't catch the exception, so the
> program terminates.
>
> c) Am I barking up the wrong tree in the first place? Is this the way
> I should be routing the SR and TTS streams through the modem?
>
> When I do run the code, both the objSRTerminal and the objTTSTerminal
> do get selected.
>
> ---------------------------- code follows
> ------------------------------
>
> try
> {
> TAPI3Lib.ITTerminalSupport objTerminalSupport = null;
> objTerminalSupport=(TAPI3Lib.ITTerminalSupport)this.selectedAddress;
>
> string MediaStreamTerminalClsid =
> "{E2F7AEF7-4971-11D1-A671-006097C9A2E8}";
>
> objTTSTerminal =
> objTerminalSupport.CreateTerminal(MediaStreamTerminalClsid,
> TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO,
> TAPI3Lib.TERMINAL_DIRECTION.TD_CAPTURE);
>
> objSRTerminal =
> objTerminalSupport.CreateTerminal(MediaStreamTerminalClsid,
> TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO,
> TAPI3Lib.TERMINAL_DIRECTION.TD_RENDER);
>
> TAPI3Lib.ITStreamControl objStreamControl = (TAPI3Lib.ITStreamControl)
> callInfo;
> if (objStreamControl!=null)
> {
> uint NULL = 0;
> TAPI3Lib.IEnumStream ppStreams;
> objStreamControl.EnumerateStreams(out ppStreams);
> TAPI3Lib.ITStream objStream;
> ppStreams.Next(1, out objStream, ref NULL);
> while(objStream!=null)
> {
> if (objStream.MediaType==TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO)
> {
> if (objStream.Direction==TAPI3Lib.TERMINAL_DIRECTION.TD_CAPTURE)
> {
> if (objTTSTerminal!=null)
> objStream.SelectTerminal(objTTSTerminal);
> }
> if (objStream.Direction==TAPI3Lib.TERMINAL_DIRECTION.TD_RENDER)
> {
> if (objSRTerminal!=null)
> objStream.SelectTerminal(objSRTerminal);
> }
> }
> ppStreams.Next(1, out objStream, ref NULL);
> }
> }
> }
>
> catch(Exception es)
> {
> this.LatestStatusReport = es.Message;
> }
>
>
- Next message: Andreas Marschall [MVP TAPI]: "Re: restarting telephony service from code"
- Previous message: Matthias Moetje: "Re: TAPI ports"
- In reply to: toduro: "Error routing SAPI SR and TTS streams through modem using TAPI 3 and C#"
- Messages sorted by: [ date ] [ thread ]