AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones de teléfono
  • Example: Starts the service for call detection
tapiListen (Example)
Example: Starts the service for call detection
The following example is used to start a service for call detection.
// Start the service for call detection
IF tapiListen("IncomingCall", tapiOptionMediaModeFax, "CallDetection") THEN
// The service for call detection is started
Message("Call detection enabled")
ELSE
// The service for call detection is not started
Error("Unable to start the call detection" + CR +...
  "Error details:"+ CR + ErrorInfo(errMessage))
END
PROCEDURE CallDetection(nServiceID, nCallID, nStatus)
// WARNING:
// The processes performed by this procedure are called from a thread
// The display should be done via the main thread
// (this is why PostMessage is used)
// The "Trace" function must be used to debug this process
// detection of incoming calls
SWITCH nStatus
// Detect a new call:
// Note: Additional information will be available after the fist ring
CASE tapiNewCall:
// Notify the main window of a new incoming call in order to open a popup
PostMessage(Handle(WIN_Window_Call), "PhoneCall", nCallID, nStatus)
 
// Information about the call is available
CASE tapiCallInformation:
// Notify the main window of a new incoming call in order to open a popup
PostMessage(Handle(WIN_Window_Call), "PhoneCallInfo", nCallID, nStatus)
 
// The line was hung up
CASE tapiLineDisconnected:
// Notify the main window of a new incoming call in order to open a popup
PostMessage(Handle(WIN_Window_Call), "PhoneCallEnd", nCallID, nStatus)
END
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local