|
|
|
|
- Example: Starts the service for call detection
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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|