FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Fwh and PBX
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Fwh and PBX
Posted: Mon Mar 11, 2013 07:43 AM

It i spossible with Fwh a comunication as CTI (computer telephony integration) and and PBX (phone system) ?
is there a test sample ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Fwh and PBX
Posted: Mon Mar 11, 2013 04:03 PM
Sylvio,

I don't know if this is of any help to you. I use TAPI to make phonecalls from my application by using this code :
Code (fw): Select all Collapse
DLL32 Function PhoneTo(cPhoneNo As LPSTR,cAppName AS LPSTR,cName AS LPSTR,cComment AS LPSTR) AS LONG PASCAL FROM "tapiRequestMakeCall" LIB "tapi32.dll"

PROCEDURE MakePhoneCall(cTelNr,cTelNm,cTelSrt,cTelDos,cPreOK)

   LOCAL TstTel   := "0123456789()+"
   LOCAL TstNr    := 0

   DEFAULT(cTelNr ,SPACE(20))
   DEFAULT(cTelNm ,"Telephone test")
   DEFAULT(cTelDos,"")
   DEFAULT(cPreOK,.T.)

   PRIVATE TelRet := .T.

   DEFINE DIALOG KeuDlg NAME "K_TELEFOON" FONT oFontSFB
   REDEFINE GET cTelNr ID 101 OF KeuDlg PICTURE REPLICATE("!",20)

   REDEFINE BUTTON ID 901 OF KeuDlg ACTION (TelRet:=.T.,KeuDlg:END())
   REDEFINE BUTTON ID 902 OF KeuDlg ACTION (TelRet:=.F.,KeuDlg:END())

   ACTIVATE Dialog KeuDlg CENTERED

   IF TelRet .AND. !EMPTY(cTelNr)
      cTelNr := ALLTRIM(cTelNr)

      FOR i=1 TO LEN(cTelNr)
          TstNr := AT(SUBSTR(cTelNr,i,1),TstTel)
          IF TstNr = 0
              cTelNr := LEFT(cTelNr,i-1) + RIGHT(cTelNr,LEN(cTelNr)-i)
              i--
          ENDIF
      NEXT

      IF LEFT(cTelNr,1) = "+" ; cTelNr := "00" + RIGHT(cTelNr,LEN(cTelNr)-1) ; ENDIF
   ENDIF

   IF TelRet
      PhoneTo(IF(US->USTELNUL,"0","") + ALLTRIM(cTelNr),"is called by",ALLTRIM(cTelNm),ALLTRIM(US->USERNAAM))
   ENDIF

RETURN


If the telephone software is using TAPI too, this function will work. I have installed it on networks of several customers.

Good luck.

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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Fwh and PBX
Posted: Mon Mar 11, 2013 07:50 PM

Driessen thanks,
Can you write also the telephon tapi software you use ?
I can purchase it for my customer

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Fwh and PBX
Posted: Mon Mar 11, 2013 11:07 PM

Sylvio,

I didn't right anything specifique for TAPI. Tapi is build into Windows. The telephone software replaces the standard TAPI of Windows. The function PhoneTo() does all the rest.

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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Fwh and PBX
Posted: Wed Mar 13, 2013 08:18 AM

Diessen
How it must be the number format ?
and what I must insert instead of it IF(US->USTELNUL,"0","")

for sample my telephone is +39 0861 245789
+39 number for Italy
0861
245789

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Fwh and PBX
Posted: Wed Mar 13, 2013 09:14 AM

Silvio,

The meaning of IF(US->USTELNUL,"0","") is : some telephones need a 0 (needed) to get an external line. So I have a parameter in my application (US->USTELNUL) which defines if the 0 (zero) is needed or not.

The same for "+" as first character of the phonenumber. Some telephones don't except a "+" while 00 (double zero) is always excepted.

So in my example, I would send you phonenumber as "0039861245789". All the other characters are excluded. That is done by the module "FOR ... NEXT", just after the closed dialog box.

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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Fwh and PBX
Posted: Wed Mar 13, 2013 08:53 PM

ùI made many test no connect to number ( win xp and seven ) it run the tapi dialog but then let me the message "number incorrect"

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion