Phone Notify! TextToSay Advanced Commands

From CDYNE Wiki for Web Services
Jump to: navigation, search

Back to Phone_Notify!

Most of these features do not work in our Demo version

Contents

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

Conference

Provides a way to Conference Multiple Notifies together.

~\Conference()~

NOTE: The first Notify that uses the command will return a ConfKey variable (You must use StatusChangePostURL to get it). You can then start other notifies with the same ConfKey to join the person to the same room. You would need to use ~\SetVar(ConfKey|the confkey guid)~ at the front of the other notifications.

DebugEmail

see Phone Notify! Debugging and Error Reporting

DialDTMF

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

~\DialDTMF(xxx)~

ErrorEmail

see Phone Notify! Debugging and Error Reporting

EndCall

Ends the call immediately.

~\EndCall()~

GetDigits

Returns the digits in the variable specified. Also waits 5 ([optional] or what you specify) seconds for digits. Then automatically continues to the next command after '#' is pressed. You can also specify the max digits to accept([optional] This will turn off the # feature). 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)~

Zipcode Example. This will pause up to six seconds for a 5 digit number.

~\GetDigits(TestVar|6|5)~

GetVariableLength

Returns the length of a variable into another variable.

~\GetVariableLength(variable|resultvar)~

Goto

This will goto a Label defined by the Label command.

~\Goto(lbl)~

GotoIf

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

~\GotoIf(TestVar|true|TestLbl)~


This will go to a Label only if the Variable value matches the specified operator.

~\GotoIf(TestVar|>|5|TestLbl)~

IncreaseVariable

This will increase a variable by the amount specified. The number could also be negative and cause a decrease. If the variable is not a number, the system will ignore this command and move on.

~\IncreaseVariable(TestVar|1)~ - would increase TestVar by 1.

Label

Sets a label

~\Label(TestLbl)~

MaxRingTime

Sets ring time for the call. Put this at the top of your script. Please keep in mind that some phones don't ring for the first few seconds of ring time. The reason is for call blocking applications for instance. (Outgoing Calls Only)

~\MaxRingTime(10)~ would cause the system to ring a phone for 10 seconds.
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.

PlayAlphaNumeric

This command will read out Alpha-numeric characters in a clear voice that uses the Phonetic Alphabet. Variables are not currently supported with this command.

~\PlayAlphaNumeric(xxxx)~

PlayAmount

This command will read out money values in a clear voice. Variables are not currently supported with this command. For a C# example that you can implement yourself, visit Convert Money to Text in C Sharp.

~\PlayAmount(xxxx)~

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.

PlaySilence

This function is used to insert a pause in any portion of the message, this is great if you have a requirement to wait for any duration of time. Value is in seconds. You can use .5 for half of a second. Example (3.5)

~\PlaySilence(3)~

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. This may force the url into lowercase.

~\QueryExternalServer(url|TestVar)~

NOTE: You may specify variables in the URL by encasing them in brackets

Example

~\QueryExternalServer(http://null.cdyne.com/manage_appt.cgi?action=cancel&queueid=[queueid]|Result)~

QuickStart

This will begin the message as fast as possible. This feature by-passes 'hello' detection. So if this feature is used, some follow it with ~\WaitForSilence(.5)~. THIS MUST BE THE VERY FIRST THING IN A DIAL PLAN.

~\QuickStart()~

RecordAndSaveAs

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

~\RecordAndSaveAs(MySoundID)~

RecordWithUniqueID

Records 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).
  • transfercallerid - Sets the CallerID to use on the phone to be transferred to.
  • transfercalleridname - Sets the CallerID Name to use on the phone to be transferred to.
  • maxtransfertime - Sets the maximum amount of minutes the transferred call can use.
  • saverecordingonhangup - Sets if the recording will be saved on a call that is hung up (Defaults to False).
  • incoming - contains true if the call is an incoming call.
  • machinedetection - Contains the status of the AMD detection routines. This can contain FAX, MACHINE, HUMAN, and UNKNOWN.
  • transferredto - Contains the number that a call was transferred to during the call.
  • transfererror - Contains the error experienced within a transfer if an error occurs.
  • transfersoundfileid - Allows you to change the transfer message while the person waits for the transferred call to be picked up.
  • transferwhispersound - Allows you to announce something to the transfer line before transfer is connected. Ex: Incoming Sales Call.


Set at the beginning of a call and removed at the end of the call (you can use these in your scripts):

  • queueid - Contains the QueueID number for the call (Incoming calls now support QueueID).
  • phonenumber - Contains the phone number that was dialed (The incoming number on incoming calls).
  • callerid - Contains the caller id number (On an incoming call script contains the person who called).
  • calleridname - Contains the caller id name (On an incoming call script contains the person who called).
  • extension - Contains the extension dialed if specified (empty on incoming calls).

Set only at the end of a call:

  • digitsdialed - contains all the digits dialed during a call (Pipe delimited).
  • AC - Contains a status code. This is for advanced problem solving with Tech Support.
  • TransferErrorAC - Contains a status code. This is for advanced problem solving with Tech Support.

SoundPausing

Our system pauses with loud background noise. This is to assist in the answering machine detection of where the beep is. Sometimes talking over the answering machine will cause the beep to corrupt and therefore causes our system to miss it. If you would like to turn off the sound pausing feature of amd detection. Issue the following command.

~\soundpausing(false)~

StatusChangePostURL

This posts information about the call to a URL you specify. Using this method is highly suggested if you have a server to postback to on the web. The posturl must be in lower case.

~\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.
  • AC - Contains a status code. This is for advanced problem solving with Tech Support.
  • digitsdialed - contains all the digits dialed during a call.
  • incoming - contains true if the call was an incoming call.
  • [Any Variables you collected] - Any additional variables that you collected/set 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 NotifyPhoneAdvanced will allow you to set this also. Use StatusChangePostUrl in the AdvancedNotify Class.

TransferTo

This transfers the call immediately to the number specified.

~\TransferTo(17575551000)~

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

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)~
Personal tools
Toolbox





Trial Key