E. CPL Statements
E.1. CPL statements
- accept
-
Accepts the current call (the one which invoked
the current script). If the call was originated
by an ISDN subscriber, a connect indication is
issued. If the call was a SIP INVITE request,
a SIP reply is sent with response code 200.
- audiorec
- filename
Writes the incoming media stream (audio) to the
file filename. An au file header is written at
the beginning of the file.
Recording stops when an event occurs or when the
current state is left. If
you want to delimit recording
time, you have to start a timer before.
Recording stops upon reception of the timeout event.
- cvt
- varname stringexpr cvtfct
Similar to the command stringexpr
is assigned to the variable varname.
In addition cvtfct
specifies a conversion function to be performed on
stringexpr.
- enter
- statename
Changes to the specified state. All running timers
are stopped. If the new state has an
definition, execution resumes its statement block.
- hangup
- [ reasoncode ]
Disconnects from the current call. After reception of the
disconnect indication from the ISDN layer, a
disconnect event is generated.
- log stringexpr
-
Writes text to the script log file.
- redirect destination
Redirects the current call to another destination, which
may be either a telephone number or a conference address.
The destination is specified by an URL.
A phone URL redirects the call
to another telephone number, which is a component of the URL.
A RTP URL connects the call with the RTP media stream, whose
IP address and port number is supplied within the URL.
Redirection is
suspended when an event occurs, such as a disconnect.
- timer
- timername [ (local | global) timeout | stop ]
The command is used to start and stop timers.
The command "" starts a timer named tname. When the specified time
(in milliseconds) has been elapsed a timer event is
triggered. This event may be trapped using
an "" event definition.
Use to stop the specified timer.
E.2. Tcl statements
- procname
-
Invokes the procedure procname. Note, that there
is no way to pass parameters to the called procedure.
Also note, that the procedure call does not change
the current state.
- exec
- stringexpr
Executes a system command,
stdin and stdout are "connected" to the B channel
i.e. the RTP stream of the
incoming call. All output on stderr is sent to the script
log file.
- exit
Terminates the current script. If a ISDN call is pending,
it is disconnected before.
- if
- condition procbody1 [ else procbody2 ]
Evaluates condition and continues execution
in either procbody1 or procbody2.
- incr
- varname [ increment ]
Increments the integer value stored in varname by increment.
If the optional increment parameter is omitted, 1 is added
to varname
- set varname stringexpr
-
Assigns stringexpr to the variable specified
by varname.
- while condition procbody
-
Executes the statements contained in procbody if
condition evaluates to true. This process repeats
until condition evaluates to false.
File was created Wed Feb 26 18:31:47 1997 by tex2html