SUMMARY


Designer


General

Designer is an easy to use graphical interface, which allows you to create powerful workflow scripts. Those scripts are then executed by the Message Service application.
Fax-on-demand, Voice Mail and Automated Information Services are only a few of the possibilities that can be designed.

Designer will create two types of workflow scripts, voice and text.

Voice scripts are used to create interactive phone applications (Also called Interactive Voice Response IVR Systems), where the caller uses the phone keypad to enter values and navigates through a script. Fax-on-demand, Voice Mail and Automated Information Services are only a few of the possibilities that can be designed with voice scripts.

Text scripts are used to create scripts that react on incoming messages or are timer dependent. The message (SMS or E-mail) is queried for the specified values and format and then you can react on its contents. SMS/Email forwarding, SMS/Email autoreply, SMS on demand, etc, may be designed within minutes.

 

Instruction Flow
When executing a script the first cell is always the Start Cell. This is the only cell with a red caption. From then on the flow of instructions depends on the script. By double clicking on a cell the detail screen opens and the behavior of the cell can be configured. In the Targets section of the cell the Trigger defines the caller action (IE when the caller presses a key on the phone pad) that leads to a next Target, which is the next cell to be executed.

 

Cells

Double clicking on the cell icon opens a window that highlights the settings for this particular cell. The settings and values depend on the function of the cell.


<=Cell title, used to identify cell
<=Cell type, defines behaviour of cell

<=Description, free comment

<=Voice file(s)
Dbl click to select or enter Result Variable
<=Options
<=Parameters

 

<=Targets, next steps
Some of the cells have only SUCCESS/FAIL as trigger option, some only NEXT.

Double click on trigger or target to change


Functional Cells

The following functional cells are available:

(1) Used in voice scripts (*.vsc)
(2) Used in SMS, E-mail or Timer scripts (*.tsc)
(3) Used in FAX scripts (*.fsc)

(1) Play Message
(1)  Hang-up
(1)  Get Number
(1)  Speak String
(1)  Speech recognition
(1)(2)(3) Run Program
(1) Run Script
(1)(2)(3) Run VBS code
(1)(2)(3) HTTP call
(1)(2)(3) Send DDE Command
(1) Record Message
(1)(2)(3) Result Variable Switch
(1) Transfer Call
(1)(2)(3) Send Message
(1) Voice Mail
(1) Voice Mail Admin
(1) Fax-On-Demand
(1) Send DTMF String
(1)(2)(3) String contains substring
(1)(2)(3) String left chars
(1)(2)(3) String right chars
(1)(2)(3) String left until
(1)(2)(3) String right from
(1)(2)(3) String between two strings
(1)(2)(3) Replace string
(1)(2)(3) Load from File
(1)(2)(3) Save to File
(1)(2)(3) Calculator
(1)(2)(3) System Variables
(3) Save FAX to file
(3) Print FAX
(2)(3) Exit

 

Play Message

The Play Message cell plays a single voice file and waits for the caller to press a phone key. This trigger is then used to select the next target in the script.
The timeout value defines the number of seconds to wait until the TimeOut path is taken.

This cell always requires a TimeOut trigger to be defined.

In this example the caller may press the "1" key which leads to the GetName cell or wait 10s and go to the GetID cell.
If Beep at end of module is selected the caller will hear a beep at the end of the announcement.

 

Keys allowed :
Defined by Trigger

Result Variable :
Key pressed by caller


Hang-up

Plays a last voice file, puts the phone off-hook and terminates the script.
This cell should always be the last cell in a voice script.


If Beep at end of module is selected the caller will hear a beep at the end of the announcement.










Keys allowed :
(No key entry)

Result Variable :
None


Get Number

Plays the first voice file. Then the caller has Timeout[s] seconds to enter Input limit numbers. S/he can enter less than the required digits by pressing "#" to end.

If Confirm number is not selected the SUCCESS path is taken immediately after the numbers are entered. If not all numbers are entered within the Timeout[s] seconds the FAIL path is taken.

If Confirm number is selected the second voice file is played and the entered number is read back, followed by the third voice file. The caller can confirm the number by pressing 1 to select the SUCCESS path.
If the caller presses 2 the FAIL path is taken. (May be used to re-enter the number)
The preset for the SUCCESS/FAIL setting (Default 1 and 2) can be changed in the configuration.

Keys allowed :
"1234567890*#"
"12" (in confirm number)

Result Variable :
Number entered by caller


Speak String

Plays the Voice File Before. Then reads back a given string.

If the words in the string are pre-recorded, the actual voice files are played. =>Voice Engine
Alternatively you may select to use the Microsoft TTS Engine and let the text read by a computer voice.

Then it plays the Voice file after.

In this example it reads back the string created as Result Variable of the cell Check ID.

Setting the TimeOut value to zero allows continuing straight to the End cell without waiting for the caller to press a key.



Keys allowed :
Defined by Trigger

Result Variable :
Key pressed by caller

 

Speech recognition

Uses the installed Speech Recognition Engine to recognize a spoken word or sentence.

First plays the voice file Msg before. Then the caller has Timeout [s] seconds to speak a word or a sentence that is then recognized by the speech engine. If no word is spoken, the FAIL path is taken, otherwise the SUCCESS path is selected and the recognized word is available in the Result Variable of this cell.
To redue the accuracy of the speech recognition it is highly recommended to use a SAPI grammar file. If no file is defined, INS will return any word/phrase spoken.
 

Tip:
To control the flow of the call, you may use a Result Variable Switch as next cell and evaluate which cell is to be executed next.

 



Keys allowed :
None


Result Variable :
Recognized word or sentence.


Run Program

Executes an external application.

In this example it calls the external application TestID and passes the result variable from the cell Get ID as parameter. If successful Speak PW is the next cell, if not the End cell is selected.

FAIL/SUCCESS is decided like follows:
If the "Wait until completed" flag is set, then the external application needs to create a two line text file RESULTx.TXT (x for the channel ID. IE for the first channel RESULT1.TXT, for the second channel RESULT2.TXT, etc),
where the first line is either the string FAIL or SUCCESS, indicating failure or success. The second line can contain a string, which is used as result variable for this cell. The file needs to be created in the C:\INS directory.
If the "Wait until completed" flag is not set, the SUCCESS path is taken and the result variable is empty.


If the application contains spaces, do not include it in "", if the parameter contains spaces, then include it in "":
Example :
C:\Program Files\Windows Media Player\mplayer2.exe "C:\MAW Software\My Scripts\Test\test.wav"

Keys allowed :
(No key entry)

Result Variable :
2nd line returned by RESULTx.TXT


Note:

Message Server does NOT delete the result file. If the Wait Until completed option is unchecked Message Server will not wait for the application to complete (and update the result file), but read the previously created file (if existing). If there is no result file, the script will execute the FAIL path.

Run Script

Terminates the existing voice script, loads a new voice script and starts executing it at the cell specified in the Next Module parameter.

Warning: All result variables of the old script are lost.

The left example would call a new script Script2 and start it at cell Start.


 


Keys allowed :
(No key entry)


Result Variable :
None


Run VBS code

This cell launches a specified VBS (Visual Basic Script) code.
The code entered in this cell is saved in a file into the same directory as the script, in the form VBS x.txt (x is the Name of the cell).
Once this file is created by Designer you may also edit it with a standard text editor and make the desired changes.
During a script, before the code is started, all Result Variables are evaluated and replaced by their current values, then the file is saved as ~VBS x y.vbs (y for the incoming line ID, f
or text scripts the name of the file is simply ~VBS x.vbs) and the Windows script engine (wscript.exe) is called.
You may use the final vbs code for debugging purpose, but must remember that it will be overwritten the next time the script runs.
If you exit your VBS code with the instruction
WScript.Quit(param) you may return a numeric value back to the script. All negative values returned will take the FAIL path, zero and all positive values (or no value) will take the SUCCESS path. If the "Wait until competed" check box is not set the SUCCESS path will be taken and the value returned is "0".

Keys allowed :
(No key entry)

Result Variable :
Parameter returned by WScript.Quit(param) if any.

To return strings from a VBS, you have two option:

1) You may set an environment variable inside the VBS as follows:
 Set WSHShell = WScript.CreateObject("WScript.Shell")
 WSHShell.Environment.item("MyVariable") = "Hello world"
and then use $RV[@ENVVAR{MyVariable}] to access this variable inside the INS script.

2) You may write a variable to the predefined registry key HKCU\SOFTWARE\MAW Software\INS\Script\variablename as follows:
 Set WSHShell = WScript.CreateObject("WScript.Shell")
 WSHShell .RegWrite "HKCU\SOFTWARE\MAW Software\INS\Script\MyVariable", "MyValue"

and then use $RV[@REGVAR{MyVariable}] to access this variable inside the INS script.

Please read here for some important information about running VBS code in INS.

 

HTTP Call

This cell allows you to GET the contents of a web page or to POST data to a web site.
If the web site does not exist or another error occurs, the FAIL path is taken, otherwise the SUCCESS path becomes active.
The web page returned is the raw HTML data.

The URL does not need the leading http://. Just directly enter the address of the web page, IE www.mawnet.com/order.html

 

 



Keys allowed :
(No key entry)


Result Variable :
Contents (raw HTML text) of the web site returned



Send DDE command

Establishes a DDE connection with an external application.

In the left example the script starts a DDE session with Excel and reads R1C1 (=A1). This value becomes the result variable of this cell. If the DDE transaction is successful the next cell becomes Speak Value, otherwise Error DDE.

Note: The external application (IE Excel or MsAccess) needs to be running during the execution of the script.

 



Keys allowed :
(No key entry)

Result Variable :
If action is Get Data the value received by the DDE server, otherwise none.
 


Record Message

Plays a voice file and then records to a file. The recording continues until the caller presses a key defined as trigger. Depending on the key pressed the Trigger selects the next Target. If a Timeout value is defined the recording will also stop at the end of this period and the Timeout Target is selected.

In this example the filename of the recorded file is made up of a string "C:\INS\Recorded_" and a result variable , followed again by a string ".WAV"
So if the result variable is "123" the resulting filename would become "C:\INS\Recorded_123.WAV"

Keys allowed :
Defined by Trigger


Result Variable :
Key pressed by caller


Result Variable Switch

Selects a route depending on the Result Variable .
If the result variable does not correspond to any of the triggers the timeout value is taken.

NOTE: The comparison is text wise, hence 2 is bigger than 10.

In this example the cell checks the Caler ID of the current caller and chooses the next cell accordingly.
See below for notes on Conditions.






Keys allowed :
(No key entry)

Result Variable :
None
 



Conditions
The condition field decides how the comparison between the Result Variable and the Value is done. The conditions are tested in sequence until the first matching value.
All comparisons are string comparisons, therefore a<b, 100 <20 and 100>020
.

The following condition can be selected:

== EQUAL
= PART OF
<> NOT EQUAL
> GREATER
>= GREATER OR EQUAL
< SMALLER
<= SMALLER OR EQUAL

Note
== (EQUAL) is a strict comparison
=   (PART OF) is also valid if the Result Variable is a sub string of the Value or the Value is a sub string of the Result Variable.
     IE
        if the Result Variable = "1" the condition would be true for value = "1234"  and
        if the Result Variable = "1234" the condition would be true for value = "1"

 

Transfer Call

This cell allows a call to be transferred to another number.
For this option you need a TAPI compliant phone system, standard modems do not support this feature.
(For transferring calls on modems please refer to Send DTMF String)

Blind transfer puts the current call on hold, dials the new number and transfers the call without checking if the new call is available and waiting for the new call to answer.

Consultation transfer can wait for the new call to be answered before transferring the call. If the new call does not answer (or is busy), the call will not be transferred.

If Wait [s] for busy is equal to 0, then the call is transferred without waiting for a potential busy signal (unless Wait [s] for connect is not equal to 0)
If Wait [s] for connect is equal to 0, then the call is transferred without waiting for the call to be answered.

If both values are 0, then the function behaves the same than the blind transfer.

Keys allowed :
(No key entry)

Result Variable :
Phone Number


Send Message

Sends a message to a user. The recipient needs to be defined in the Message Center database as contact, or the number needs to be preceded with a valid keyword. See under direct sending.

If you select (User default) as Send Type, depending on the capacity of the communication device specified for the contact the message will be adapted, IE a valid voice file path may be sent as voice file to a phone rather than character by character. (See Voice and Fax/E-mail messages)

 

 


Keys allowed :
(No key entry)

Result Variable :
Message ID attributed to this message. For messages to a contact list, the return string has the format sID1,sID2, sID3 where sID is the 17 digit message ID for every message.


Voice Mail

Allows setting up a voice mailbox. Plays the first voice file, then waits for the caller to leave a message. The recording continues until the caller presses a key or the message length exceeds the Max Record Time[s] value. Then the second voice file is played.


In the left example the ID of the owner of the VMB is made up of a string "User" and a result variable . So if the result variable is "123" the resulting Admin ID is "User123".

The Admin ID is used to identify the owner of the mailbox in the cell Voice Mail Admin.

Keys allowed :
(No key entry)

Result Variable :
Filename of recorded voice message


Voice Mail Admin

Accesses voicemail left by a caller in a Voice Mail cell.

If the owner of the VMB (Admin ID) has mail, the second voice file with the instructions is played, followed by the recorded voice messages. If all files were accessed the third file is played. If there is no mail the first file is played.

In this example the ID of the owner of the VMB is made up of a string "User" and a result variable. So if the result variable is "123" the resulting Admin ID is "User123".

The instructions are as follows:
1  Listen to next message
4  Delete current message
6  Re-listen current message
9  Exit


Keys allowed :
"1469"


Result Variable :
None

You can also use Message Center to access your voice mail

 

Fax-On-Demand

This cell asks the caller to enter a fax number, followed by the # key. The caller then has 60s to enter his/her fax number.
If Confirm number is selected the second voice file is played and the entered number is read back, followed by the third voice file. The caller can confirm the number by pressing 1 or press 2 to re-enter the number.
Then the facsimile message specified in Fax file to send is queued to be sent to the entered fax number as soon as the script ends.

Valid fax files are:
APF - Fax files
BMP - Windows Bitmap
DCX - Multi page PCX
PCX - PC Paintbrush
TIF - Tagged Image File
TXT - ASCII text file


Keys allowed :
"1234567890#*"

Result Variable :
Number entered


Send DTMF String


The Generate Digits method is intended for end-to-end signaling over an established call, it may be used to navigate through automated call center menus etc., but may also be used to transfer an existing call (of course the telephone switch must support call transfer by this method). e.g. Call Send DTMF String with the DTMF parameter set to "!101" to flash the hookswitch and dial extension 101, then call the HangUp cell to effect the transfer.

Valid characters for the Digits parameter are '0' through '9', 'A', 'B', 'C', 'D', '*', '#', ';' and ',' (comma). A comma injects an extra delay between the signaling of the previous and next digits it separates. The duration of this pause is configuration defined, the telephony device settings dictate what this duration is. Multiple commas may be used to inject longer pauses. The exclamation character '!' is a valid character in the string causing a "hookflash" operation, that is, one-half second on hook, followed by one-half second off-hook before continuing. Other dial modifiers may also be accepted (W @ etc), consult the telephony device documentation for details.

This cell plays a DTMF string back to the caller.
  
 
 
 
 

    

Keys allowed :
(No key entry)


Result Variable :
DTMF String


String contains substring

This cell searches for the presence of one string within another.

IE
Text = MAW Software
Substring = maw
Return = SUCCESS


 

 

 



Result Variable
:
None


String left chars

Returns a string containing a specified number of characters from the left side of a string.

IE
Text = MAW Software
Nbr of chars = 3
Return = MAW

 




 

 

Result Variable :
String found


String right chars

Returns a string containing a specified number of characters from the left side of a string.

IE
Text = MAW Software
Nbr of chars = 3
Return = are


 

 



Result Variable :
String found


String left until

Returns a string from the left side of a string until the first occurrence of another string/character.


IE
Text = MAW Software
Until string = $RV[@SPACE]
Return = MAW

 

 

 

 

 

Result Variable :
String found


String right from

Returns a string from the right side of a string from the first occurrence of another string/character on.

IE
Text = MAW Software
From string = $RV[@SPACE]
Return = Software


 

 

 


Result Variable :
String found


String between two strings

Returns a string located between two other strings/characters.

IE
Text = MAW Software
From string = $RV[@SPACE]
Until string = ware
Return = Soft












Result Variable
:
String found


Replace string

Replaces all occurrences of a substring inside a text, with another  string.

IE
Text = The dog barks
Replace string... = dog
...by string = cat
Return = The cat barks

 

This function is quite useful for filtering characters that disturb and replace them. IE filtering ", etc






Result Variable
:
Filtered string


Load From File

Reads a text file and stores its contents into the Result Variable..

 

 

 

 

 

 


Result Variable :
Contents of the file


Save To File

Creates a text file and writes to it. If the file is successfully written the SUCCESS path is taken and the Result Variable holds the filename. If the file cannot be written the FAIL path is taken and the Result Variable holds an empty string.


 

 

 

 

 

 

Result Variable :
Filename or empty string


Calculator

Calculates the value of an expression and returns the result as Result Variable.

Valid functions are

+ - * / ^
ABS, ACOS, ASIN, ATAN, COSH, COS, EXP, LOG10, LOG, POW10, ROUND, SINH, SIN, SQRT, SQR, TANH, TAN, TRUNC

You can also use () to combine multiple operations. IE
cos(sin(1))

 

 

 

Result Variable :
Result of the calculation


System Variable

This allows you to retrieve or change some of the internal system variables through a script (PLEASE USE WISELY!).
 

You can modify the system value by entering a new value into the Set to value field. If no value is entered, the system variable is not changed.

The following system variables can be accessed and changed:

System Variable Meaning Editable
SMSORIG Value of the SMS Sender ID Yes, any value
SYSERRORS Error level of the error log
0= There are no unacknowledged entries
1= There are unacknowledged information entries
2= There are unacknowledged warnings
3= There are unacknowledged errors
Yes, set to 0 to acknowledge all entries
SYSERRORDESC Description of the last error log event No



Result Variable :
Current value of the selected system variable.


Save FAX to file

Saves the just received FAX to a file, in the desired format.

















Result Variable :
Path of the saved file as entered under Filename.

 

Print FAX

Prints the just received FAX to the default printer.

















 

Result Variable :
None

 

Exit

Terminates a text script.

















Result Variable :
None

 



Result Variables

Result variables are a powerful tool of Designer. Each cell stores a result variable that then can be accessed by other cells. To access a result variable use the format $RV[CellName].

IE if a caller presses "1" in the Play Message cell "Welcome" this value can be referenced through $RV[Welcome]. You can even append result variables to strings. A reference to User$RV[Welcome]VMB would be treated as User1VMB.
Similar for the text script cells.

If you evaluate a text string with the String left chars cell “TestPW”, you can reference the result of the evaluation through $RV[TestPW].

Predefined result variables are

(1) Available in voice scripts (*.vsc)
(2) Available in SMS scripts (*.tsc)
(3) Available in E-mail scripts (*.tsc)
(4) Available in Timer activated scripts (*.tsc)
(5) Available in FAX scripts (*.fsc)

(1)(5) $RV[@CID] Caller ID number string (if supported)
(1) $RV[@CIDNAME] Caller ID name string (if supported)
(1)(5) $RV[@LID] Incoming line ID
(1)(2)(3)(4)(5)  $RV[@DATE] Current Date in format "yyyy-mm-dd"  IE 2003-12-24
(1)(2)(3)(4)(5) $RV[@TIME] Current Time in format "hhhmmmsss" IE 23h55m21s
(1)(2)(3)(4)(5) $RV[@DAYOFWEEK]         Day of the week, IE "MONDAY"
(1)(2)(3)(4)(5) $RV[@SCRIPTTIME] Time in seconds elapsed since start of script
    (Three zero-padded characters, IE 023 means 23 seconds elapsed)
(1)(2)(3)(4)(5) $RV[@AppDir] Application Directory, IE C:\INS
(1)(2)(3)(4)(5) $RV[@ScriptDir] Current Script Directory , IE C:\INS\SampleScripts
(1)(2)(3)(4)(5) $RV[@CR] Carriage Return (end of line sign ASCII 13)
(1)(2)(3)(4)(5) $RV[@LF] Line feed (new line sign ASCII 10)
(1)(2)(3)(4)(5) $RV[@ENVVAR{var}] Provides access to a system environment variable *
    (var can itself be composed with one of the following internal variables: @CID, @CIDNAME, @LID, @DATE, @AppDir, @ScriptDir)
(1)(2)(3)(4)(5) $RV[@REGVAR{key}] Provides access to a registry keys**
(2)(3) $RV[@MESSAGE] Message body (Email or SMS text)
(2)(3) $RV[@ORIGINATOR] SMS ID (+41798888) or E-Mail originator (info@aol.com)
(3) $RV[@RECIPIENT] Email recipient of message
(1)(2)(3)(4) $RV[@SPACE] SPACE “ ”sign (ASCII 32)
(3) $RV[@SUBJECT] Email subject
(5) $RV[@FAXID] Internal message ID of the received FAX

 

The use of $RV[@ScriptDir] is recommended as path statement for all voice file names as it allows to copy the script to any other directory without the need for redefining the voice file location.

IE $RV[@ScriptDir]\welcome.wav

If you select a voice file in the same directory than the script file, it's path is automatically replaced with $RV[@ScriptDir].

 

 

*To set an environment variable in VBS use the following format:
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.Environment.item("MyINSVariable") = "Hello world"

**To set a registry value in VBS use the following format:
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell .RegWrite "HKCU\SOFTWARE\MAW Software\INS\Script\MyINSVariable", "Hello world"