Fwh and PBX

Fwh and PBX

Postby Silvio.Falconi » Mon Mar 11, 2013 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Fwh and PBX

Postby driessen » Mon Mar 11, 2013 4: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: Select all  Expand view
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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Fwh and PBX

Postby Silvio.Falconi » Mon Mar 11, 2013 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Fwh and PBX

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Fwh and PBX

Postby Silvio.Falconi » Wed Mar 13, 2013 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Fwh and PBX

Postby driessen » Wed Mar 13, 2013 9: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Fwh and PBX

Postby Silvio.Falconi » Wed Mar 13, 2013 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests