ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Phone functions
  • Format of .WAV file
  • Required configuration
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
tapiPlay (Function)
In french: telJoue
Plays a sound file (.WAV) for the specified line. You can:
  • play the message of the answerphone when a call is received,
  • play a message during an outgoing call (after tapiDial for example).
Example
PROCEDURE DetectionAppel(nIDService, nIDAppel, nStatut)

// Décroche la ligne pour répondre
tapiAnswerCall(nIDAppel)

// Enclenchement du répondeur
tapiPlay("repondeur.wav", tapiPlayLoop, nIDAppel)

// Si la touche étoile a été appuyée
// le répondeur est stoppé
IF Position(tapiKeyPressed(nIDAppel), "*") >0 THEN
	tapiStop(nIDAppel)
END
Syntax
<Result> = tapiPlay(<Name of WAV file> [, <Option> [, <Call identifier>]])
<Result>: Boolean
  • True if the file is played,
  • False otherwise. If the file is not played, check the format of the WAV file. For more details, see remarks.
<Name of WAV file>: Character string
Name and path of the .WAV file to play. The file extension must be specified.
<Option>: Optional integer
Option used to specify the options of sound file to play.
tapiPlayLockThe function is blocking: the code continues to run only when the sound has been played.
If this parameter is not specified, the function returns a result as soon as the sound starts to play.
tapiPlayLoopThe sound is played in loop.
If this parameter is not specified, the sound is played once only.
<Call identifier>: Optional integer
Identifier of the call to be handled. This identifier is defined in the WLanguage procedure called by tapiListen. The current call is handled if this parameter is not specified.
Remarks

Format of .WAV file

Please note: Not all WAV formats are compatible with telephony.. You must use the CCITT G.711 A-Law, u-Law compression codec supplied by Microsoft.
Note: To check the codec of a .WAV file, use a program such as GSpot.
WINDEVUser code (UMC)

Required configuration

Telephony functions use TAPI 2.0 technology and/or TAPI 3.1 technology. These technologies can be used on all systems.
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help