FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TAPI
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
TAPI
Posted: Wed Oct 03, 2007 08:21 AM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TAPI
Posted: Wed Oct 03, 2007 03:45 PM
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)

#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"
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
TAPI
Posted: Wed Oct 03, 2007 09:48 PM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
TAPI
Posted: Fri Aug 22, 2008 11:44 AM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TAPI
Posted: Fri Aug 22, 2008 03:11 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TAPI
Posted: Fri Aug 22, 2008 03:37 PM
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Making a Tapi call: Outlook Vs my program
Posted: Thu Oct 09, 2008 02:00 PM

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

Marco Boschi
info@marcoboschi.it
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
TAPI
Posted: Thu Oct 09, 2008 02:27 PM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TAPI
Posted: Thu Oct 09, 2008 04:02 PM
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


#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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
TAPI
Posted: Thu Oct 09, 2008 04:04 PM

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

Marco Boschi
info@marcoboschi.it
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
TAPI
Posted: Thu Oct 09, 2008 06:32 PM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TAPI
Posted: Thu Oct 09, 2008 07:07 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 15
Joined: Mon Sep 29, 2008 01:41 PM
Re: TAPI
Posted: Sat Oct 11, 2008 02:13 PM
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.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TAPI
Posted: Sat Oct 11, 2008 03:54 PM
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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: TAPI
Posted: Wed Sep 30, 2009 10:20 AM

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

Continue the discussion