INFO

Changes in Graphical Script Editor (Update from 3.20 to 4.00) (kb2174)

The information in this article applies to:

  • Graphical Script Editor v4.00
  • SwyxWare Administration v4.00
  • SwyxIt! v4.00
  • SwyxWare v4.00

[ Summary | Information ]


Summary

The Graphical Script Editor has been improved: Now expressions will be really evaluated, even as numeric or boolean expressions.


Information

Graphical Script Editor

Expressions in all Blocks

  1. Expressions will be evaluated only if starting with '=', all other input will be handled as a string. This is a major improvement: Now expressions will be really evaluated, even as numeric or boolean expressions. The expressions have to be valid VBScript expressions. The script should be tested very careful before it is installed on a production server since script errors could have negative side effects on the running SwyxServer. Examples in VBScript (please refer to the Microsoft VBScript documentation for further information):
    • Variables can deal with both string and numeric values.
    • Concatenation of strings: ="Call from " & CallerID() Will produce output like: Call from 0023147770
    • Calculation with numbers: a=3*b Will now really assign the result of 3*b to the variable a.
    • Addition: The result depends on the operands. So "3"+variable will produce a string concatenation of the string "3" with the string representation of the contents of variable, but 3+variable will add the number 3 to the numeric representation of the contents of variable. If variable does contain a value that can not be a number (e.g. "Gandalf"), an expression 3+variable will produce a type mismatch error, the script will terminate immediately and the call will be disconnected.
    • Comparison works similar. So "3">variable will perform a string comparison, but 3>variable will perform a numeric comparison if variable contains a value that can be a number. If variable does contain a value that can not be a number (e.g. "Gandalf"), an expression 3>variable will produce a type mismatch error, the script will terminate immediately and the call will be disconnected.
    • Old string expressions of version 3.20 will not be evaluated any more and must be updated manually in order to behave as intended. Functions and variables must not be enclosed with '%' in order to be evaluated in text input boxes. So the old input: Call from %CallerID()% will just produce the output: Call from %CallerID()%
  2. Renamed functions. Expressions containing one of those functions must be updated manually.
    • Date() » CurDate()
    • DateTime() » CurDateTime()
    • Day() » CurDay()
    • DayOfWeek() » CurDayOfWeek()
    • Hour() » CurHour()
    • Minute() » CurMinute()
    • Month() » CurMonth()
    • Second() » CurSecond()
    • Time() » CurTime()
    • Year() » CurYear()

Play Multiple Sounds Block

  • Expression has to be updated manually if string concatenation, a variable or a function is used.

Say Number Block

  • Expression has to be updated manually if string concatenation, a variable or a function is used.

Record Message Block

  • Play Beep checkbox. If that checkbox is marked, the caller will get a notification beep before recording is started.

Connect To Block

  • New output "Busy" has to be connected manually. To achieve the previous behavior, the "Busy" output must be connected to the same block as the "Timeout" output
  • Expression for destination address has to be updated manually if string concatenation, a variable or a function is used. If the destination address just contains a phone number, no action is required.

Connect To Loop Block

  • New output "Busy" has to be connected manually. To achieve the previous behavior, the "Busy" output must be connected to the same block as the "Timeout" output
  • Expression for destination address has to be updated manually if string concatenation, a variable or a function is used. If the destination address just contains a phone number, no action is required.

FollowMe Block

  • New outputs "Remote Inquiry (access failed)" and "Remote Inquiry (successful)" have to be connected manually.
  • Expressions for destination address and Email address have to be updated manually if string concatenation, a variable or a function is used. If the destination address just contains a phone number, no action is required. If the Email address just contains a string, no action is required.

Send Email Block

  • Expressions for Email address, subject and body have to be updated manually if string concatenation, a variable or a function is used. If the Email address, subject or body just contains strings, no action is required. An Email address using an expression could be: =CallerName()&"@swyx.com" A subject using an expression could be: ="Call from" & CallerID()
  • If the Email body contains variables or function calls, the whole body has to be entered as a multi lined expression: ="Call arrived at " & CurDateTime() & vbLF & _ "Duration of call was " & CallDuration() & vbLF & _ "The called extension was" & Extension() So as all expression it starts with '=' and will use string concatenations like "Call from " & Extension(). If the produced Email body should contain line breaks, one can add the VBScript line feed command, like: "line 1" & vbLF & "line 2" & vbLF & "line 3" If the VBScript expression is split over multiple lines, all lines but the last one must be terminated with the character '_'.

Voicemail Block

  • New outputs "Remote Inquiry (access failed)" and "Remote Inquiry (successful)" have to be connected manually.
  • Expression for Email address has to be updated manually if string concatenation, a variable or a function is used.

Set Variable Block

  • Expressions have to be updated manually.

Evaluate Block

  • Expressions have to be updated manually.

Start Block

  • A new property tab "Parameters" is introduced. On that tab there is an edit field for multi line input. "User Script"
  • In the User Script, VBScript code can be entered, this code will be part of the script generated by the Call Routing Manager.
  • The "User Script" code has to be valid VBScript code. The script should be tested very careful before it is installed on a production server since script errors could have negative side effects on the running SwyxServer. On script errors the script will be terminated immediately, the call will be disconnected. Examples in VBScript(please refer to the Microsoft VBScript documentation).
  • Functions entered as "User Script" (user functions) can be used within all blocks of that script, just like any other build in function as e.g. CurSecond().

Call Routing Manager

FollowMe Action

  • new design of RI tabRecord Message Action
  • Play Beep checkbox. If that checkbox is marked, the caller will get a notification beep before recording is started.
  • Remote Inquiry Action
  • new design of RI tab

Voicemail Action

  • new design of RI tab

Comment

Comment on this article



If we have any follow-up questions, where can we contact you?

E-Mail Address (optional)


Note

This feedback form can't be used for support requests. Those requests must be directed to your Swyx reseller or distributor.