Difference between pages "Phone Notify! TextToSay Commands" and "Phone Notify! TextToSay Advanced Commands"

From CDYNE Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>ChristopherC
(Example)
 
imported>ChristopherC
(StatusChangePostURL)
 
Line 1: Line 1:
Back to [[Phone Notify!]]
+
=== Advanced Notify Commands in our Current Release ===
  
== Playing Text To Speech (Computer generated voice): ==
+
==== 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.
  
No Special command required. Just type the text to say.
+
  ~\ActOnDigitPress(false)~
  
=== Example ===
+
==== 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.
  
  Hello John Doe, your account is past due.  Please call Jerry at 757-555-5555 to settle your account.
+
  ~\ActOnFeature(false)~
  
== Playing a sound file ==
+
==== AssignDTMF ====
 +
Assigns 1 to go to TestLbl (Note: 1 defaults to repeat msg.) - This can change anytime in the dialplan
  
  ~^soundid~ - Replace soundid with the name of your sound file.
+
  ~\AssignDTMF(1|TestLbl)~
  
=== Example ===
+
==== Beep ====
Mixing sound files with Text To Speech:
+
A standard Beep tone.  Usually used right before a Record command.
  
  ~^intro~ John Doe ~^end~
+
  ~\Beep()~
  
== TextToSay Advanced Commands ==
+
==== ClearDTMF ====
 +
Provides a clean slate for Acting on DTMF Commands (This will clear the default of press 1 to repeat).
  
=== Syntax ===
+
  ~\ClearDTMF()~
  ~\command~
 
  
=== Commands ===
+
==== DialDTMF ====
 +
Dials a number in DTMF tones.  xxx being the number to dial.
  
[[Phone Notify! TextToSay Advanced Commands]] - Lists the commands available.
+
~\DialDTMF(xxx)~
  
=== Examples ===
+
==== EndCall ====
 +
Ends the call immediately.
  
==== Recording a sound file ====
+
~\EndCall()~
  
[[Phone Notify! Script Samples#Recording sound files|Recording Sound Files]]
+
==== 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.
  
== Variables ==
+
~\GetDigits(TestVar|5)~
  
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.  Please note that all variables are converted to lowercase.  Variables are truncated if they become over 500 characters (although you can have multiple 500 character Variables).
+
==== Goto ====
 +
This will goto a Label defined by the Label command.
  
=== Syntax ===
+
~\Goto(lbl)~
  
[variablename]
+
==== GotoIf ====
 +
This will goto a Label only if the Variable is equal to the 2nd value.
  
=== Special Variables ===
+
~\GotoIf(TestVar|true|TestLbl)~
  
These are Variables assigned by the system during the phone call and can be used during the call.
+
==== Label ====
 +
Sets a label
  
* phonenumber - The phone number that was dialed. For incoming calls it is the phone number the caller dialed.
+
  ~\Label(TestLbl)~
* queueid - The current queue number.  (Incoming calls report this as 0).
 
* callerid - The CallerID that was set.  For incoming calls this is the CallerID of the caller.
 
* calleridname - This is the CallerID name.  Not currently set for incoming calls.
 
* extension - Only set if an extension was used.
 
* machinedetection - Can currently only be: HUMAN, MACHINE, or FAX. (keep in mind that this may change at anytime during the call since Answering Machine detection can happen at any time.)
 
  
=== Example ===
+
===== Special Labels =====
  <nowiki>~\QueryExternalServer(http://ws.cdyne.com/testws/test.asmx/test?val=[somevariable]|returnvar)~</nowiki>
+
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. [http://ws.cdyne.com/notifyws/phonenotify.asmx/GetResponseCodes 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:<br>
 +
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)~

Revision as of 00:32, 23 January 2007

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)~