Script Structure; Quotes - Snom 4S Administrator's Manual

Sip proxy/registrar version 2.30
Table of Contents

Advertisement

[
S N O M
The layered architecture is also used for defining variables. Global
variables can be overwritten by domain specific variables in the same way
that functions are overwritten. An additional layer for overriding variables
is the request layer, which exists within the domain context.
Scripts are loaded via the web browser at the bottom of the dial
plan web page. If you load the script via this interface, you don't need to
restart the proxy in order to make this script effective.
To view the currently loaded script, click on the link in the same
web page.

Script Structure

A script is made up by a list of statements and function definitions.
The script does not respect line breaks (like some BASIC implementations
do). That means you can insert line breaks and indentation as you like.
There are two exceptions to this rule. The first are comments and
the second are quoted text.
Comments
As in most other programming languages, you can se comments
to make your code more readable.
Comments start with a hash symbol ("#") and go until the end
of the line.
The proxy removes all comments during the reading of the script
so that there is no performance drawback by comments.

Quotes

Quoted text begins with the quotation sign '"' and lasts until a
terminating quotation sign is being found.
It is not allowed to use a line break within a quote. All quotations
must be terminated within the same line.
To get a newline character, you can use the "\n" known from C
programming language. "\r" inserts a carriage return. To get a backslash,
use "\\". To get a quote character, use '\"'.
34 • Scripting
4 S P
/ R
R O X Y
E G I S T R A R
M
]
A N U A L

Advertisement

Table of Contents
loading

Table of Contents