Phone Notify! TextToSay Advanced Commands

From CDYNE Wiki
Revision as of 00:32, 23 January 2007 by imported>ChristopherC (StatusChangePostURL)
Jump to navigation Jump to search

Advanced Notify Commands in our Current Release

ActOnDigitPress

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.

~\ActOnDigitPress(false)~

ActOnFeature

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.

~\ActOnFeature(false)~

AssignDTMF

Assigns 1 to go to TestLbl (Note: 1 defaults to repeat msg.) - This can change anytime in the dialplan

~\AssignDTMF(1|TestLbl)~

Beep

A standard Beep tone. Usually used right before a Record command.

~\Beep()~

ClearDTMF

Provides a clean slate for Acting on DTMF Commands (This will clear the default of press 1 to repeat).

~\ClearDTMF()~

DialDTMF

Dials a number in DTMF tones. xxx being the number to dial.

~\DialDTMF(xxx)~

EndCall

Ends the call immediately.

~\EndCall()~

GetDigits

Returns the digits in the variable specified. Also waits 5 (or what you specify) seconds for digits. Then continues to the next command. Variables will be added to a new GetQueueIDStatus function called GetQueueIDStatusAdvanced. This is due to security concerns and will allow you to pull more information about the call. It is good to use this with the ActOnDigitPress(false) command before the sound file that you ask for this information.

~\GetDigits(TestVar|5)~

Goto

This will goto a Label defined by the Label command.

~\Goto(lbl)~

GotoIf

This will goto a Label only if the Variable is equal to the 2nd value.

~\GotoIf(TestVar|true|TestLbl)~

Label

Sets a label

~\Label(TestLbl)~
Special Labels

You can reset these labels in order for the system to do something that you wish during Amd for instance.

  • Start - Start of a call.
  • Ring - Where to go if a ring is detected in the call.
  • Amd - Where to go if an answering machine is detected.

PlaySpecialSoundFile

This function is mainly used by CDYNE for global sound files such as recording sound files.

~\PlaySpecialSoundFile(xxxx)~
Some predefined sound files
* BEA78757-BE32-4670-A8F7-D7E03AAFFB95 - Hello, please record sound file for id...
* AAA31398-AED0-4854-B745-95D174AAFE37 - after the tone record the message and press # to hang up or stop speaking when you are finished.
* C8F07A8C-E130-4E54-BE55-8079B8BB64E5 - Press 1 to accept, Press 2 to rerecord the sound file.
* B8B80319-0308-4E9A-80D8-D3A3D1E3CF51 - Thank you for using the Sound Record Service.

QueryExternalServer

This allows you to query your own server and return a Variable to use in the dialplan. Note: Special characters such as ~ ^ ( ) | are not allowed in the URL Field. Your server has 5 seconds to respond or the system will report a provider error to the caller.

~\QueryExternalServer(url|TestVar)~

RecordAndSaveAs

Records the Wave file and saves it as the Sound ID.

~\RecordAndSaveAs(MySoundID) ~

RecordWithUniqueID

Records a with a unique soundid and sets the Variable to that SoundID.

~\RecordWithUniqueID(Variable)~

SetVar

Sets a Variable with the Value Specified. Values could be forced to lowercase.

~\SetVar(Variable|Value)~
System Vars

This can be set at anytime in the call.

  • maxrecordseconds - Sets the Maximum Record Length in seconds (ex: ~\SetVar(maxrecordseconds|30)~ for 30 secs).
  • maxcallseconds - Sets the Maximum Call Length in seconds (You should set this at the beginning of the call).

StatusChangePostURL

This posts information about the call to a URL you specify.

~\StatusChangePostURL(posturl)~

It will Post to you these values:

  • QueueID - Contains the ID of the Call.
  • ResponseCode - 1 = Call Answered, 2 or more - Call unanswered. Status Codes
  • StartTime - Start time in Universal Time (UTC)
  • EndTime - End time in Universal Time (UTC)
  • Duration - Call Length in Seconds
  • machinedetection - Currently only HUMAN, MACHINE, or FAX.
  • [Any Variables you collected] - Any additional variables that you collected during the call.

Example of Usage:
In Visual Studio.NET, under the Standard Page_Load event you could simply use the Request object to request these variables.

Note: Sending an AdvancedNotify will allow you to set this also. Use StatusPostBackUrl in the AdvancedNotify Class.

TransferTo

This transfers the call immediately to the number specified.

~\TransferTo(17575551000)~

WaitForDTMF

This function waits x seconds for a DTMF Command - this differs from getdigits in that it accepts only one digit. Make sure that ActOnDigitPress(true) is set (It is true by default).

~\WaitForDTMF(5)~

WaitForSilence

Waits for silence that lasts xxx number of seconds. (Up to a 10 second wait.)

~\WaitForSilence(xxx)~

Advanced Notify Commands in our Upcoming Release

VariableToTTS

Converts a Variable to Text To Speech and plays it to a caller. Keep in mind that this gets sent to the TTS Server Farm for conversion (This is usually very quick). Please try to limit the size of these otherwise your caller might enjoy too much dead-air.

~\VariableToTTS(Variable)~