TAPI

Post Reply
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

TAPI

Post by driessen »

Hello,

TAPI is a Windows API. TAPI stands for "Telephony Appliction Programming Interface". This is a API to connect to a telephone system.

Does someone have any experience in TAPI ?

What is needed to use TAPI ? How is it accomplished ?

Thanks a lot in advance.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Michel,

I don't know much about TAPI but I did find this in my notes file from an old posting. I tried it and it does work. It brings up a TAPI dialog in addition to dialing.

I too, would be interested in more information about TAPI.

James

----------------------------
Tip: Get all the TAPI info on Microsoft's website.

http://msdn2.microsoft.com/en-us/library/ms737219.aspx

Here is a working example (tested on XP Pro)

Code: Select all

#include "fivewin.ch"

function main()
   local cPhone:="1-999-999-9999"
   phoneTo(cPhone,"My TAPI","Test TAPI","My comment")
return nil


DLL32 Function PhoneTo(cPhoneNo As LPSTR,cAppName AS LPSTR,;
      cName AS LPSTR, cComment AS LPSTR ) ;
      AS LONG PASCAL FROM "tapiRequestMakeCall" LIB "TAPI32.DLL"
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

James,

Thank you very much of your answer.

It is working. Just what I needed.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

James,

I implemented the TAPI function "PhoneTo" in my application.

It works very well.

It uses the standard Windows phone-function.

But a customer of mine installed a new telephone system on his network which uses its own TAPI system. The telephone system is now implemented in my application, just by using the function you gave me.

But I'd like to know if there is also a similar function to answer a phonecall.

Thanks.

Michel
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Michel,

>But I'd like to know if there is also a similar function to answer a phonecall.

According to the help file, this feature is built in.

"To receive calls, you must have Phone Dialer running. When you make or receive a call, a dialog box appears in the upper-left corner of your screen. If the person you are talking to has a video camera installed, the dialog box shows a video image of the person."

I have not tried it. Perhaps you didn't have the Phone dialer running?

Regards,
James
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Making a Tapi call: Outlook Vs my program

Post by MarcoBoschi »

James,
I have compiled a program with this function:

DLL32 Function PhoneTo1( cPhoneNo As LPSTR, cAppName AS LPSTR, cName AS LPSTR, cComment AS LPSTR ) ;
AS LONG PASCAL FROM "tapiRequestMakeCall" LIB "TAPI32.DLL"

It's work fine but at least two dialog appears on the screen for each calls.

Instead If I make a call from Outlook and NO dialogs appear on my screen durin the call! Another fine thing is that I can drop the call from Outlook.
Is it possible from a Fivewin application to make and to drop a call without pop-up dialog?

Thanks
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

Marco,

I have implemented this function in my application. It is working fine. The call from my application is perfectly handed over to the telephone nearby.

But, indeed, 2 dialogboxes do appear, and I haven't found a solution to avoid this.

Thanks for your sharing your experiences.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Marco & Michel,

You can try just hiding them by finding the window handle and using showWindow() to hide them. Here is an example. You will need to replace "Window Title" with the actual title of the window you wish to hide.

This is an adaptation of a sample by Enrico.

Regards,
James

Code: Select all

#include "Fivewin.ch" 


#define GW_HWNDFIRST 0 
#define GW_HWNDLAST  1 
#define GW_HWNDNEXT  2 
#define GW_HWNDPREV  3 
#define GW_OWNER     4 
#define GW_CHILD     5 


#define SW_NORMAL 1
#define SW_HIDE         0
 


FUNCTION MAIN() 

    LOCAL hWnd := FINDWND( "Window Title" ) 

    IF !EMPTY( hWnd ) 
        ? GETWINDOWTEXT( hWnd ) 
        SHOWWINDOW( hWnd, SW_HIDE ) 
    ELSE 
        ? "Window not found" 
    ENDIF 

    RETURN NIL 


FUNCTION FINDWND( cTitle ) 

    LOCAL hWnd := GETWINDOW( GETDESKTOPWINDOW(), GW_CHILD ) 

    WHILE hWnd != 0 
        IF UPPER( cTitle ) $ UPPER( GETWINDOWTEXT( hWnd ) ) 
            RETURN hWnd 
        ENDIF 

        hWnd = GETWINDOW( hWnd, GW_HWNDNEXT ) 
    ENDDO

RETURN NIL 
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Post by MarcoBoschi »

It would be better if there were not those two windows.
We use an Innovaphone PBX TAPI Service provider
Some demonstration software work fine.
Outlook also works fine.
I wonder which functions they use..
good evening
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

James,

Your suggestion should be useful if .... the concerning windows had a title bar. So we don't know what the window title is.

Any ideas ?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

The issue seems to be that the tapiRequestMakeCall api is designed to use the common windows dialer (EXE), so I don't think it can be turned off. The only other idea I have is to bring your app window to the top, thus hiding the other window(s) behind.

You can access the TAPI API directly, but I don't know how since it requires C functions to do so and I am not a C programmer.

Perhaps Antonio or someone else that knows C can help.

Regards,
James
Sheng
Posts: 15
Joined: Mon Sep 29, 2008 1:41 pm

Re: TAPI

Post by Sheng »

driessen wrote:Hello,

TAPI is a Windows API. TAPI stands for "Telephony Appliction Programming Interface". This is a API to connect to a telephone system.

Does someone have any experience in TAPI ?

What is needed to use TAPI ? How is it accomplished ?

Thanks a lot in advance.
You can use 'TurboPower Async Professional' for ActiveX,
It's Opensource.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Here is another TAPI OCX. The developer's license is only US$89. There is a free test version. I have not tried it.

http://www.smart-activex.com/tapi.html

Regards,
James
Last edited by James Bott on Thu Dec 17, 2009 4:47 pm, edited 1 time in total.
PeterHarmes
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: TAPI

Post by PeterHarmes »

Hi,

I've just been asked by a client if it is possible to connect to a TAPI driver, so that when the phone rings, my application will popup a screen depending if the telephone number is recognised or not.

Is this possible? If so, how do you "listen" for the phone? Do you have to poll a port or could you do something similar to:

oDlg:bCommNotify := { | nComm, nStatus | get_card( nComm, nStatus ), EnableCommNotification( nComm, oDlg:hWnd, 1, -1 ) }

Many Thanks

Pete
Post Reply