Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Playback over modem

27 views
Skip to first unread message

Aliassce

unread,
Oct 29, 2009, 6:14:04 PM10/29/09
to
Hi,
For months I have tried to dial a number and play a wav file using this
connection. I have tried Julmar's ITAPI and also Tapi3lib.
I can call the number but I can not create a terminal. Using Julmar's api I
try;

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

Mahyar

unread,
Oct 31, 2009, 3:43:01 AM10/31/09
to
Hi,
I use below code, and can Play wav file via phone line:

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;


Andreas Marschall [exMVP TAPI]

unread,
Oct 31, 2009, 5:12:43 AM10/31/09
to
"Aliassce" <Alia...@discussions.microsoft.com> schrieb im Newsbeitrag
news:6A6ACB7B-2510-4231...@microsoft.com...

> 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.

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.

Aliassce

unread,
Oct 31, 2009, 7:35:01 AM10/31/09
to
Thanks for replies
Mahyar's code gives error at "Invalid Cast"

ITTerminal PLyTerminal=
bcc.RequestTerminal(TAPI3Lib.TapiConstants.CLSID_String_FilePlaybackTerminal,
TapiConstants.TAPIMEDIATYPE_MULTITRACK, TERMINAL_DIRECTION.TD_CAPTURE);

And For Andreas's question. How can I understand if a modem supports voice

Thanks & Regards

Andreas Marschall [exMVP TAPI]

unread,
Oct 31, 2009, 11:35:55 AM10/31/09
to
"Aliassce" <Alia...@discussions.microsoft.com> schrieb im Newsbeitrag
news:FFF7B8EB-6F30-4001...@microsoft.com...
> Thanks for replies

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.

Aliassce

unread,
Oct 31, 2009, 5:39:02 PM10/31/09
to

Thanks a lot. As I was afraid my modem is not a voice modem.
I spent so much time to make it play a soud file :)
0 new messages