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

How to use TAPI with MS Access 2000 ?

39 views
Skip to the first unread message

Andreas

unread,
12 Jan 2004, 14:03:1712/01/2004
to
Hi

I'd like to know how to use TAPI with MS Access 2000.

We move from telephones that understand AT commands to a bigger system
which has phones with connection adapter thingies. Those adapters will
understand TAPI commands.

Up until now I could post ATD, ATH and ATO to the phone directly via COM
port to dial, hang up and accept an incoming call (headset). Really
simple but straight forward.

With the new systemphones I'd need to go the TAPI way.

How can I have those 3 functions with VBA ?

call (strNumber as string)
hang_up ()
accept ()

OK, there will be some kind of device identification be necesary, I
suppose. I'd rather not use any aditional application to do all this if
I don't have to.


Thanks
Andreas

Andreas Marschall [MVP TAPI]

unread,
12 Jan 2004, 14:26:1012/01/2004
to
"Andreas" <map...@gmx.net> schrieb im Newsbeitrag
news:btuqsf$8u5$01$1...@news.t-online.com...

What devices / telephony HW / PBX / TAPI Service Provider (TSP) are you using?
What OS are you using?

If you only want to make a call it's very simple with TAPI Assisted Telephony:
tapiRequestMakeCall("555-5555",NULL,NULL,NULL);
But with Assisted Telephony you can only initiate an outgoing call.
You can NOT drop / control it any further from your app / Access.
The call itself is controlled via the call-manager application (usually MS
Phone Dialer) that is assisting.

If you need more control within your app / Access you need to do full TAPI.
Basically you have to:
- lineIntializeEx()
- lineNegotiateApiVersion(), lineGetDevCaps(), lineGetAddressCaps()
- lineOpen()
- lineMakeCall()
- ...
- lineDrop()
- lineDeallocateCall()
- lineClose()
- lineShutdown()

Take a look a the TAPI samples (especially Outgoing, Incoming in VB) from
P-SDK and play
around with TAPI Browser TB20 / TB3x before starting to code anything
yourself.
See my TAPI and TSPI FAQ:

Q: Where can I download TAPI related stuff ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_From_where

Q: Is there any sample code available ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there

Q: Where can I download TAPI Browser ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_can

Q: Is there a user guide available for TAPI Browser TB20 ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_1

Q: Is there a user guide available for TAPI Browser TB3x ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_2


--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
* 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.


Jack

unread,
12 Jan 2004, 14:28:0612/01/2004
to
You cannot have that when using VBA (it is limited only to simple make call
operation-TapiMakeCall).
You need to write fully blown Tapi application or use one of existing
applications you can find on Internet.

"Andreas" <map...@gmx.net> wrote in message
news:btuqsf$8u5$01$1...@news.t-online.com...

Andreas

unread,
12 Jan 2004, 17:25:1312/01/2004
to
Andreas Marschall [MVP TAPI] schrieb:

> What devices / telephony HW / PBX / TAPI Service Provider (TSP) are you using?
> What OS are you using?

TENOVIS (BOSCH) TS13 and HS13 phones with their AEI adapter boxes for
controlling them by a computer.
Tenovis told me there were TAPI support.

We use Windows 2000 with Access 2000 as database frontend.


> If you only want to make a call it's very simple with TAPI Assisted Telephony:
> tapiRequestMakeCall("555-5555",NULL,NULL,NULL);
> But with Assisted Telephony you can only initiate an outgoing call.
> You can NOT drop / control it any further from your app / Access.
> The call itself is controlled via the call-manager application (usually MS
> Phone Dialer) that is assisting.

I played a bit with this function.
It works but even though it's comfortable it still clutters the screen
and covers parts of our application.


> If you need more control within your app / Access you need to do full TAPI.

It seems odd, that this really basic functions aren't provided to be
easily used in VBA, too.

I found an hint to some ActiveX control that claims to provide TAPI for
VBA though I couldn't find a source yet.
Well, I thought someone else in the community might have solved this
allready.

> Basically you have to:
[...]

Thanks ;)

Andreas

Andreas Marschall [MVP TAPI]

unread,
12 Jan 2004, 18:02:3212/01/2004
to
"Andreas" <map...@gmx.net> schrieb im Newsbeitrag
news:btv6n3$mqm$04$1...@news.t-online.com...

> I found an hint to some ActiveX control that claims to provide TAPI for
> VBA though I couldn't find a source yet.

Maybe you are referring to ExceleTel's TeleTools.
For a link see my TAPI and TSPI FAQ:

--

Rod Scoullar

unread,
13 Jan 2004, 21:04:0913/01/2004
to
Andreas,

I have been trying to connect calls directly from an Access2000 database
using VBA code.

I have finally had success with connecting the call. Disconnecting is easy
once the call is connected.

Accepting a call is something I haven't succeeded with yet - and as that
isn't urgent n my case I'm not trying too hard.

I have created a TAPI class so that WithEvents can be used - that appears to
be necessary for accepting calls. I opened a class module and used the
following code.

'
' This function iterates through the addresses identified by TAPI and
returns the first address which has a matching dialable address.
' In my case this correctly picks up the address of the phone attached to
the user's computer. You may have to select the address
' using different criteria. It doesn't have to be Public, it was easier
to debug that way.
'
Public Function GetTAPIAddress() As TAPI3Lib.ITAddress
Dim objTapi As New TAPI
Dim objAddress As TAPI3Lib.ITAddress

Set GetTAPIAddress = Nothing
objTapi.Initialize
For Each objAddress In objTapi.Addresses
If Len(objAddress.AddressName) > 0 And Len(objAddress.DialableAddress) >
0 Then
If InStr(objAddress.AddressName, objAddress.DialableAddress) > 0 Then
Set GetTAPIAddress = objAddress
Exit For
End If
End If
Next
Set objTapi = Nothing
Set objAddress = Nothing
End Function


' This procedure makes the call, using the phone number passed to it as a
string.
'
Public Sub MakeCall(strPhoneNumber As String)
Dim objCall As TAPI3Lib.ITBasicCallControl
Dim objTerminal As TAPI3Lib.ITTerminal
Dim objAddress As TAPI3Lib.ITAddress

strPhoneNumber = "0" & strPhoneNumber
Set objAddress = GetTAPIAddress()
Set objCall = objAddress.CreateCall(strPhoneNumber,
LINEADDRESSTYPE_PHONENUMBER, TAPIMEDIATYPE_AUDIO)
objCall.Connect False
Set objCall = Nothing
Set objTerminal = Nothing
Set objAddress = Nothing
End Sub

To disconnect the call you would have to change the MakeCall sub into a
Function and have it return the call object to a module scoped variable.
You could then call the mobjCall.Disconnect method to disconnect the call.

Good luck,

Rod Scoullar.


Andreas

unread,
19 Jan 2004, 21:34:2219/01/2004
to Rod Scoullar
Rod,

> I have finally had success with connecting the call. Disconnecting is easy
> once the call is connected.

Right, (dis)connecting works as you say.


> Accepting a call is something I haven't succeeded with yet - and as that
> isn't urgent n my case I'm not trying too hard.

That's a pitty.
Again I looked into the VB samples of MSDN and gave up for now. I just
don't have a clue how to find a way through TAPI's complexity.
I'm rather sure there are just a few calls to be made to tell the device
to go off hook.

The MSDN sample uses a ITCallNotificationEvent which it should receive
from the TAPI event queue. That assumes there is a eventhandler for this
type of events.
I think VBA doesn't allow to create such procedures.


Thanks,
Andreas


Fred

unread,
22 Jan 2004, 17:30:0022/01/2004
to
It may help you, or at least get you started if you don't need our
components to make it easy for you, but we have notes and source code
for using our TeleTools components with TAPI in Access. You can of
course make calls to the TAPI DLL, or use an ActiveX like TeleTools.
The notes there talk about how Access has a strange implementation of
VB, it is not the same thing. For example, the wrapper it wants to
automatically place on third party controls needs to be avoided and
you only have one timer per form using the windows controls.

http://www.exceletel.com/support/DevEnv/Access/index.htm

Fred
www.exceletel.com

0 new messages