TCall
myCall=MyAddress.CreateCall("0",LINEADDRESSTYPES.PhoneNumber,TAPIMEDIATYPES.AUDIO)
TTerminal t=myCall.RequestTerminal(TTerminal.FilePlaybackTerminal,
TAPIMEDIATYPES.AUDIO, TERMINAL_DIRECTION.TD_RENDER)
in this code TTerminal object always returns null.
Before that I tried using Tapi3Lib directly;
ITAddress oAddress;
ITMediaSupport ims = (ITMediaSupport)oAddress;
ITTerminalSupport its = (ITTerminalSupport)ims; //Error
When I try to crate ITTerminalSupport I get "unable to assign... Such an
interface isn't supported" error.
I'm using Agere Systems HDA modem. As I said I got no problem calling. Is
the problem about my modem's audio support? I also tried the codes on a few
laptops and I got same errors.
Thanks in advance
Halil
private void btnPlay_Click(object sender, EventArgs e)
{
Object[] playList = { "C:\\myfile.wav" };
ITTerminal PLyTerminal=
bcc.RequestTerminal(TAPI3Lib.TapiConstants.CLSID_String_FilePlaybackTerminal,
TapiConstants.TAPIMEDIATYPE_MULTITRACK, TERMINAL_DIRECTION.TD_CAPTURE);
ITMediaPlayback MediaPlay=(ITMediaPlayback)PLyTerminal;
MediaPlay.PlayList = playList;
ITMediaControl MediaControl = (ITMediaControl)MediaPlay;
bcc.SelectTerminalOnCall(PLyTerminal);
MediaControl.Start();
}
and use below code for dial:
private void btnCall_Click(object sender, EventArgs e)
{
bcc = (ITBasicCallControl2)ln.CreateCall(textBox1.Text,
TapiConstants.LINEADDRESSTYPE_PHONENUMBER, TapiConstants.TAPIMEDIATYPE_AUDIO);
bcc.Connect(false);
}
note: ITBasicCallControl2 bcc;
Halil,
are you using a voice modem or only a fax/data modem?
The latter won't work for this.
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto� Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no
rights.
And For Andreas's question. How can I understand if a modem supports voice
Thanks & Regards
Halil, you are welcome.
> And For Andreas's question. How can I understand if a modem supports voice
You may want to try my Toto� Tool WaveDevice and see whether it reports any
wave devices (in / out) associated wih your modem:
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm#_Toto�_Tool_WaveDevice
If i doesn't then your modem isn't (installed as) a voice modem.