gsmSendDTMF (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All with voice/DTMF capability

Firmware version:

1.00 / 1.00.00


This sends a string as DTMF tones. This has the same effect as pressing the touch-tones on a "normal" phone. The maximum length of the string is 29 characters.

 

Input:

number : STRING (0..9, A,B,C,D,#,*)

DTMF string to send (max 29 characters).

         

Returns: BOOL

TRUE:

Function was successful. String was sent.

FALSE:

No success (not connected to base station etc.)

 

 

Declaration:

FUNCTION gsmSendDTMF : BOOL;
VAR_INPUT
  number : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Turn on power to the GSM module
gsmPower(power := TRUE);
 
BEGIN
  ...
  // Make a call
  IF gsmMakeCall(phonenumber := "+44 22 33 44 55") THEN
     // Successful, we have established a connection
    // Send a number
    gsmSendDTMF(number := "1234");
    // Hangup the phone
    gsmHangup();
     ...
  END_IF;
END;
 
END_PROGRAM;