# Phone Notify! TextToSay Commands

## Playing Text To Speech (Computer generated voice):

No Special command required. Just type the text to say.

### Example

Hello John Doe, your account is past due.  Please call Jerry at 757-555-5555 to settle your account.


## Playing a sound file

~^soundid~ - Replace soundid with the name of your sound file.


### Example

Mixing sound files with Text To Speech:

~^intro~ John Doe ~^end~


### Syntax

~\command~


### Commands

• Label(TestLbl) - sets a label
• GoTo(TestLbl) - goto a label in the dialplan (This example would go to Testlbl)
• AssignDTMF(1|TestLabel) - Assigns 1 to go to TestLbl (Note: 1 defaults to repeat msg.) - This can change anytime in the dialplan
• TransferTo(17575551000) - This transfers the number to 757-555-1000
• Beep() - A standard Beep tone. Usually used right before a Record command.
• RecordAndSaveAs(MySoundID) - Records the Wave file and saves it as the Sound ID
• WaitForDTMF(5) - This function waits 5 seconds for a DTMF Command - this differs from getdigits as it only accepts one dtmf tone.
• ClearDTMF() - This function clears out DTMF commands.
• PlaySpecialSoundFile(xxxx) - This function is internal to CDYNE and allows us to play system sound files.
• DialDTMF(xxx) - Numbers to Dial with DTMF.
• WaitForSilence(xxx) - waits for silence that lasts xxx number of seconds. (Up to a 10 second wait.)
• EndCall() - Ends the call immediately.
• ActOnFeature(false) - This will turn off AMD (Answering Machine Detection), Fax, and Ring Detection. This is useful when you do not wish the message to restart when these tones are detected.
• ActOnDigitPress(false) - This turns off Message Interruption for digit commands (such as 1 for repeat). This is useful for a message that says Enter your zip code and doesn't jump around in the Dial Plan when the digits are pressed.

#### These functions will be in our January Release

• GetDigits(TestVar|5) - Returns the digits in the variable specified. Also waits 5 seconds for digits. Then continues to the next command.
• QueryExternalServer(URL|TestVar) - This allows you to query your own server and return a Variable to use in the dialplan.
• GotoIf(TestVar|true|TestLbl) - This will allow you to goto a Label based off a variable.

### Examples

#### Recording a sound file

Our Record Sound ID Sample.  The PlaySpecialSoundFile functions are internal to CDYNE.  You may use the same sounds if you wish.

~\ActOnFeature(false)~
~\AssignDTMF(2|ReRecord)~
~\PlaySpecialSoundFile(BEA78757-BE32-4670-A8F7-D7E03AAFFB95)~
The Sound ID
~\PlaySpecialSoundFile(AAA31398-AED0-4854-B745-95D174AAFE37)~
~\label(ReRecord)~
~\Beep()~
~\Recordandsaveas(NewSoundID)~
~\AssignDTMF(1|End)~
~^NewSoundID~
~\PlaySpecialSoundFile(C8F07A8C-E130-4E54-BE55-8079B8BB64E5)~
~\label(End)~
~\PlaySpecialSoundFile(B8B80319-0308-4E9A-80D8-D3A3D1E3CF51)~


## Variables

Variables can only be used in the Commands above. The text to speech is converted before the call is made and therefore cannot use variables. We plan on adding a PlayDigits function that will allow you to playback a Variables contents to a caller.

### Syntax

[variablename]

• The only function that currently uses variables is QueryExternalServer in the URL field.

### Insert non-formatted text hereExample

~\QueryExternalServer(http://ws.cdyne.com/testws/test.asmx/test?val=[somevariable]|returnvar)~